From: <hba...@us...> - 2010-09-22 14:14:17
|
Revision: 11196 http://plplot.svn.sourceforge.net/plplot/?rev=11196&view=rev Author: hbabcock Date: 2010-09-22 14:14:07 +0000 (Wed, 22 Sep 2010) Log Message: ----------- Add plsmema() support to the Python language bindings. Make the if statements in the memcairo driver more explicit. Modified Paths: -------------- trunk/bindings/swig-support/plplotcapi.i trunk/drivers/cairo.c Modified: trunk/bindings/swig-support/plplotcapi.i =================================================================== --- trunk/bindings/swig-support/plplotcapi.i 2010-09-21 23:05:25 UTC (rev 11195) +++ trunk/bindings/swig-support/plplotcapi.i 2010-09-22 14:14:07 UTC (rev 11196) @@ -780,6 +780,10 @@ void plsmem(PLINT maxx, PLINT maxy, void *plotmem); +%feature("autodoc", "Similar to plsmem(), but supports alpha values.") plsmema; +void +plsmema(PLINT maxx, PLINT maxy, void *plotmem); + #endif %feature("autodoc", "Set up lengths of minor tick marks.") plsmin; Modified: trunk/drivers/cairo.c =================================================================== --- trunk/drivers/cairo.c 2010-09-21 23:05:25 UTC (rev 11195) +++ trunk/drivers/cairo.c 2010-09-22 14:14:07 UTC (rev 11196) @@ -2433,7 +2433,7 @@ cairo_mem[1] = input_mem[0]; /* R */ cairo_mem[2] = input_mem[1]; /* G */ cairo_mem[3] = input_mem[2]; /* B */ - if ( pls->dev_mem_alpha ){ + if ( pls->dev_mem_alpha == 1){ cairo_mem[0] = input_mem[3]; input_mem += 4; } @@ -2450,7 +2450,7 @@ cairo_mem[2] = input_mem[0]; /* R */ cairo_mem[1] = input_mem[1]; /* G */ cairo_mem[0] = input_mem[2]; /* B */ - if ( pls->dev_mem_alpha ){ + if ( pls->dev_mem_alpha == 1){ cairo_mem[3] = input_mem[3]; input_mem += 4; } @@ -2506,7 +2506,7 @@ memory[0] = cairo_surface_data[1]; /* R */ memory[1] = cairo_surface_data[2]; /* G */ memory[2] = cairo_surface_data[3]; /* B */ - if ( pls->dev_mem_alpha ){ + if ( pls->dev_mem_alpha == 1){ memory[3] = cairo_surface_data[0]; memory += 4; } @@ -2523,7 +2523,7 @@ memory[0] = cairo_surface_data[2]; /* R */ memory[1] = cairo_surface_data[1]; /* G */ memory[2] = cairo_surface_data[0]; /* B */ - if ( pls->dev_mem_alpha ){ + if ( pls->dev_mem_alpha == 1){ memory[3] = cairo_surface_data[3]; memory += 4; } This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |