PixmapWidth() and PixmapHeight() functions
BlitzMax Forums/BlitzMax Beginners Area/PixmapWidth() and PixmapHeight() functions
| ||
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? |
| ||
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. |
| ||
Good to know |
| ||
Looking through the module code, there is actually a definition for PixmapWidth(), and PixmapHeight(). |
| ||
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. |
| ||
It doesn't seem to tokenise either. Maybe in future it will get activated? |