mirror of
https://github.com/flame-engine/flame.git
synced 2025-11-13 11:20:19 +08:00
Enable user-defined Anchors (#675)
* Enable user-defined Anchors * Fix formatting * get toVector2 -> toVector2()
This commit is contained in:
@@ -69,7 +69,7 @@ class Sprite {
|
||||
final drawPosition = position ?? Vector2.zero();
|
||||
final drawSize = size ?? srcSize;
|
||||
|
||||
final delta = anchor.toVector2..multiply(drawSize);
|
||||
final delta = anchor.toVector2()..multiply(drawSize);
|
||||
final drawRect = (drawPosition + delta).toPositionedRect(drawSize);
|
||||
|
||||
final drawPaint = overridePaint ?? paint;
|
||||
|
||||
Reference in New Issue
Block a user