XpSetImageResolution(3Xp)
XpSetImageResolution(3Xp) π
okay so bestie, welcome to the XPRINT FUNCTIONS corner of the X11 universe π«Ά this page is all about XpSetImageResolution, the little function that handles image resolution before your PutImage requests. it's giving βvery specific job, very important vibes,β no cap β¨
β¨ NAME β¨
XpSetImageResolution β sets the resolution for subsequent PutImage requests. that's the whole name tea π
π οΈ SYNOPSIS π οΈ
compile situation:
cc [ flag... ] file... -lXp [ library... ]
#include <X11/extensions/Print.h>
function signature, bestie:
Bool XpSetImageResolution ( display, print_context, image_res,
prev_res_return )
Display * display ;
XPContext print_context ;
int image_res ;
int * prev_res_return ;
πΈ ARGUMENTS πΈ
displayβ a pointer to theDisplaystructure. literally the display hookup π«Άprint_contextβ the print context on which to set the resolution. that's the context getting this whole resolution moment πimage_resβ the image resolution in pixels per inch. the number that controls the scaling vibe β¨prev_res_returnβ returns the previous image resolution in pixels per inch. it's the βwhat was it before?β receipt π
π DESCRIPTION π
XpSetImageResolution returns True if the printer server allowed the resolution to be set, otherwise False is returned. simple as that, bestie π
XpSetImageResolution sets the resolution for subsequent PutImage requests to the screen of the specified print context. If the return value is False, then the print server does not support image scaling for the particular resolution given the current configuration of the printer, and the application is responsible for any desired scaling. if it's False, you're on your own for scaling β no cap π
If the return value is True, then the contents of any subsequent PutImage request to a Pixmap or to a Window on the screen of the specified print context will automatically be scaled as part of the PutImage request. the scale factor is:
default_printer_resolution / image_res
Where default_printer_resolution is the current value of that page attribute. and listen β only the image itself is scaled (meaning the effective width and height of the image change), the dst-x and dst-y parameters to PutImage are not altered. the image changes size, the destination coords do not. periodt π
As a special case, a value of zero for image_res resets the resolution to automatically track the printer resolution; in this case (which is also the default setting for a newly created print context), subsequent images will not be scaled. zero is the βjust vibe with the printerβ setting π¦
If the return value is True and prev_res_return is a non-NULL pointer, then the previous image resolution that was set for the print context is stored in prev_res_return. cute little receipt for the previous setting β¨
XpSetImageResolution returns False immediately if image_res is negative or greater than 65535. those numbers are not it, bestie β immediate False π
π DIAGNOSTICS π
XpBadContextβ A valid print context-id has not been set prior to making this call. if you see this, the context is not contexting, and you need a valid print context-id first π
later, bestie! π«Ά this page is from X Version 11 / libXp 1.0.4, and the footer date slot is literally not printed here β that's the whole sign-off vibe, and it ate π
π¦ where this page comes from
- arch rolling: libxp 1.0.4-3 Β· X11 AND X11-distribute-modifications-variant
- nixos 26.05: libxp 1.0.4
- nixpkgs unstable: libxp 1.0.4
- opensuse-leap 16.0: libXp-devel 1.0.4-bp160.1.12 Β· MIT
- opensuse-leap 16.0: libXp-devel 1.0.4-bp160.1.12 Β· MIT
- opensuse-leap 16.0: libXp-devel 1.0.4-bp160.1.12 Β· MIT
- opensuse-leap 16.0: libXp-devel 1.0.4-bp160.1.12 Β· MIT
- Copyright 1996 Hewlett-Packard Company
- Copyright 1996 International Business Machines Corp
- Copyright 1996, 1999, 2004, Oracle and/or its affiliates. All rights reserved
- Copyright 1996 Novell, Inc
- Copyright 1996 Digital Equipment Corp
- Copyright 1996 Fujitsu Limited
- Copyright 1996 Hitachi, Ltd
- Copyright 1996 X Consortium, Inc
- π girlified by deepseek-ai/DeepSeek-V4.1-Flash-1017 on : a language model's rewrite of the original, under its terms