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

Graphics border top left corner is missing #122

Closed vpmedia closed 9 years ago

vpmedia commented 9 years ago

Hi,

The following simple code produces a series of rectangle borders, but a part from the top left corner is missing everywhere:

    var border:Shape = new Shape();
    addChild(border);
    border.x = border.y = 20;
    border.graphics.lineStyle(4, 0xFFFFFF, 1);
    border.graphics.drawRect(0, 0, 150, 150);
    border.graphics.endFill();

    border.graphics.lineStyle(10, 0xFFFFFF, 1);
    border.graphics.drawRect(200, 0, 50, 50);
    border.graphics.endFill();

    var borderWithFill:Shape = new Shape();
    addChild(borderWithFill);
    borderWithFill.x = 20;
    borderWithFill.y = 200;
    borderWithFill.graphics.lineStyle(4, 0xFFFFFF, 1);
    borderWithFill.graphics.beginFill(0xFF0000);
    borderWithFill.graphics.drawRect(0, 0, 150, 150);
    borderWithFill.graphics.endFill();

Please take a look at the render screenshot: https://dl.dropboxusercontent.com/u/1375050/starling-graphics.png (I'm using the last git version of Starling)

Thanks!

IonSwitz commented 9 years ago

Please see the following issue:

https://github.com/StarlingGraphics/Starling-Extension-Graphics/issues/109

However, I believe that drawRect is fundamentally broken and should be fixed using the code mentioned in issue 109. I will fix this.

IonSwitz commented 9 years ago

This has now been fixed, see note in #109

vpmedia commented 9 years ago

Thank you!