Re: Mapping Xt/Motif Widgets to an offscreen Pixmap
- From: Danny Backx <danny.backx@xxxxxxxxxxxxxxxxx>
- Date: Sun, 24 Jul 2005 16:37:57 +0200
The X Printing servers basically implement this - using
your third idea below.
My X is currently set up such that a Xprt is started, and
its identity is fed into the shell environment via
/etc/profile.d/xprint.sh which initialises $XPSERVERLIST,
usually to a value such as ":33".
That is then the display you can connect to in your
application (apart from your real display, that is), to
do stuff such as printing.
The source to Xinvest contains code that does this. See
http://xinvest.sunsite.dk .
Danny
On Mon, 11 Jul 2005 13:25:59 -0700, madgoat wrote:
> I am creating an application that needs to take screenshots of
> Xt/Motif Widgets that are built on the fly. All I need is an image, so
> I don't need to map them to a physical display (I'd actually rather
> avoid that). Ideally I would like Xt/Motif to draw everything into a
> Pixmap that I could then manipulate with Xlib routines to get what I
> need, but I cannot find any way to alter the Drawable associated with
> Xt Widgets.
>
> Short of tricking Xt into doing that, there are other possibilities
> that I feel achieve the same thing, but may vary in difficulty of
> implementation:
>
> * Create the shell containing the widget(s) off the visible area of
> the Screen (ie. negative values for x and y, a little investigation got
> XGetImage to return null, however)
> * Create a non-physical Screen on the Display and set the Screen of
> the shell to that, the idea being trick X into thinking it has more
> screens that it really does and the behavior would be like having
> another monitor that is always turned off, the user wouldn't notice
> what I was doing on it.
> * Create another X Server that is not connected to a frame buffer,
> connect Xt to that and the rest of my application to the real display
> and copy images between them.
>
> I would like to take the route of least resistance, so to speak, I'd
> like to avoid changing the X server configuration if at all possible,
> but if not I am open to that.
>
> Thanks,
> Aaron Reffett
--
Danny Backx - danny.backx-at-scarlet.be
.
- References:
- Mapping Xt/Motif Widgets to an offscreen Pixmap
- From: madgoat
- Mapping Xt/Motif Widgets to an offscreen Pixmap
- Prev by Date: Problem with colormap in XmDragStart
- Previous by thread: Mapping Xt/Motif Widgets to an offscreen Pixmap
- Next by thread: core dump when using gadgets on linux systems
- Index(es):
Relevant Pages
|