Merge pull request #4523 from ahocevar/render-to-context

Allow rendering geometries to an arbitrary canvas
This commit is contained in:
Andreas Hocevar
2015-12-07 19:13:47 +01:00
6 changed files with 155 additions and 14 deletions

View File

@@ -3796,6 +3796,40 @@ olx.layer.VectorTileOptions.prototype.updateWhileInteracting;
olx.layer.VectorTileOptions.prototype.visible;
/**
* Namespace.
* @type {Object}
*/
olx.render;
/**
* @typedef {{size: (ol.Size|undefined),
* pixelRatio: (number|undefined)}}
* @api
*/
olx.render.ToContextOptions;
/**
* Desired size of the canvas in css pixels. When provided, both canvas and css
* size will be set according to the `pixelRatio`. If not provided, the current
* canvas and css sizes will not be altered.
* @type {ol.Size|undefined}
* @api
*/
olx.render.ToContextOptions.prototype.size;
/**
* Pixel ratio (canvas pixel to css pixel ratio) for the canvas. Default
* is the detected device pixel ratio.
* @type {ol.Size|undefined}
* @api
*/
olx.render.ToContextOptions.prototype.pixelRatio;
/**
* Namespace.
* @type {Object}