dan@juniper.UUCP (Dan Galewsky) (04/08/88)
Greetings, I need to find some way that I can set the dash_offset for drawing line-styled lines to a specific pixel within a dashing pattern - rather than to the begining of a run of on/off pixels in a dash_list. My understanding of the Xlib doc is that if I have a dash list of (for example) [2,19], that I can set my offset either to the beginning of the run of 2 pixels or to the beginning of the run of 19 pixels. I can not, however, set the line offset to the 11'th pixel of the run of 19 pixels. The problem I am trying to solve is that of drawing a long dashed-polyline where I only get a few of the segments of the line at a time. The Xlib docs state that "Dashing is continuous through path elements combined with a join_style, but is reset to the dash_offset each time a cap_style is applied at an end point". This would work just fine if I knew all of the coordinates for my polyline at one time - but I don't. So I need to find out how to set the dash offset to a specified pixel. If the dashing pattern was specified as a bitmap rather than as a list of runs, I could just rotate the bitmap and things would be great. I have thought a little about trying to simulate a "bitmap" description of the linestyle using the dash list and it can certainly be done but it seems very awkward. Any ideas?? Have I somehow misunderstood the definition? -Dan Dan Galewsky (512)331-3462 {...sun}!austsun!ascway!galewsky galewsky%asc@sdr.slb.com
RWS@ZERMATT.LCS.MIT.EDU (Robert Scheifler) (04/09/88)
Date: 8 Apr 88 16:44:49 GMT From: ut-emx!juniper!dan@sally.utexas.edu (Dan Galewsky) My understanding of the Xlib doc is that if I have a dash list of (for example) [2,19], that I can set my offset either to the beginning of the run of 2 pixels or to the beginning of the run of 19 pixels. This is one of unfortunately numerous inaccuracies in the R2 Xlib manual. The dash_offset *is* a pixel count into the dash list. The R3 Xlib manual will be much more accurate, I promise (I've read it carefully very recently). In the meantime, I would suggest you compare definitions with the Protocol doc when you are in doubt (yes, I know the Protocol doc can be rather hard to read).