Add ol.render.canvas.Instruction.SET_TEXT_STYLE
This commit is contained in:
@@ -36,7 +36,8 @@ ol.render.canvas.Instruction = {
|
|||||||
MOVE_TO_LINE_TO: 8,
|
MOVE_TO_LINE_TO: 8,
|
||||||
SET_FILL_STYLE: 9,
|
SET_FILL_STYLE: 9,
|
||||||
SET_STROKE_STYLE: 10,
|
SET_STROKE_STYLE: 10,
|
||||||
STROKE: 11
|
SET_TEXT_STYLE: 11,
|
||||||
|
STROKE: 12
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|
||||||
@@ -348,6 +349,15 @@ ol.render.canvas.Replay.prototype.replay_ =
|
|||||||
}
|
}
|
||||||
++i;
|
++i;
|
||||||
break;
|
break;
|
||||||
|
case ol.render.canvas.Instruction.SET_TEXT_STYLE:
|
||||||
|
goog.asserts.assert(goog.isString(instruction[1]));
|
||||||
|
goog.asserts.assert(goog.isString(instruction[2]));
|
||||||
|
goog.asserts.assert(goog.isString(instruction[3]));
|
||||||
|
context.font = /** @type {string} */ (instruction[1]);
|
||||||
|
context.textAlign = /** @type {string} */ (instruction[2]);
|
||||||
|
context.textBaseline = /** @type {string} */ (instruction[3]);
|
||||||
|
++i;
|
||||||
|
break;
|
||||||
case ol.render.canvas.Instruction.STROKE:
|
case ol.render.canvas.Instruction.STROKE:
|
||||||
context.stroke();
|
context.stroke();
|
||||||
++i;
|
++i;
|
||||||
|
|||||||
Reference in New Issue
Block a user