|
From: Petr M. <mi...@ph...> - 2005-02-21 09:36:03
|
> >What about, rather for a future
> >set shape rect ....
> >set object rect ...
> >if we want hexagons, circles, ...?
>
> I originally hoped to implement this without using the
> pm3d polygon routines, which meant limiting it to rectangles.
> But I ended up using pm3d routines heavily so yes, extending
> it to other polygons would not be difficult.
>
> It would be easy to modify the syntax to
> set polygon from <xy0> to <xy1> to <xy2> ...
> for an arbitrary number of vertices. The only real change
> needed is to allocate the vertices dynamically rather than
> simply reserved space for the 2 corners of a rectangle.
For regular polygons, I though about:
set shape rect from x1,y1 to x2,y2
set shape rect origin x0,y0 size dx,dy [rotated 45]
set shape triangle origin x0,y0 size dx,dy [rotated 180]
set shape ellipse origin x0,y0 size dx,dy sampling 100
and for arbitrary:
set shape polygon corners 1,2,3,4,5,6 ...
> > Could the above-mentioned size be given as "stringwidth"?
> > Then we could give "size" in the "character" units.
>
> Very few drivers can pass back enough information to do this in the
> core code.
> I was thinking instead that a future bit of work could implement
>
> set label "foo" ... {box|nobox}
>
> That way drivers (PostScript, gd, pdf) with an internal notion of
> textbox size could just stroke the textbox after writing the label text.
> The enhanced text code *tries* to keep this information in a generic way,
> but it does an imperfect job.
That would be useful, and would help to print labels over already printed
parts of graph.
---
PM
|