Ricchetti, Andrea wrote: > Hi to all, > > > > I’m a new user of your library. I’m not sure if is the correct way to > ask a question, so sorry me if is not the right way. > > > > I’m using your library on Linux. > > I’ve build it using CMake and I’ve put the correct linker information on > my makefile in this way: > > > > LDXXFLAGS = `pkg-config --libs cairo fontconfig freetype2 pango > pangocairo pangoft2 plplotd plplotd-c++` -lpixman-1 -lfreetype -lpng > -lexpat -lz -lm -L/usr/lib/nptl -lpthread -static -lplplotcxxd –lplplotd > > > > And > > > > CCFLAGS = -O0 -march=i686 -ggdb -Wall \ > > `pkg-config --cflags cairo pangocairo plplotd > plplotd-c++` \ > > $(DBGFLAG) -I$(main_dir) -I$(common_dir) > -I$(config_dir) > > > > In this way all work correct. > > > > I’d like to know how can I get the memory buffer of the working area. > > I’m using the library on an embedded pc and I’m using the frame buffer > (in a direct way with memcpy() ) to show image. At the moment for > plotting chart I have to generate a png, read it and put it on the screen. > > Is there a better way? > > I know that using cairo or pango cairo, with the function > *cairo_image_surface_get_data() *I’ll get a memory buffer that I can put > on the screen. Is there a function or something else that give me the > memory buffer in your library?
I have two suggestions: (1) Use the extcairo driver. There is a pretty simplistic example of how to use it in plplot/example/c called "ext-cairo-test.c". With this driver your program provides the cairo image surface for PLplot to render the plot in. Since you "own" the surface you can then call cairo_image_surface_get_data() if that is your preferred way of rendering the plot onto the screen. (2) Use the memcairo driver. This will plot directly into a memory buffer that you provide (using the function plsmem() I believe). Unfortunately I don't think there are any examples of how to use this driver and it is not enabled by default so you'd have to recompile PLplot to get access to it. -Hazen ------------------------------------------------------------------------------ Download Intel® Parallel Studio Eval Try the new software tools for yourself. Speed compiling, find bugs proactively, and fine-tune applications for parallel performance. See why Intel Parallel Studio got high marks during beta. http://p.sf.net/sfu/intel-sw-dev _______________________________________________ Plplot-general mailing list [email protected] https://lists.sourceforge.net/lists/listinfo/plplot-general
