Add MultiLineString drawing to batch

This commit is contained in:
Tom Payne
2013-11-08 03:05:38 +01:00
parent 91c448d63d
commit 7594f05c57
2 changed files with 29 additions and 0 deletions

View File

@@ -189,6 +189,26 @@ ol.replay.canvas.Batch.prototype.drawLineStringGeometry =
};
/**
* @inheritDoc
*/
ol.replay.canvas.Batch.prototype.drawMultiLineStringGeometry =
function(multiLineStringGeometry) {
goog.asserts.assert(!goog.isNull(this.state_));
var coordinatess = multiLineStringGeometry.getCoordinatess();
var i, ii;
for (i = 0, ii = coordinatess.length; i < ii; ++i) {
this.beginPath_();
var end = this.appendCoordinates_(coordinatess[i], false);
this.instructions_.push({
type: ol.replay.canvas.InstructionType.MOVE_TO_LINE_TO,
argument: end
});
}
this.state_.strokePending = true;
};
/**
* @inheritDoc
*/

View File

@@ -32,6 +32,15 @@ ol.replay.IBatch.prototype.drawLineStringGeometry =
};
/**
* @param {ol.geom.MultiLineString} multiLineStringGeometry
* Multi line string geometry.
*/
ol.replay.IBatch.prototype.drawMultiLineStringGeometry =
function(multiLineStringGeometry) {
};
/**
* @param {ol.geom.Polygon} polygonGeometry Polygon geometry.
*/