OpenQNX :: The QNX Community Portal

Jul 25, 2008 - 04:02 PM
Google
  Web openqnx.com   
     Create an account Home · Submit News · QNX Forums · QNX Download · Search   
_
Main Menu
Who's Online
There are 22 unlogged users and 5 registered users online.

You can log-in or register for a user account here.

Post new topic   Reply to topic
View previous topic Printable version Log in to check your private messages View next topic
Author Message
dxwang
Post subject: About PgSetDrawMode().  PostPosted: 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.
 
 View user's profile Send private message  
Reply with quote Back to top
dxwang
Post subject: Re: About PgSetDrawMode().  PostPosted: 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.
 
 View user's profile Send private message  
Reply with quote Back to top
dxwang
Post subject: Re: About PgSetDrawMode().  PostPosted: 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.
 
 View user's profile Send private message  
Reply with quote Back to top
dxwang
Post subject: RE: Re: About PgSetDrawMode().  PostPosted: Jan 31, 2007 - 03:36 AM
Senior Member


Joined: Sep 27, 2004
Posts: 129

have solved In QNX 6.3 OS Plate
 
 View user's profile Send private message  
Reply with quote Back to top
Display posts from previous:     
Jump to:  
All times are GMT
Post new topic   Reply to topic
View previous topic Printable version Log in to check your private messages View next topic
Powered by PNphpBB2 © 2003-2007 The PNphpBB Group
Credits
All logos and trademarks in this site are property of their respective owners. The comments are property of their posters.
Powered by OpenQNX: The QNX Community Portal Site
QNX and the QNX logo are registered trademarks of QNX Software Systems.