On 25-Oct-05 Clarke Echols wrote: > > I need to use drawing requests (\D'...') directly (without > using PIC) to make pie-chart segments that can be filled with > color. > > I have no problem getting filled boxes and polygons, but I > have not discovered how to draw two lines with an included > angle, then connect the two outside ends with an arc whose > radius is centered at the vertex of the two lines. > > Any suggestions? I must be missing something very obvious... > > Thanks, > > Clarke
I don't think you are, Clarke! What you want to do does not, as far as I know, fall withing the repertoire of \D'...'. A similar question was discussed recently on the list (Sep 13-18) regarding producing a "shaded" box with round corners. As was pointed out by Keith Marshall and me, pic's approach to this involves drawing several shaded entities -- two rectangles and four circles -- because the method of drawing a simple box with rounded corners is to draw 4 lines and four arcs with \D'...', and not "closing" the resulting path. As a result, PostScript cannot shade it. The same would apply to your pie segments. And I can't think of a clean way to make one of these in a similar way (especially if you want to place them side by side in a pie chart). The only entities that \D'...' (and therefore also pic) can shade are polygons (\D'P ...'), ellipses (\D'E ...') and circles (\D'C ... '), because these are also intrinsically closed entities in PostScript. As I said before, pic needs an attribute "closed" for entities drawn with line and curve segments, so that these can be filled in PostScript. I can only think of setting up a little stanza in PostScript which would be invoked to draw the necessary item, though making sure that it was placed at the roght point and at the right angle would need careful watching. I will try to invent one, but probably others will beat me to it! Best wishes, Ted. -------------------------------------------------------------------- E-Mail: (Ted Harding) <[EMAIL PROTECTED]> Fax-to-email: +44 (0)870 094 0861 Date: 25-Oct-05 Time: 21:16:03 ------------------------------ XFMail ------------------------------ _______________________________________________ Groff mailing list Groff@gnu.org http://lists.gnu.org/mailman/listinfo/groff