On 2008-04-07 22:07-0400 Hazen Babcock wrote:
> A trivial example (of extcairo):
>
> #include <stdio.h>
>
> #include <cairo.h>
> #include <cairo-ps.h>
>
> #include <plplot.h>
>
> int main(int argc, char *argv[])
> {
> cairo_surface_t *cairoSurface;
> cairo_t *cairoContext;
>
> cairoSurface = cairo_ps_surface_create("test.ps", 720, 540);
> cairoContext = cairo_create(cairoSurface);
>
> plsdev("extcairo");
> plinit();
> pl_cmd(PLESC_DEVINIT, cairoContext);
> plenv(0.0, 1.0, 0.0, 1.0, 1, 0);
> pllab("x", "y", "title");
> plend();
>
> cairo_destroy(cairoContext);
> cairo_surface_destroy(cairoSurface);
> }
>
> Compile with:
> gcc ext-cairo-test.c -o ext-cairo-test `pkg-config --cflags --libs
> plplotd cairo`
Hi Hazen:
I suggest you put the above code and a README.extcairo file concerning the
extcairo device in examples/c as an initial demonstration of what is
possible with the extcairo device. Later if you have time/inclination you
could add more to the example, but it is good to make a start right away
rather than letting this code get lost on this mailing list.
Alan
__________________________
Alan W. Irwin
Astronomical research affiliation with Department of Physics and Astronomy,
University of Victoria (astrowww.phys.uvic.ca).
Programming affiliations with the FreeEOS equation-of-state implementation
for stellar interiors (freeeos.sf.net); PLplot scientific plotting software
package (plplot.org); the libLASi project (unifont.org/lasi); the Loads of
Linux Links project (loll.sf.net); and the Linux Brochure Project
(lbproject.sf.net).
__________________________
Linux-powered Science
__________________________
-------------------------------------------------------------------------
This SF.net email is sponsored by the 2008 JavaOne(SM) Conference
Register now and save $200. Hurry, offer ends at 11:59 p.m.,
Monday, April 7! Use priority code J8TLD2.
http://ad.doubleclick.net/clk;198757673;13503038;p?http://java.sun.com/javaone
_______________________________________________
Plplot-devel mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/plplot-devel