@leapfrog/interactive-canvas 1.6.0 → 1.7.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
|
@@ -3093,11 +3093,11 @@ var AbstractInteractiveCanvas = /** @class */ (function () {
|
|
|
3093
3093
|
* @override
|
|
3094
3094
|
* @inheritDoc
|
|
3095
3095
|
*/
|
|
3096
|
-
AbstractInteractiveCanvas.prototype.toImage = function () {
|
|
3096
|
+
AbstractInteractiveCanvas.prototype.toImage = function (multiplier) {
|
|
3097
3097
|
var _this = this;
|
|
3098
3098
|
var options = {
|
|
3099
3099
|
format: "png",
|
|
3100
|
-
multiplier: this.IMAGE_CAPTURE_COEFFICIENT,
|
|
3100
|
+
multiplier: multiplier || this.IMAGE_CAPTURE_COEFFICIENT,
|
|
3101
3101
|
enableRetinaScaling: true
|
|
3102
3102
|
};
|
|
3103
3103
|
console.debug("Capturing canvas image", options);
|
|
@@ -219,8 +219,9 @@ export interface IInteractiveCanvas {
|
|
|
219
219
|
toSvg(): string;
|
|
220
220
|
/**
|
|
221
221
|
* Export the canvas to a DataUrl image.
|
|
222
|
+
* @param multiplier Multiply the image pixel density by this amount.
|
|
222
223
|
*/
|
|
223
|
-
toImage(): string;
|
|
224
|
+
toImage(multiplier?: number): string;
|
|
224
225
|
/**
|
|
225
226
|
* Notify the canvas that the object list has changed.
|
|
226
227
|
*/
|
|
@@ -3093,11 +3093,11 @@ var AbstractInteractiveCanvas = /** @class */ (function () {
|
|
|
3093
3093
|
* @override
|
|
3094
3094
|
* @inheritDoc
|
|
3095
3095
|
*/
|
|
3096
|
-
AbstractInteractiveCanvas.prototype.toImage = function () {
|
|
3096
|
+
AbstractInteractiveCanvas.prototype.toImage = function (multiplier) {
|
|
3097
3097
|
var _this = this;
|
|
3098
3098
|
var options = {
|
|
3099
3099
|
format: "png",
|
|
3100
|
-
multiplier: this.IMAGE_CAPTURE_COEFFICIENT,
|
|
3100
|
+
multiplier: multiplier || this.IMAGE_CAPTURE_COEFFICIENT,
|
|
3101
3101
|
enableRetinaScaling: true
|
|
3102
3102
|
};
|
|
3103
3103
|
console.debug("Capturing canvas image", options);
|