Re: Some advice please..


Subject: Re: Some advice please..
sterwill@abisource.com
Date: Mon Dec 20 1999 - 18:32:34 CST


Martin Sevior wrote:
> I'm currently putting together a patch to add overline as text
> decoration as well as changing the thickness of the line in proportion to
> the size of the font. This was listed as "TODO" all over the source code.
> I'm happy that this now works with the on screen GTK version however I
> don't now how to change the line thickness for the postscript output.

This patch sounds pretty cool, especially the proportional line width
patch. Are you using a simple ratio for line thickness (say 1pt line
for every 12pt text) or maybe something a little smarter? I have
honestly not thought much about this task, but the feature is something
I've wanted for a while.
  
> Would you like this without the fix to the printing code? I will try to
> work out how to change the line thickness of postscript but I thought it
> might be trvial for someone already on the list.

gr_Win32Graphics.cpp seems to have the proper methods for setting
the line thickness, BeOS has that function, and that you've done the
GTK version means only PostScript output needs that capability. Luckily
I have the PostScript Red Book right here...

setlinewidth
Usage: <num> setlinewidth
        
        sets the line width parameter in the graphics state to num.

I've just done and committed the work for xap_UnixPSGraphics.cpp to emit
the new setlinewidth call, and updated drawLine() to call this, like
the other contexts.

If you do a "cvs update" on your tree, and re-build, variable width
lines in PostScript output should magically appear.

Beware that PostScript seems to be aligning actual stroked line-area
along different sides of the x1,y2,x2,y2 given to it for "lineto".
I haven't looked into this much, but if you find that alignment for
thick lines is off by a few pixels (in large fonts), I'll look through
The Book for some more info.

-- 
Shaw Terwilliger



This archive was generated by hypermail 2b25 : Mon Dec 20 1999 - 18:32:35 CST