We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Related AwayFL.
getBounds return twice scaled bounds rectangle when Sprite is scaled.
getBounds
AS3 test code:
import flash.display.Sprite; import flash.utils.Timer; import flash.events.TimerEvent; import flash.display.MovieClip; import flash.geom.Point; var node: Sprite = new Sprite(); var dot: Sprite = new Sprite(); var bounds: Sprite = new Sprite(); bounds.graphics.lineStyle(2, 0x0000ff); addChild(node); addChild(dot); addChild(bounds); dot.x = 100; dot.y = 0; dot.graphics.beginFill(0x0); dot.graphics.drawCircle(0,0, 10); node.scaleX = 0.5; node.scaleY = 0.5; node.graphics.beginFill(0x00ff00); node.graphics.drawCircle(0,0, 100); node.x = 275; node.y = 200; const t: Timer = new Timer(500); var p0; var p1; t.addEventListener(TimerEvent.TIMER, function(e: *) { node.rotation += 45; var pos = node.localToGlobal(new Point(100,0)); dot.x = pos.x; dot.y = pos.y; var r = node.getBounds(null); p0 = new Point(r.x,r.y); p1 = new Point(r.x + r.width, r.y + r.height); p0 = node.localToGlobal(p0); p1 = node.localToGlobal(p1); bounds.graphics.clear(); bounds.graphics.lineStyle(2, 0x0000ff); bounds.graphics.drawRect(p0.x, p0.y, p1.x - p0.x, p1.y - p0.y); }) t.start();
The text was updated successfully, but these errors were encountered:
No branches or pull requests
Related AwayFL.
getBounds
return twice scaled bounds rectangle when Sprite is scaled.AS3 test code:
The text was updated successfully, but these errors were encountered: