svg2canvas
Advanced tools
Comparing version 0.0.9 to 0.0.10
@@ -39,3 +39,3 @@ export declare type Color = { | ||
} | ||
export declare function CreateDrawingFromSVG(svg?: XMLDocument): SVGDrawing | undefined; | ||
export declare function CreateDrawingFromSVG(svg?: XMLDocument, globalStyle?: Style): SVGDrawing | undefined; | ||
export {}; |
@@ -0,1 +1,12 @@ | ||
var __assign = (this && this.__assign) || function () { | ||
__assign = Object.assign || function(t) { | ||
for (var s, i = 1, n = arguments.length; i < n; i++) { | ||
s = arguments[i]; | ||
for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p)) | ||
t[p] = s[p]; | ||
} | ||
return t; | ||
}; | ||
return __assign.apply(this, arguments); | ||
}; | ||
var __spreadArrays = (this && this.__spreadArrays) || function () { | ||
@@ -294,3 +305,3 @@ for (var s = 0, i = 0, il = arguments.length; i < il; i++) s += arguments[i].length; | ||
}; | ||
export function CreateDrawingFromSVG(svg) { | ||
export function CreateDrawingFromSVG(svg, globalStyle) { | ||
if (!svg) | ||
@@ -325,3 +336,3 @@ return undefined; | ||
var type = element.nodeName; | ||
var style = parseStyles(element); | ||
var style = __assign(__assign({}, parseStyles(element)), globalStyle); | ||
var shape = Shapes[type]; | ||
@@ -328,0 +339,0 @@ var attributes = shape.attributes.map(function (attribute) { |
{ | ||
"name": "svg2canvas", | ||
"version": "0.0.9", | ||
"version": "0.0.10", | ||
"description": "Library to allow batching and rendering of SVGs onto the canvas EFFICIENTLY. Currently only compatible w/ simple geometry.", | ||
@@ -5,0 +5,0 @@ "keywords": [ |
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
51607
407