XMSTRINGDRAWIMAGE(3)
π XmStringDrawImage π
okay so bestie, welcome to XmStringDrawImage β she's a compound string function from the Xm library (a library call, fr), and what she does is draw a compound string in an X Window and create an image. both. at once. she's doing the most and honestly? we love that for her. π
β¨ SYNOPSIS β¨
#include <Xm/Xm.h>
void XmStringDrawImage(
Display * d,
Window w,
XmRenderTable rendertable,
XmString string,
GC gc,
Position x,
Position y,
Dimension width,
unsigned char alignment,
unsigned char layout_direction,
XRectangle * clip);
π DESCRIPTION π
so XmStringDrawImage draws a compound string in an X Window, and it paints both the foreground and the background bits of each character. like, the whole look. the full lewk. β¨
π¨ okay now listen, this part is important, do not skip it π¨
If a compound string segment uses a rendition that contains a font set, then the graphic context you pass to this routine will have its GC font member left in an undefined state. π The underlying XmbStringDraw function that this routine calls modifies the font ID field of the GC you passed in, and it does not attempt to restore the font ID to the incoming value. it's giving chaotic, but that's just how she is.
If the compound string segment is not drawn using a font set, then the graphic context must contain a valid font member. no font, no vibes, no draw. π«Ά
π ALSO: graphic contexts created byXtGetGCare not accepted by this routine. do not do it. instead, useXtAllocateGCto create a graphic context. periodt.
here's the full rundown of what you're feeding her:
dβ Specifies the display. π₯οΈwβ Specifies the window. πͺrendertableβ Specifies the render table. π¨stringβ Specifies the string. π€gcβ Specifies the graphics context to use. ποΈxβ Specifies a coordinate of the rectangle that will contain the displayed compound string. πyβ Specifies a coordinate of the rectangle that will contain the displayed compound string. πwidthβ Specifies the width of the rectangle that will contain the displayed compound string. πalignmentβ Specifies how the string will be aligned within the specified rectangle. It is eitherXmALIGNMENT_BEGINNING,XmALIGNMENT_CENTER, orXmALIGNMENT_END. β¬ οΈ βοΈ β‘οΈlayout_directionβ Controls the direction in which the segments of the compound string will be laid out. It also determines the meaning of thealignmentparameter. π§ (iykyk β the alignment one only makes sense once you know which way you're going)clipβ Allows the application to restrict the area into which the compound string will be drawn. IfNULL, clipping will be determined by the GC. βοΈ
π RELATED π
and that's the whole page, bestie!! π¦ this lil icon came to you straight out of the Xm library, and yeah she's officially listed as a library call β that's the source/version sitch, no cap. go draw something gorgeous with her, and pls pls pls remember the XtAllocateGC thing. 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