Submitted by Anonymous on Thu, 11/08/2001 - 08:54. Developers
Hi,
I need to zoom a pixmap but unfortunately I don`t know how to do it, and I couldn`t find any information. Have you any suggestion?
You can see the code for the xmag utility, which probably operates by using XGetImage() and expands each pixel to be four pixels while writing into a second image, which is then converted into a pixmap for display. You can`t do much with pixmaps other than what the X protocol supports (creation, destruction, plane manipulation, fills), so you work with X Images; unfortunately, the Image library wasn`t ever finished, so you either work with raw data or use XGetPixel and XPutPixel (http//www.motifzone.com/resources/man/XPutPixel.html) .
For more complex operations such as rotations, see a graphics textbook such as "Fundamentals" by Foley Van Dam.
You can see the code for the xmag utility, which probably operates by using XGetImage() and expands each pixel to be four pixels while writing into a second image, which is then converted into a pixmap for display. You can`t do much with pixmaps other than what the X protocol supports (creation, destruction, plane manipulation, fills), so you work with X Images; unfortunately, the Image library wasn`t ever finished, so you either work with raw data or use XGetPixel and XPutPixel (http//www.motifzone.com/resources/man/XPutPixel.html) .
For more complex operations such as rotations, see a graphics textbook such as "Fundamentals" by Foley Van Dam.
If you have OpenMotif, I would poke through the sources of the XmGetScaledPixmap() function.
-scorch