ReadonlywidthImage width in pixels, padding included.
ReadonlyheightImage height in pixels, padding included.
ReadonlyscaleReadonlypaddingReadonlyboundsWorld XZ → image pixel. Pass out to avoid an allocation.
Optionalout: { x: number; y: number }Image pixel → world XZ. Pass out to avoid an allocation.
Optionalout: { x: number; z: number }
The world ↔ image mapping a map image uses, plus the pixel size it needs.
Build one with getMapImageTransform (or take the one drawMapImage returns) to place overlays — a camera viewport rectangle, unit pins, a cursor ring — on top of a rendered minimap, and to turn minimap clicks back into world positions.