From: <and...@us...> - 2008-10-01 20:57:22
|
Revision: 8846 http://plplot.svn.sourceforge.net/plplot/?rev=8846&view=rev Author: andrewross Date: 2008-10-01 20:57:14 +0000 (Wed, 01 Oct 2008) Log Message: ----------- Fix up some issues with transparency support in the core library. Most these are related to stream buffering and copying streams. Modified Paths: -------------- trunk/src/plbuf.c trunk/src/plcore.c trunk/src/plctrl.c Modified: trunk/src/plbuf.c =================================================================== --- trunk/src/plbuf.c 2008-10-01 06:17:49 UTC (rev 8845) +++ trunk/src/plbuf.c 2008-10-01 20:57:14 UTC (rev 8846) @@ -495,12 +495,14 @@ case PLSTATE_COLOR0:{ short icol0; U_CHAR r, g, b; + PLFLT a; rd_data(pls, &icol0, sizeof(short)); if (icol0 == PL_RGB_COLOR) { rd_data(pls, &r, sizeof(U_CHAR)); rd_data(pls, &g, sizeof(U_CHAR)); rd_data(pls, &b, sizeof(U_CHAR)); + a = 1.0; } else { if ((int) icol0 >= pls->ncol0) { @@ -512,11 +514,13 @@ r = pls->cmap0[icol0].r; g = pls->cmap0[icol0].g; b = pls->cmap0[icol0].b; + a = pls->cmap0[icol0].a; } pls->icol0 = icol0; pls->curcolor.r = r; pls->curcolor.g = g; pls->curcolor.b = b; + pls->curcolor.a = a; plP_state(PLSTATE_COLOR0); break; @@ -531,6 +535,7 @@ pls->curcolor.r = pls->cmap1[icol1].r; pls->curcolor.g = pls->cmap1[icol1].g; pls->curcolor.b = pls->cmap1[icol1].b; + pls->curcolor.a = pls->cmap1[icol1].a; plP_state(PLSTATE_COLOR1); break; Modified: trunk/src/plcore.c =================================================================== --- trunk/src/plcore.c 2008-10-01 06:17:49 UTC (rev 8845) +++ trunk/src/plcore.c 2008-10-01 20:57:14 UTC (rev 8846) @@ -1969,6 +1969,7 @@ to->r = from->r; to->g = from->g; to->b = from->b; + to->a = from->a; } /*--------------------------------------------------------------------------*\ Modified: trunk/src/plctrl.c =================================================================== --- trunk/src/plctrl.c 2008-10-01 06:17:49 UTC (rev 8845) +++ trunk/src/plctrl.c 2008-10-01 20:57:14 UTC (rev 8846) @@ -376,6 +376,7 @@ plsc->cmap0[i].r = r[i]; plsc->cmap0[i].g = g[i]; plsc->cmap0[i].b = b[i]; + plsc->cmap0[i].a = 1.0; } if (plsc->level > 0) This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |