[Date Prev] [Date Next] [Thread Prev] [Thread Next] Date Index Thread Index Search archive:
Date:Mon Feb 26 21:28:09 1998 
Subject:Re: filled polygons 
From:Aaron Sloman See text for reply address 
Volume-ID:980226.02 

monika.sester@ifp.uni-stuttgart.de (Monika Sester) writes:

> Date: 26 Feb 1998 19:55:06 GMT

> hi,
> is there a possibility to draw filled polygons with the help or
> rc-graphics ?
> or with other packages ?
>
> -moni

It's available deeper in the system than rc_graphic. Look at
section 6 of REF XpwPixmap on "Filled Objects".

It includes these

XpwFillPolygon(widget, coordlist, shape, drawmode)           [procedure]
        Calls the XpwMFillPolygon method for widget.

        Draws the filled polygon described by coordlist. shape should be
        Convex (edges are all convex), NonConvex (some edges may not  be
        convex) or  Complex  (paths may  intersect).  If in  doubt,  use
        Complex. (The  others  are  just to  improve  performance  where
        possible.) MODE should be  CoordModeOrigin (points are  relative
        to the origin) or CoordModePrevious (points are relative to  the
        previous point).


XpwFillRectangle(widget, x, y, width, height)                [procedure]
        Calls the XpwMFillRectangle method for widget.

        Fill a rectangle  with top left  corner at location  x, y,  with
        given width and height.

To make this stuff available you need to do

    uses Xpw, XpwPixmap;

It would be nice to have rc_graphic versions of all of these, making
use of rc_xorigin, rc_yorigin, etc. Easy to do but tiresome. For
filled rectangles I tend to just draw a line with suitable value
of linewidth! There are several such things (rc_draw_blob etc.)
in the RCLIB package in
    ftp://ftp.cs.bham.ac.uk/pub/dist/poplog/rclib/

also in this compressed tar file
    ftp://ftp.cs.bham.ac.uk/pub/dist/poplog/rclib/rctar.gz

If anyone ever does write rc_ versions of the procedures in
XpwPixmap please consider donating them to RCLIB !

Aaron
-- 
Aaron Sloman, ( http://www.cs.bham.ac.uk/~axs/ )
School of Computer Science, The University of Birmingham, B15 2TT, UK
EMAIL A.Sloman at cs.bham.ac . uk
Phone: +44-121-414-4775 (Sec 3711)       Fax:   +44-121-414-4281