From: <hez...@us...> - 2011-08-06 14:58:11
|
Revision: 11861 http://plplot.svn.sourceforge.net/plplot/?rev=11861&view=rev Author: hezekiahcarty Date: 2011-08-06 14:58:04 +0000 (Sat, 06 Aug 2011) Log Message: ----------- Rename PL_MODE_* to PL_DRAWMODE_* PL_MODE_* is too generic for a drawing mode definition. This makes the purpose clearer. Modified Paths: -------------- trunk/drivers/cairo.c trunk/examples/c/x34c.c trunk/include/plplot.h trunk/src/plctrl.c Modified: trunk/drivers/cairo.c =================================================================== --- trunk/drivers/cairo.c 2011-08-05 10:23:37 UTC (rev 11860) +++ trunk/drivers/cairo.c 2011-08-06 14:58:04 UTC (rev 11861) @@ -601,15 +601,15 @@ switch ( *mode ) { - case PL_MODE_UNKNOWN: // Invalid - do nothing + case PL_DRAWMODE_UNKNOWN: // Invalid - do nothing break; - case PL_MODE_DEFAULT: + case PL_DRAWMODE_DEFAULT: cairo_set_operator( aStream->cairoContext, CAIRO_OPERATOR_OVER ); break; - case PL_MODE_REPLACE: + case PL_DRAWMODE_REPLACE: cairo_set_operator( aStream->cairoContext, CAIRO_OPERATOR_SOURCE ); break; - case PL_MODE_XOR: + case PL_DRAWMODE_XOR: cairo_set_operator( aStream->cairoContext, CAIRO_OPERATOR_XOR ); break; } @@ -633,16 +633,16 @@ switch ( op ) { case CAIRO_OPERATOR_OVER: - *mode = PL_MODE_DEFAULT; + *mode = PL_DRAWMODE_DEFAULT; break; case CAIRO_OPERATOR_SOURCE: - *mode = PL_MODE_REPLACE; + *mode = PL_DRAWMODE_REPLACE; break; case CAIRO_OPERATOR_XOR: - *mode = PL_MODE_XOR; + *mode = PL_DRAWMODE_XOR; break; default: - *mode = PL_MODE_UNKNOWN; + *mode = PL_DRAWMODE_UNKNOWN; } return; } Modified: trunk/examples/c/x34c.c =================================================================== --- trunk/examples/c/x34c.c 2011-08-05 10:23:37 UTC (rev 11860) +++ trunk/examples/c/x34c.c 2011-08-06 14:58:04 UTC (rev 11861) @@ -27,9 +27,9 @@ // Drawing modes to demonstrate #define NUM_MODES 3 PLINT drawing_modes[NUM_MODES] = { - PL_MODE_DEFAULT, - PL_MODE_REPLACE, - PL_MODE_XOR + PL_DRAWMODE_DEFAULT, + PL_DRAWMODE_REPLACE, + PL_DRAWMODE_XOR }; const char *drawing_mode_names[NUM_MODES] = { @@ -61,7 +61,7 @@ // Check for drawing mode support mode = plgdrawmode(); - if ( mode == PL_MODE_UNKNOWN ) + if ( mode == PL_DRAWMODE_UNKNOWN ) { printf( "WARNING: This driver does not support drawing mode getting/setting" ); } @@ -119,7 +119,7 @@ // Draw a background triangle using the default drawing mode plcol0( 2 ); - plsdrawmode( PL_MODE_DEFAULT ); + plsdrawmode( PL_DRAWMODE_DEFAULT ); plfill( 3, xs, ys ); // Draw a circle in the given drawing mode Modified: trunk/include/plplot.h =================================================================== --- trunk/include/plplot.h 2011-08-05 10:23:37 UTC (rev 11860) +++ trunk/include/plplot.h 2011-08-06 14:58:04 UTC (rev 11861) @@ -1270,10 +1270,10 @@ #define PL_COLORBAR_BOUNDING_BOX 0x10000 // Flags for drawing mode -#define PL_MODE_UNKNOWN 0 -#define PL_MODE_DEFAULT 1 -#define PL_MODE_REPLACE 2 -#define PL_MODE_XOR 4 +#define PL_DRAWMODE_UNKNOWN 0x0 +#define PL_DRAWMODE_DEFAULT 0x1 +#define PL_DRAWMODE_REPLACE 0x2 +#define PL_DRAWMODE_XOR 0x4 // Routine for drawing discrete line, symbol, or cmap0 legends PLDLLIMPEXP void Modified: trunk/src/plctrl.c =================================================================== --- trunk/src/plctrl.c 2011-08-05 10:23:37 UTC (rev 11860) +++ trunk/src/plctrl.c 2011-08-06 14:58:04 UTC (rev 11861) @@ -1911,7 +1911,7 @@ if ( !plsc->dev_modeset ) { plwarn( "plgdrawmode: Mode getting is not supported" ); - mode = PL_MODE_UNKNOWN; + mode = PL_DRAWMODE_UNKNOWN; } else if ( plsc->level > 0 ) { @@ -1920,7 +1920,7 @@ else { plwarn( "plsdrawmode: Initialize PLplot first" ); - mode = PL_MODE_UNKNOWN; + mode = PL_DRAWMODE_UNKNOWN; } return ( mode ); This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |