XMGETSCALEDPIXMAP(3)
π XmGetScaledPixmap β the library call, but make it fashion π
okay so bestie, today we're talking about XmGetScaledPixmap, a library call, and no it's not just "another pixmap function," it's the one that actually respects your printer's resolution. it's giving thoughtful. it's giving considerate. it's giving π
β¨ NAME β¨
XmGetScaledPixmap β read a pixmap file and scale it according to pixmap and print resolution π
πΈ SYNOPSIS πΈ
#include <Xm/Xm.h>
XtEnum XmGetScaledPixmap(
Widget widget,
String image_name,
Pixel foreground,
Pixel background,
int depth,
Double scaling_ratio);
π¦ DESCRIPTION π¦
okay so here's the tea β. XmGetScaledPixmap takes its Widget argument and goes looking up the family tree for a Print Shell ancestor, so it can grab the pixmap resolution and the default printer resolution info β and those are the ones it's gonna use if scaling_ratio == 0. lowkey iconic behavior honestly.
So if the scaling is 0, and there's a valid PrintShell sitting up there in the ancestor chain, XmGetScaledPixmap applies a ratio that equals:
(printer resolution / default pixmap resolution)
β¦and it does all that before creating the Pixmap on the widget's Screen. periodt. π
Otherwise β if we're not in the scaling-is-0 situation β the scaling_ratio you passed in gets used to scale both dimensions of the image being converted as a Pixmap. both of them. no half-measures. π«Ά
And here's the glow-up: XmGetScaledPixmap completes the existing XmGetPixmapByDepth API by making use of the XmNdefaultPixmapResolution of the rooting XmPrintShell. so if you want the full deets, go read the XmGetPixmapByDepth documentation, bestie β it's all there. πβ¨
π the arguments, one by one π
widgetβ the Widget used to determine the default pixmap resolution (of the print shell ancestor). it's the one doing the ancestor-hunting. main character energy fr fr. πimage_nameβ seeXmGetPixmapByDepthfor description.foregroundβ seeXmGetPixmapByDepthfor description.backgroundβ seeXmGetPixmapByDepthfor description.depthβ seeXmGetPixmapByDepthfor description.scaling_ratioβ indicates the scaling ratio to be applied, or0. that's it, that's the whole job. π
π RETURN VALUE π
Returns Pixmap, or NULL if it failed. π so likeβ¦ check it. always check it. ngl that's just good manners.
π₯ ERRORS/WARNINGS π₯
Same as for XmGetPixmapByDepth. that's the whole warning section, babes β go look at the other page if you need the full list. π
π SEE ALSO π
and that's the whole page, bestie!! πβ¨ this was XmGetScaledPixmap(library call) β the library-call era of the manual, no cap. go forth and scale your pixmaps responsibly. mwah π«Άππ¦
π¦ where this page comes from
- alpine 3.24: motif-doc 2.5.2-r0 Β· LGPL-2.1-or-later
- arch rolling: openmotif 2.3.8-4 Β· LGPL-2.1-or-later
- centos-stream 9: motif-devel 2.3.4-32.el9 Β· LGPLv2+
- centos-stream 9: motif-devel 2.3.4-32.el9 Β· LGPLv2+
- epel 10: motif-devel 2.3.8-2.el10_2 Β· LicenseRef-Callaway-LGPLv2+
- fedora 43: motif-devel 2.3.8-1.fc43 Β· LicenseRef-Callaway-LGPLv2+
- fedora 43: motif-devel 2.3.8-1.fc43 Β· LicenseRef-Callaway-LGPLv2+
- fedora 43: motif-devel 2.3.8-2.fc43 Β· LicenseRef-Callaway-LGPLv2+
- fedora 43: motif-devel 2.3.8-2.fc43 Β· LicenseRef-Callaway-LGPLv2+
- fedora 44: motif-devel 2.3.8-3.fc44 Β· LicenseRef-Callaway-LGPLv2+
- fedora 44: motif-devel 2.3.8-3.fc44 Β· LicenseRef-Callaway-LGPLv2+
- nixos 26.05: motif 2.3.8
- nixpkgs unstable: motif 2.3.8
- opensuse-leap 16.0: motif-devel 2.3.8-bp160.1.1 Β· LGPL-2.1-or-later
- opensuse-leap 16.0: motif-devel 2.3.8-bp160.1.1 Β· LGPL-2.1-or-later
- opensuse-leap 16.0: motif-devel 2.3.8-bp160.1.1 Β· LGPL-2.1-or-later
- opensuse-leap 16.0: motif-devel 2.3.8-bp160.1.1 Β· LGPL-2.1-or-later
- π girlified by deepseek-ai/DeepSeek-V4.1-Flash on : a language model's rewrite of the original, under its terms