Closed PierceNg closed 1 year ago
Sounds like a valid use case, I'll sneak this in last minute for 3.3.
I added dw_pixmap_get_width() and dw_pixmap_get_height() to provide the same function as DW_PIXMAP_WIDTH() and DW_PIXMAP_HEIGHT() macros via APIs. I made the new C++ bindings use it instead of the macros so I could test the functionality. Everything seems to work after fixing a build error on OS/2. Let me know if this works for you.
Thank you. I used the functions in my Pascal test program that does buffered drawing via HPIXMAPs like how your dwtest
does it. Works on GTK3 and Android. All good.
Awesome glad to hear it! :)
C and C++ code can use macros
DW_PIXMAP_WIDTH
andDW_PIXMAP_HEIGHT
but foreign language bindings cannot. As structure of HPIXMAP is platform-dependent, it is best for language bindings to treat HPIXMAP as an opaque pointer. Hence functions to return a pixmap's width and height are needed.