[Search for users] [Overall Top Noters] [List of all Conferences] [Download this site]

Conference bulova::decw_jan-89_to_nov-90

Title:DECWINDOWS 26-JAN-89 to 29-NOV-90
Notice:See 1639.0 for VMS V5.3 kit; 2043.0 for 5.4 IFT kit
Moderator:STAR::VATNE
Created:Mon Oct 30 1989
Last Modified:Mon Dec 31 1990
Last Successful Update:Fri Jun 06 1997
Number of topics:3726
Total number of notes:19516

1833.0. "About the time cost in drawing lines" by TKTV20::AIKO () Sat Dec 02 1989 04:04

I have one question about DECwindow programing.

 When I draw line by using GC that I set the line width, does it take time 
rather than using default GC ? There may be time lag in creating or setting 
the GC, but there isn't time lag in actually drawing lines, I think.  
 But my customer says the time cost in drawing lines by not-default GC is 
three times that by default GC.

Which is right ? Please tell me as soon as possible !!
T.RTitleUserPersonal
Name
DateLines
1833.1the right statement....CRLMAX::jgJim Gettys, Cambridge Research LabSat Dec 02 1989 13:1410
Is to draw as long as possible with the same GC in some state.  Switching GC's,
or changing the state of a GC may incur an implementation dependent cost in
drawing performance.

Your question is not particularly clear...  Another slant on the question is
to observe that non-zero width lines are (usually) slower than zero width
lines.  But the semantics of zero width lines are looser; use non-zero width 
lines when you need to know exactly which pixels are to be touched in the
drawing operation.
					- Jim
1833.2the same program performanceTKTV20::AIKOMon Dec 18 1989 05:2710
>Is to draw as long as possible with the same GC in some state.  Switching GC's,
>or changing the state of a GC may incur an implementation dependent cost in
>drawing performance.

In case of the same program except for GC - one uses the default GC and the 
other uses the GC set line width - , is therer a differnce in drawing 
performance ?

				
								AIKO
1833.3zero width lines....CRLMAX::jgJim Gettys, Cambridge Research LabMon Dec 18 1989 14:425
have looser semantics, and are generally much faster than width 1 or greater
lines.

If you don't want/need the guarantees that wide lines give you, use width 0.
				- Jim
1833.4DECWIN::FISHERBurns Fisher 381-1466, ZKO3-4/W23Tue Dec 19 1989 17:1310
There is no difference between using the default GC and creating your own,
except for the relatively minor overhead of one more GC.  One is not
inherantly faster than the other.

Some implementations will take a hit if you switch between GCs often.  Some
will take a hit if you modify something in a single GC.  Some both.  So
the general rule is to do as much as you can with one GC, and without changing
it before you go on to another set of charactistics.

Burns