bmap_height (BMAP*)
bmap_width (BMAP*)
Returns the height resp. width of the given bitmap in pixels.
Parameters:
Returns:
Vertical or horizontal size of the original bmap, in pixels.
Speed:
Fast
Remarks:
On irregular sized bitmaps, the size returned is not necessarily identical with the allocated texture size, which is normally adjusted to a power of 2.
Example:
BMAP* splashmap = "logodark.bmp";
PANEL* splashscreen = { bmap = splashmap; }
...
// center the splash screen for non-640x480 resolutions
splashscreen.pos_x = (screen_size.x - bmap_width(splashmap))/2;
splashscreen.pos_y = (screen_size.y - bmap_height(splashmap))/2;
See also:
bmap_for_screen,
screen_size,
bmap_format
► latest
version online