var anchorX = controlX + anchorDeltaX;
var anchorY = controlY + anchorDeltaY;
edgeTypeArray.push('C');
- edges.push(controlX, controlY,
- anchorX, anchorY);
+ edges.push(controlX, controlY, anchorX, anchorY);
currentX = anchorX;
currentY = anchorY;
if (minX > controlX) minX = controlX;
if (maxX < anchorX) maxX = anchorX;
if (minY > anchorY) minY = anchorY;
if (maxY < anchorY) maxY = anchorY;
-
}
} else if (first6bits) { // Change (0XXXXX != 000000)
if (edgeTypeArray.length > 0) {
numFillBits = numBits >> 4;
numLineBits = numBits & 0x0f;
}
- if (stateFillStyle0) { //
- if (fillStyle0) {
- fillStyle0 += fillStyleBaseIndex;
- }
+ if (stateFillStyle0 && fillStyle0) {
+ fillStyle0 += fillStyleBaseIndex;
}
- if (stateFillStyle1) {
- if (fillStyle1) {
- fillStyle1 += fillStyleBaseIndex;
- }
+ if (stateFillStyle1 && fillStyle1) {
+ fillStyle1 += fillStyleBaseIndex;
}
- if (stateLineStyle) {
- if (lineStyle) {
- lineStyle += lineStyleBaseIndex;
- }
+ if (stateLineStyle && lineStyle) {
+ lineStyle += lineStyleBaseIndex;
}
edgeTypeArray = [];
edges = [currentX, currentY];
shapeRecords.push(
{fillStyle0:fillStyle0, fillStyle1:fillStyle1, lineStyle:lineStyle,
edgeTypes:edgeTypeArray.join(''), edges:edges,
- minX:minX, maxX: maxX, minY:minY, maxY:maxY }
- );
+ minX:minX, maxX: maxX, minY:minY, maxY:maxY});
}
return shapeRecords;
};