Add BEGIN_GEOMETRY instruction
This commit is contained in:
@@ -19,14 +19,15 @@ goog.require('ol.vec.Mat4');
|
|||||||
* @enum {number}
|
* @enum {number}
|
||||||
*/
|
*/
|
||||||
ol.render.canvas.Instruction = {
|
ol.render.canvas.Instruction = {
|
||||||
BEGIN_PATH: 0,
|
BEGIN_GEOMETRY: 0,
|
||||||
CLOSE_PATH: 1,
|
BEGIN_PATH: 1,
|
||||||
DRAW_IMAGE: 2,
|
CLOSE_PATH: 2,
|
||||||
FILL: 3,
|
DRAW_IMAGE: 3,
|
||||||
MOVE_TO_LINE_TO: 4,
|
FILL: 4,
|
||||||
SET_FILL_STYLE: 5,
|
MOVE_TO_LINE_TO: 5,
|
||||||
SET_STROKE_STYLE: 6,
|
SET_FILL_STYLE: 6,
|
||||||
STROKE: 7
|
SET_STROKE_STYLE: 7,
|
||||||
|
STROKE: 8
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|
||||||
@@ -122,7 +123,16 @@ ol.render.canvas.Replay.prototype.draw =
|
|||||||
while (i < ii) {
|
while (i < ii) {
|
||||||
var instruction = instructions[i];
|
var instruction = instructions[i];
|
||||||
var type = /** @type {ol.render.canvas.Instruction} */ (instruction[0]);
|
var type = /** @type {ol.render.canvas.Instruction} */ (instruction[0]);
|
||||||
if (type == ol.render.canvas.Instruction.BEGIN_PATH) {
|
if (type == ol.render.canvas.Instruction.BEGIN_GEOMETRY) {
|
||||||
|
var geometry = /** @type {ol.geom.Geometry} */ (instruction[1]);
|
||||||
|
if (goog.isDef(renderGeometryFunction) &&
|
||||||
|
!renderGeometryFunction(geometry)) {
|
||||||
|
d = /** @type {number} */ (instruction[2]);
|
||||||
|
i = /** @type {number} */ (instruction[3]);
|
||||||
|
} else {
|
||||||
|
++i;
|
||||||
|
}
|
||||||
|
} else if (type == ol.render.canvas.Instruction.BEGIN_PATH) {
|
||||||
context.beginPath();
|
context.beginPath();
|
||||||
++i;
|
++i;
|
||||||
} else if (type == ol.render.canvas.Instruction.CLOSE_PATH) {
|
} else if (type == ol.render.canvas.Instruction.CLOSE_PATH) {
|
||||||
|
|||||||
Reference in New Issue
Block a user