b2dGetImageWidth

Queries image width in pixels (returns full texture width, not frame width for anim images). Takes imageHandle (image handle from b2dLoadImage/b2dLoadAnimImage, positive integer). Returns width in pixels (positive integer, 0 if handle invalid).

2D Overlay

Parameters & Returns

Parameters

imageHandle Int

Returns

Int

Quick Summary

Queries image width in pixels (returns full texture width, not frame width for anim images). Takes imageHandle (image handle from b2dLoadImage/b2dLoadAnimImage, positive integer). Returns width in pixels (positive integer, 0 if handle invalid).

Technical Exegesis...

Queries image width in pixels (returns full texture width, not frame width for anim images). Takes imageHandle (image handle from b2dLoadImage/b2dLoadAnimImage, positive integer). Returns width in pixels (positive integer, 0 if handle invalid). Reads image.width from g_images map (original texture dimensions from file). Use to query dimensions (layout calculations, collision detection, scaling), center images (calculate position offset), or validate sizes (check image loaded correctly).

Example

Example.bam
; No example implemented yet