Subject:
Re: GrArc() function doc update
From:
Robert Hartley ####@####.####
Date:
29 Nov 2000 21:04:05 -0000
Message-Id: <3A2528D4.6EA783A2@ics.com>
Hi,
Thank you very much!
It seems the operative word was "relative"
I misread the doc snippet you sent, thinking that you had said it was
relative to the origin and the following code worked properly.
/* lower right */
GrArc(paintDrawable, gc2,
100, 100, /* x, y */
25,25, /* rx, ry */
0, 25, /* ax, ay */
25, 0, /* bx, by */
1); /* type */
/* upper left */
GrArc(paintDrawable, gc2,
100, 100, /* x, y */
25,25, /* rx, ry */
0, -25, /* ax, ay */
-25, 0, /* bx, by */
1); /* type */
In the docs, we may want to change it to read "relative to the origin of x,y"
What would happen if we were to indicate points [a & b] whose distance from
[x,y] did not coincide with the radii [rx, ry], I am not sure, but I have
enough now to be able to draw rectangles with rounded corners in NanoX
Thanks!
Robert
Alex Holden wrote:
> On Wed, 29 Nov 2000, Robert Hartley wrote:
> > I am doing my best to annoy myself figuting out how the GrArc() function
> > is supposed to be used.
>
> Ah, it appears that Greg never included the API documentation I wrote
> several months ago... You can find a copy at:
> ftp://ftp.linuxhacker.org/pub/nanogui/nano-X-API.tar.gz
>
> Should I send you the patch again, Greg?
>
> Not sure how much it'll help, but this is the GrArc() entry:
>
> GrArc ()
>
> void GrArc (GR_DRAW_ID id,
> GR_GC_ID gc,
> GR_COORD x,
> GR_COORD y,
> GR_SIZE rx,
> GR_SIZE ry,
> GR_COORD ax,
> GR_COORD ay,
> GR_COORD bx,
> GR_COORD by,
> int type);
>
> Draws an arc with the specified dimensions at the specified position on
> the specified drawable using the specified graphics context. The type
> specifies the fill type. Possible values include GR_ARC and GR_PIE.
>
> id : the ID of the drawable to draw the arc on
> gc : the graphics context to use when drawing the arc
> x : the X coordinate to draw the arc at relative to the
> drawable
> y : the Y coordinate to draw the arc at relative to the
> drawable
> rx : the radius of the arc on the X axis
> ry : the radius of the arc on the Y axis
> ax : the X coordinate of the start of the arc relative to the
> drawable
> ay : the Y coordinate of the start of the arc relative to the
> drawable
> bx : the X coordinate of the end of the arc relative to the
> drawable
> by : the Y coordinate of the end of the arc relative to the
> drawable
> type : the fill style to use when drawing the arc
> ------- Alex Holden -------
--
=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=
= Robert Hartley Mail: 201 Broadway =
= Central Region Systems Engineer Cambridge, MA 02139 =
= Integrated Computer Email: ####@####.#### =
= Solutions, Inc. Web Site: www.ics.com =
= Tech Support: ####@####.#### Phone: 800-800-4271 =
=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=
Visit the MotifZone (www.motifzone.org) for info on Motif!