Skip to content

Commit

Permalink
sprite's pivot should scaled by current costume's bitmapResolution
Browse files Browse the repository at this point in the history
  • Loading branch information
JiepengTan committed Jun 27, 2024
1 parent ea894f5 commit c349c2b
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions spgdi.go
Original file line number Diff line number Diff line change
Expand Up @@ -134,8 +134,8 @@ func (p *spriteDrawInfo) updateMatrix() {
c := p.sprite.costumes[p.sprite.costumeIndex_]

img, centerX, centerY := c.needImage(p.sprite.g.fs)
centerX += p.sprite.pivot.X
centerY -= p.sprite.pivot.Y
centerX += p.sprite.pivot.X * float64(c.bitmapResolution)
centerY -= p.sprite.pivot.Y * float64(c.bitmapResolution)
rect := image.Rectangle{}
rect.Min.X = 0
rect.Min.Y = 0
Expand Down

0 comments on commit c349c2b

Please sign in to comment.