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

Fatal error: The application lost the device context! when the phone rotate #123

Closed pol2095 closed 8 years ago

pol2095 commented 9 years ago

Hello,

I have a "Fatal error: The application lost the device context!" when my Android phone (Nexus 5) rotate

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

Thanks

tuncay commented 9 years ago

Starling.handleLostContex=true or something like that.

Sent from my iPhone

On 27 Eki 2014, at 19:42, pol2095 notifications@github.com wrote:

Hello,

I have a "Fatal error: The application lost the device context!" when the phone rotate

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();

Thanks

— Reply to this email directly or view it on GitHub.

pol2095 commented 9 years ago

If Starling.handleLostContex=true, my shape is lost when I rotate my phone.

pol2095 commented 9 years ago

When I compile the swc it work

I have 2 warnings : Starling-Extension-Graphics-master\extension\src\starling\display\graphicsEx\GraphicsEx.as:293 Warning: variable definition duplicates function parameter: numVerts. var numVerts:int = endIndex - startIndex;

Starling-Extension-Graphics-master\extension\src\starling\display\graphicsEx\GraphicsEx.as:364 Warning: variable definition duplicates function parameter: numVerts. var numVerts:int = endIndex - startIndex;

IonSwitz commented 8 years ago

A fix for this has been submitted