How to draw image relatively? #2825
-
For example, if want draw elements in the block or the layout like the grid, what should I do? I know the ebiten.DrawImageOptions struct, but I don't know how to set the original point, every time I call op.GeoM.Reset() the point comes to (0, 0). I hope there a Postion struct construct with const original point, and do the same thing as DrawImageOptions, but the Reset() could recover the original point not (0, 0). In my game I design a simple Pos struct, I want to know whether ebitengine have a similar struct? Whether it is necessary? |
Beta Was this translation helpful? Give feedback.
Replies: 1 comment 3 replies
-
What about op.GeoM.Reset()
op.GeoM.Translate(originalX, originalY) ? |
Beta Was this translation helpful? Give feedback.
You can copy GeoM value and use this.