 |
|
 |
| Author |
Message |
|
|
Post subject: About PgSetDrawMode().
Posted: Jan 30, 2007 - 12:51 PM
|
|
Senior Member
Joined: Sep 27, 2004
Posts: 129
|
|
I want to choose a region for curve to magnify, when I press the left mouse button, then the start upright line is drawed. as I move the mouse, next upright line will be drawed. but I don't want to draw some many upright lines. I just want two upright lines, one is the start, the other is the current. In vc++,just use int nnormal=dc.SetROP2(R2_MERGEPENNOT); and dc.SetROP2(nnormal);
MERGEPENNOT :Pixel is a combination of the pen color and the inverse of the screen color (final pixel = (NOT screen pixel) OR pen).
In qnx6.3.0, I have tried below, but there are three upright lines, the first one is blue,it is right. the second and the third are yellow, not blue. I don't know why. I also have tried other modes, it isn't what I want.
PgSetStrokeColor(Pg_BLUE);
PgDrawILine(startpoint.x-35,p[0].y+100,startpoint.x-35,p[1].y+height_per+60 );
PgSetDrawMode(Pg_DRAWMODE_XOR);
PgDrawILine(tmppoint.x,p[0].y+100,tmppoint.x,p[1].y+height_per+60);
PgDrawILine(xmove+5,p[0].y+100,xmove+5,p[1].y+height_per+60);
tmppoint.x=xmove+5,tmppoint.y=ymove;
PgSetDrawMode(Pg_DRAWMODE_OPAQUE);
Thanks. |
|
|
| |
|
|
|
 |
|
|
Post subject: Re: About PgSetDrawMode().
Posted: Jan 30, 2007 - 12:59 PM
|
|
Senior Member
Joined: Sep 27, 2004
Posts: 129
|
|
|
dxwang wrote:
I want to choose a region for curve to magnify, when I press the left mouse button, then the start upright line is drawed. as I move the mouse, next upright line will be drawed. but I don't want to draw some many upright lines. I just want two upright lines, one is the start, the other is the current. In vc++,just use int nnormal=dc.SetROP2(R2_MERGEPENNOT); and dc.SetROP2(nnormal);
MERGEPENNOT :Pixel is a combination of the pen color and the inverse of the screen color (final pixel = (NOT screen pixel) OR pen).
In qnx6.3.0, I have tried below, but there are three upright lines, the first one is blue,it is right. the second and the third are yellow, not blue. I don't know why. I also have tried other modes, it isn't what I want.
case Ph_EV_PTR_MOTION_BUTTON:
PgSetStrokeColor(Pg_BLUE);
PgDrawILine(startpoint.x-35,p[0].y+100,startpoint.x-35,p[1].y+height_per+60 );
PgSetDrawMode(Pg_DRAWMODE_XOR);
PgDrawILine(tmppoint.x,p[0].y+100,tmppoint.x,p[1].y+height_per+60);
PgDrawILine(xmove+5,p[0].y+100,xmove+5,p[1].y+height_per+60);
tmppoint.x=xmove+5,tmppoint.y=ymove;
PgSetDrawMode(Pg_DRAWMODE_OPAQUE);
Thanks.
|
|
|
| |
|
|
|
 |
|
|
Post subject: Re: About PgSetDrawMode().
Posted: Jan 30, 2007 - 01:01 PM
|
|
Senior Member
Joined: Sep 27, 2004
Posts: 129
|
|
|
dxwang wrote:
dxwang wrote:
I want to choose a region for curve to magnify, when I press the left mouse button, then the start upright line is drawed. as I move the mouse, next upright line will be drawed. but I don't want to draw some many upright lines. I just want two upright lines, one is the start, the other is the current. In vc++,just use int nnormal=dc.SetROP2(R2_MERGEPENNOT); and dc.SetROP2(nnormal);
MERGEPENNOT :Pixel is a combination of the pen color and the inverse of the screen color (final pixel = (NOT screen pixel) OR pen).
In qnx6.3.0, I have tried below, but there are three upright lines, the first one is blue,it is right. the second and the third are yellow, not blue. I don't know why. I also have tried other modes, it isn't what I want.
case Ph_EV_PTR_MOTION_BUTTON:
PgSetStrokeColor(Pg_BLUE);
PgDrawILine(startpoint.x-35,p[0].y+100,startpoint.x-35,p[1].y+height_per+60 );
PgSetDrawMode(Pg_DRAWMODE_OR);
PgDrawILine(tmppoint.x,p[0].y+100,tmppoint.x,p[1].y+height_per+60);
PgDrawILine(xmove+5,p[0].y+100,xmove+5,p[1].y+height_per+60);
tmppoint.x=xmove+5,tmppoint.y=ymove;
PgSetDrawMode(Pg_DRAWMODE_OPAQUE);
Thanks.
|
|
|
| |
|
|
|
 |
|
|
Post subject: RE: Re: About PgSetDrawMode().
Posted: Jan 31, 2007 - 03:36 AM
|
|
Senior Member
Joined: Sep 27, 2004
Posts: 129
|
|
| have solved In QNX 6.3 OS Plate |
|
|
| |
|
|
|
 |
|
|
Powered by PNphpBB2 © 2003-2007 The PNphpBB Group Credits |
|
|
|
 |