[GRASS-dev] [GRASS GIS] #1719: GRASS 7 Monitor command line support
GRASS GIS
trac at osgeo.org
Tue Sep 11 03:57:12 PDT 2012
#1719: GRASS 7 Monitor command line support
-------------------------+--------------------------------------------------
Reporter: annalisapg | Owner: grass-dev@…
Type: enhancement | Status: new
Priority: normal | Milestone: 7.0.0
Component: wxGUI | Version: svn-trunk
Keywords: d.mon | Platform: Unspecified
Cpu: Unspecified |
-------------------------+--------------------------------------------------
Comment(by glynn):
Replying to [comment:17 wenzeslaus]:
> Can be wxBitmap used for what you are talking about? It is the same as X
Pixmap on linux?
Not entirely. The data for an X Pixmap resides within the X server. On the
client side, a Pixmap is just an XID (a 32-bit integer identifying a
server-side resource).
For X11-based versions of wxWidgets, a wxBitmap probably has an associated
Pixmap, but I can't see any way to get at it, or to create a wxBitmap for
an existing Pixmap.
> But how would be this bitmap/pixmap transfered from d.* module to wxGUI
application?
If GRASS_PNGFILE ends in ".xid", the cairo driver will use the XRender
back-end, and will write the XID of the underlying Pixmap to the file
specified by $GRASS_PNGFILE. It will also call XSetCloseDownMode(dpy,
RetainTemporary), which results in server-side resource being retained
when the X connection is closed.
Another program can read the XID from this file, and use it with any Xlib
function expecting a Pixmap or Drawable argument. E.g. g.cairocomp uses
cairo_xlib_surface_create_with_xrender_format(), which takes the XID of an
existing Drawable as an argument [http://www.cairographics.org/manual
/cairo-XLib-XRender-Backend.html#cairo-xlib-surface-create-with-xrender-
format Link].
Thus, the d.* module creates the Pixmap on the X server and leaves it
there for other programs to use.
--
Ticket URL: <https://trac.osgeo.org/grass/ticket/1719#comment:20>
GRASS GIS <http://grass.osgeo.org>
More information about the grass-dev
mailing list