Nit fixes for svg.js
This commit is contained in:
parent
99b08ed223
commit
b6e4ac9070
@ -170,7 +170,7 @@ var convertImgDataToPng = (function convertImgDataToPngClosure() {
|
|||||||
var idat = new Uint8Array(2 + len + deflateBlocks * 5 + 4);
|
var idat = new Uint8Array(2 + len + deflateBlocks * 5 + 4);
|
||||||
var pi = 0;
|
var pi = 0;
|
||||||
idat[pi++] = 0x78; // compression method and flags
|
idat[pi++] = 0x78; // compression method and flags
|
||||||
idat[pi++] = 0x9c; // flags
|
idat[pi++] = 0x9c; // flags
|
||||||
|
|
||||||
var pos = 0;
|
var pos = 0;
|
||||||
while (len > maxBlockLength) {
|
while (len > maxBlockLength) {
|
||||||
@ -976,15 +976,15 @@ var SVGGraphics = (function SVGGraphicsClosure(ctx) {
|
|||||||
},
|
},
|
||||||
|
|
||||||
paintSolidColorImageMask:
|
paintSolidColorImageMask:
|
||||||
function SVGGraphics_paintSolidColorImageMask() {
|
function SVGGraphics_paintSolidColorImageMask() {
|
||||||
var current = this.current;
|
var current = this.current;
|
||||||
var rect = document.createElementNS(NS, 'svg:rect');
|
var rect = document.createElementNS(NS, 'svg:rect');
|
||||||
rect.setAttributeNS(null, 'x', 0);
|
rect.setAttributeNS(null, 'x', 0);
|
||||||
rect.setAttributeNS(null, 'y', 0);
|
rect.setAttributeNS(null, 'y', 0);
|
||||||
rect.setAttributeNS(null, 'width', 1 + 'px');
|
rect.setAttributeNS(null, 'width', 1 + 'px');
|
||||||
rect.setAttributeNS(null, 'height', 1 + 'px');
|
rect.setAttributeNS(null, 'height', 1 + 'px');
|
||||||
rect.setAttributeNS(null, 'fill', current.fillColor);
|
rect.setAttributeNS(null, 'fill', current.fillColor);
|
||||||
this.tgrp.appendChild(rect);
|
this.tgrp.appendChild(rect);
|
||||||
},
|
},
|
||||||
|
|
||||||
paintJpegXObject: function SVGGraphics_paintJpegXObject(objId, w, h) {
|
paintJpegXObject: function SVGGraphics_paintJpegXObject(objId, w, h) {
|
||||||
@ -997,14 +997,14 @@ var SVGGraphics = (function SVGGraphicsClosure(ctx) {
|
|||||||
imgEl.setAttributeNS(null, 'x', 0);
|
imgEl.setAttributeNS(null, 'x', 0);
|
||||||
imgEl.setAttributeNS(null, 'y', -h);
|
imgEl.setAttributeNS(null, 'y', -h);
|
||||||
imgEl.setAttributeNS(null, 'transform', 'scale(' + 1 / w +
|
imgEl.setAttributeNS(null, 'transform', 'scale(' + 1 / w +
|
||||||
' ' + -1 / h + ')');
|
' ' + -1 / h + ')');
|
||||||
|
|
||||||
this.tgrp.appendChild(imgEl);
|
this.tgrp.appendChild(imgEl);
|
||||||
if (current.pendingClip) {
|
if (current.pendingClip) {
|
||||||
this.cgrp.appendChild(this.tgrp);
|
this.cgrp.appendChild(this.tgrp);
|
||||||
this.pgrp.appendChild(this.cgrp);
|
this.pgrp.appendChild(this.cgrp);
|
||||||
} else {
|
} else {
|
||||||
this.pgrp.appendChild(this.tgrp);
|
this.pgrp.appendChild(this.tgrp);
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
|
|
||||||
@ -1019,7 +1019,7 @@ var SVGGraphics = (function SVGGraphicsClosure(ctx) {
|
|||||||
},
|
},
|
||||||
|
|
||||||
paintInlineImageXObject:
|
paintInlineImageXObject:
|
||||||
function SVGGraphics_paintInlineImageXObject(imgData, mask) {
|
function SVGGraphics_paintInlineImageXObject(imgData, mask) {
|
||||||
var current = this.current;
|
var current = this.current;
|
||||||
var width = imgData.width;
|
var width = imgData.width;
|
||||||
var height = imgData.height;
|
var height = imgData.height;
|
||||||
@ -1054,7 +1054,7 @@ var SVGGraphics = (function SVGGraphicsClosure(ctx) {
|
|||||||
},
|
},
|
||||||
|
|
||||||
paintImageMaskXObject:
|
paintImageMaskXObject:
|
||||||
function SVGGraphics_paintImageMaskXObject(imgData) {
|
function SVGGraphics_paintImageMaskXObject(imgData) {
|
||||||
var current = this.current;
|
var current = this.current;
|
||||||
|
|
||||||
var width = imgData.width;
|
var width = imgData.width;
|
||||||
|
Loading…
x
Reference in New Issue
Block a user