[Prev][Next][Index][Thread]

Re: Pen settings in FO Dylan



In article <8ri4go$5l4$1@nnrp1.deja.com>, johncwhi@my-deja.com wrote:

> I could use some help understanding the options for setting a <pen>
> object in FO 2.0.
> 
> Here's some sample code:
> 
>       with-drawing-options( medium, brush: dark-gray, pen: my-pen )
>          draw-line( medium, start-x, 150, start-x + 100, 150  );
>       end;
> 
>       let his-pen = make( <pen>, width: 6, units: #"normal" ,
>                          joint-shape: #"miter", cap-shape: #"butt" );
>       with-drawing-options( medium, brush: dark-gray, pen: his-pen )
>          draw-line( medium, start-x, 160, start-x + 100, 160  );
>       end;
> 
>       let your-pen = make( <pen>, width: 6, units: #"point" ,
>                          joint-shape: #"bevel", cap-shape: #"square" );
>       with-drawing-options( medium, brush: dark-gray, pen: your-pen )
>          draw-line( medium, start-x, 170, start-x + 100, 170  );
>       end;
> 
> 
> These are all nested inside a "with-sheet-medium..." macro.  Now all of
> the lines look the same.  In other words, none of the pen options like
> cap-shape or joint-shape seem to make any difference.

Caution: I don't know anything about Fun-O, but I *do* know heaps about 
PostScript.

Assuming that "butt", "square", "bevel". "miter" all mean the same as 
they do in PostScript...

1) you can't tell the difference between bevel and miter unless you draw 
more than one line joining each other.  Which you're not doing.  I don't 
know how Fun-O knows if lines are joined.  In PostScript you do a moveto 
then a series of lineto's to create a path, and finally do "stroke" to 
actually draw the lines.

2) butt and square look exactly the same, the only difference being that 
with square the line actually extends half the pensize before and past 
where you ask for the line to be drawn.  You need a fairly thick line to 
tell the difference.

-- Bruce



Follow-Ups: References: