With commits 11751, 11752 and 11753 I have added plsdrawmode and plgdrawmode functions to the C PLplot API. These functions allow a PLplot user to determine how the underlying plot device draws the current color. See the PL_MODE_* descriptions below for more detail on the currently implemented drawing modes. Commit 11751 adds two functions, a plot stream struct value, and a few #defines. These functions could potentially be used to deprecate the current XOR drawing API in PLplot, once further driver support is available for these new functions.
For reference, here are the available Cairo drawing/compositing modes: http://cairographics.org/operators/ Here are the Qt4 drawing/compositing modes: http://doc.qt.nokia.com/qq/qq17-compositionmodes.html Commit 11752 adds driver-level support for setting and getting the current drawing mode to the Cairo devices. I checked the Qt 4 documentation to confirm that the Qt drawing API supports a similar set of modes. That said, I'm not familiar enough with using Qt or our Qt devices to be able to implement drawing mode support for Qt devices at this time. I hope that someone else will be able to do so - it should be a fairly straightforward task for someone who knows how their way around the relevant code. Commit 11753 adds a three page C examples which illustrates the three drawing modes which are currently in place. This example will only run if the active plotting device supports setting/getting the drawing mode, so at this point you must use a Cairo device in order to see the output. The currently defined drawing modes are: PL_MODE_DEFAULT: This is the default, and acts exactly the way PLplot has in the past. Page 1 of example 34 uses this mode. The background will show through a transparent drawing color in this mode. This is called OVER in the Cairo API. PL_MODE_REPLACE: This mode replaces existing plot content with the current drawing color. It can be used, for example, to replace a section of a plot with a transparent color. Page 2 of example 34 uses this mode. If the drawing color is opaque then there won't be a difference between this drawing mode and PL_MODE_DEFAULT. This is called SOURCE in the Cairo API. PL_MODE_XOR: I added this as a further example because the Cairo and Qt devices support it. The xwin device could probably be made to support it as well. Adding more modes to the Cairo devices is quite straight forward, and will hopefully be similarly straight foward for the Qt devices once someone implements support for that family. Please provide any comments you may have! If people are happy with this approach then I will flesh out the information in this email and add it to the API documentation. Hez ------------------------------------------------------------------------------ What Every C/C++ and Fortran developer Should Know! Read this article and learn how Intel has extended the reach of its next-generation tools to help Windows* and Linux* C/C++ and Fortran developers boost performance applications - including clusters. http://p.sf.net/sfu/intel-dev2devmay _______________________________________________ Plplot-devel mailing list Plplot-devel@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/plplot-devel