PixmapWidth() and PixmapHeight() functions

BlitzMax Forums/BlitzMax Beginners Area/PixmapWidth() and PixmapHeight() functions

Wayward(Posted 2004) [#1]
After using LoadPixmap(), there are functions provided to obtain the loaded pixmaps pitch, format, and pixel pointer, but there's no direct way of getting its width and height.

One workaround is to load the pixmap as an image instead and use the ImageWidth() and ImageHeight() functions.

Shouldn't there be PixmapWidth() and PixelHeight() functions?


Wayward(Posted 2004) [#2]
If you have an explicit reference to a pixmap:
Bitmap:TPixmap = LoadPixmap( "Bitmap.png" )

You can access the width and height as properties:
Bitmap.width

If instead you use access your pixmap through an integer handle, like this:
Bitmap = LoadPixmap( "Bitmap.png" )

Then you cannot get at the pixmaps width and height.


ImaginaryHuman(Posted 2004) [#3]
Good to know


ImaginaryHuman(Posted 2004) [#4]
Looking through the module code, there is actually a definition for PixmapWidth(), and PixmapHeight().


Wayward(Posted 2004) [#5]
Looking through the module code, there is actually a definition for PixmapWidth(), and PixmapHeight().

Interesting. Perhaps someone forget to document these functions; they aren't in the help files.


ImaginaryHuman(Posted 2004) [#6]
It doesn't seem to tokenise either. Maybe in future it will get activated?