StarlingGraphics / Starling-Extension-Graphics

flash.display.Graphics style extension for the Starling Flash GPU rendering framework
https://github.com/StarlingGraphics/Starling-Extension-Graphics/wiki
MIT License
282 stars 89 forks source link

Stroke Problem #152

Open yooni126 opened 7 years ago

yooni126 commented 7 years ago

hi i use starling 2 and also use your new extenstion for starling 2 i draw a rectangle with move to & line to codes ::

var points:Point = StaticValues.baseArray.array[0].startPoint; for (var i = 0; i < StaticValues.baseArray.array.length; i++) {

main.bodyShape.graphics.lineStyle(main.lineWidth);

var partI:Part = new Part(StaticValues.baseArray.array[i]);

var points2:Array = StaticValues.baseArray.bodyPoints(partI, main, false);
if (partI.part_select)
{
 main.bodyShape.graphics.beginFill(0x0065b3);
 main.bodyShape.graphics.lineStyle(main.lineWidth);

}
else if (partI.other_part)
{
 main.bodyShape.graphics.beginFill(0x00a0e4);
 main.bodyShape.graphics.lineStyle(main.lineWidth);

}
else
{
 main.bodyShape.graphics.beginFill(0xfefefe);
 main.bodyShape.graphics.lineStyle(main.lineWidth);
}

if (partI.model == PartModels.ARC)
{
 drawArc(main.bodyShape, points2[0], points2[1], points2[2]);
 drawArc(main.bodyShape, points2[3], points2[4], points2[5], true);
 main.bodyShape.graphics.lineTo(points2[0].x, points2[0].y);

}
else if (partI.model == PartModels.FRAME)
{

 main.bodyShape.graphics.moveTo(points2[0].x, points2[0].y);
 main.bodyShape.graphics.lineTo(points2[1].x, points2[1].y);
 main.bodyShape.graphics.lineTo(points2[2].x, points2[2].y);
 main.bodyShape.graphics.lineTo(points2[3].x, points2[3].y);
 main.bodyShape.graphics.lineTo(points2[0].x, points2[0].y);

}
main.bodyShape.graphics.endFill();

}

but when i release my project my rectangle has different stroke ! see this picture please: https://www.dropbox.com/s/c4jhczgz4cffo6g/stroke.png?dl=0 why? how can i solve my problem?