Using drawRGB with selective transparencies
- From: robert_gasch peoplesoft com
- To: gtk-list redhat com
- Subject: Using drawRGB with selective transparencies
- Date: Mon, 05 Jul 1999 13:55:47 GMT
Hi,
in my program, I first draw on a drawing area
using drawRGB. I would then like to overlay
this drawing area with some selective points,
also using drawRGB. The problem is that the
points I read are in no special order and thus
all over the place. Right now I'm doing the following
to draw the points 1 by 1:
for (int j=0; j<limLine; j++)
{
coord2 = (COORD2*) listLine->El (j);
d_drawArea->drawRGB(coord2->x, coord2->y, 1, 1, buf, 3);
}
I would like to change this so that I have a number of
buffers (1 for each line) where I can simply mark all the
points I need *before* drawing (which would mean that I
could switch to drawing line by line rather than point
by point; the first hopefully being a lot faster than the
point by point method). Unfortunateley, this means that some
of the points in the new buffer will have to be transparant.
In short, what I'm thinking off is something like this:
// quick off the top of my head (pseudo-)code
unsigned char buf[3*width];
for (int j=0; j<height; j++)
{
// how do I set transparant drawing buffers??????
for (int i=0; i<width*3; i++)
{
buf[i++] = <r_tansparant>;
buf[i++] = <g_tansparant>;
buf[i] = <b_tansparant>;
}
for (int i=0; i<npoints; i++)
{
coord2 = (COORD2*) listLine->El (i);
d_drawArea->drawRGB(coord2->x, coord2->y, 1, 1, buf, 3);
}
}
So my question is: can I use transparent overlays with drawRGB?
If so how? Could anybody show me a quick example or point
me towards some sample code?
Thanks
--> R
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]