From: <ai...@us...> - 2009-04-20 19:35:14
|
Revision: 9824 http://plplot.svn.sourceforge.net/plplot/?rev=9824&view=rev Author: airwin Date: 2009-04-20 19:34:54 +0000 (Mon, 20 Apr 2009) Log Message: ----------- Incorporate into the installed examples tree and tests some examples demonstrating how to use the PLplot xcairo and extcairo to draw into an externally supplied XDrawable or Cairo context. N.B. ext-cairo-test builds fine, but has run-time issues (no glyphs show at all in the test.ps result and a 177 error code is returned) so I leave the extcairo device driver disabled by default. Modified Paths: -------------- trunk/cmake/modules/cairo.cmake trunk/examples/c/CMakeLists.txt trunk/examples/c/Makefile.examples.in trunk/plplot_test/plplot-test-interactive.sh.in Modified: trunk/cmake/modules/cairo.cmake =================================================================== --- trunk/cmake/modules/cairo.cmake 2009-04-20 19:23:35 UTC (rev 9823) +++ trunk/cmake/modules/cairo.cmake 2009-04-20 19:34:54 UTC (rev 9824) @@ -155,3 +155,11 @@ OR PLD_xcairo OR PLD_extcairo ) + +if(NOT PLD_xcairo) + set(extXdrawable_true "#") +endif(NOT PLD_xcairo) + +if(NOT PLD_extcairo) + set(extcairo_true "#") +endif(NOT PLD_extcairo) Modified: trunk/examples/c/CMakeLists.txt =================================================================== --- trunk/examples/c/CMakeLists.txt 2009-04-20 19:23:35 UTC (rev 9823) +++ trunk/examples/c/CMakeLists.txt 2009-04-20 19:34:54 UTC (rev 9824) @@ -88,7 +88,19 @@ ) endif(ENABLE_gnome2) -install(FILES ${c_SRCS} ${plplotcanvas_SRCS} ${plplotcanvas_DOCS} +if(PLD_xcairo) + set(extXdrawable_SRC extXdrawable_demo.c) +endif(PLD_xcairo) + +if(PLD_extcairo) + set(extcairo_SRC ext-cairo-test.c) +endif(PLD_extcairo) + +if(PLD_xcairo OR PLD_extcairo) + set(cairo_DOCS README.cairo) +endif(PLD_xcairo OR PLD_extcairo) + +install(FILES ${c_SRCS} ${plplotcanvas_SRCS} ${plplotcanvas_DOCS} ${extXdrawable_SRC} ${extcairo_SRC} ${cairo_DOCS} DESTINATION ${DATA_DIR}/examples/c ) Modified: trunk/examples/c/Makefile.examples.in =================================================================== --- trunk/examples/c/Makefile.examples.in 2009-04-20 19:23:35 UTC (rev 9823) +++ trunk/examples/c/Makefile.examples.in 2009-04-20 19:34:54 UTC (rev 9824) @@ -32,6 +32,12 @@ @gcw_true@ plplotcanvas_demo$(EXEEXT) \ @gcw_true@ plplotcanvas_animation$(EXEEXT) +@extXdrawable_true@@pkg_config_true@extXdrawable_EXECUTABLES_list = \ +@extXdrawable_true@@pkg_config_true@ extXdrawable_demo$(EXEEXT) + +@extcairo_true@@pkg_config_true@extcairo_EXECUTABLES_list = \ +@extcairo_true@@pkg_config_true@ ext-cairo-test$(EXEEXT) + EXECUTABLES_list = \ x01c$(EXEEXT) \ x02c$(EXEEXT) \ @@ -64,7 +70,9 @@ x29c$(EXEEXT) \ x30c$(EXEEXT) \ x31c$(EXEEXT) \ - $(PLPLOTCANVAS_EXECUTABLES_list) + $(PLPLOTCANVAS_EXECUTABLES_list) \ + $(extXdrawable_EXECUTABLES_list) \ + $(extcairo_EXECUTABLES_list) all: $(EXECUTABLES_list) @@ -85,6 +93,14 @@ @gcw_true@@pkg_config_false@ $@ `plplot-config --cflags --libs --with-gcw` \ @gcw_true@@pkg_config_false@ @GCWTHREAD_CFLAGS@ @GCWTHREAD_LIBS@ +@extXdrawable_true@@pkg_config_true@extXdrawable_demo$(EXEEXT): extXdrawable_demo.c +@extXdrawable_true@@pkg_config_true@ $(CC) $< -o $@ $(RPATHCMD) \ +@extXdrawable_true@@pkg_config_true@ `$(PKG_CONFIG_ENV) pkg-config --cflags --libs plplot$(LIB_TAG) gtk+-x11-2.0` + +@extcairo_true@@pkg_config_true@ext-cairo-test$(EXEEXT): ext-cairo-test.c +@extcairo_true@@pkg_config_true@ $(CC) $< -o $@ $(RPATHCMD) \ +@extcairo_true@@pkg_config_true@ `$(PKG_CONFIG_ENV) pkg-config --cflags --libs plplot$(LIB_TAG) cairo` + .c$(EXEEXT): @pkg_config_true@ $(CC) $< -o $@ $(RPATHCMD) `$(PKG_CONFIG_ENV) pkg-config --cflags --libs plplot$(LIB_TAG)` @pkg_config_false@ $(CC) $< -o $@ `plplot-config --cflags --libs` Modified: trunk/plplot_test/plplot-test-interactive.sh.in =================================================================== --- trunk/plplot_test/plplot-test-interactive.sh.in 2009-04-20 19:23:35 UTC (rev 9823) +++ trunk/plplot_test/plplot-test-interactive.sh.in 2009-04-20 19:34:54 UTC (rev 9824) @@ -47,6 +47,20 @@ INDEX_LIST= COUNT=0 +if [ "@PLD_xcairo@" = "ON" ] ; then + INDEX_LIST="$INDEX_LIST $COUNT" + DIRECTORY[$COUNT]="c" + COMMAND[$COUNT]="./extXdrawable_demo" + COUNT=$(( $COUNT + 1 )) +fi + +if [ "@PLD_extcairo@" = "ON" ] ; then + INDEX_LIST="$INDEX_LIST $COUNT" + DIRECTORY[$COUNT]="c" + COMMAND[$COUNT]="./ext-cairo-test" + COUNT=$(( $COUNT + 1 )) +fi + if [ "@ENABLE_wxwidgets@" = "ON" ] ; then INDEX_LIST="$INDEX_LIST $COUNT" DIRECTORY[$COUNT]="c++" This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |