[<<] [<] Page 1 of 1 [>] [>>] | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
Subject:
GrArc() function
From: Robert Hartley ####@####.#### Date: 29 Nov 2000 20:18:34 -0000 Message-Id: <3A251E29.2D938E75@ics.com> Hello, I am doing my best to annoy myself figuting out how the GrArc() function is supposed to be used. So far, x/y/rx/ry/ are easy enough. Fiddling with ax, ay, bx, by does nt reveal anything intuitive. Can someone please explain how to use them? Thanks! -robert 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) -- =-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-= = 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! | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
Subject:
Re: GrArc() function
From: Alex Holden ####@####.#### Date: 29 Nov 2000 20:39:07 -0000 Message-Id: <Pine.LNX.4.04.10011292024350.875-100000@hyperspace.linuxhacker.org> 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 ------- http://www.linuxhacker.org/ http://www.robogeeks.org/ | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
Subject:
Re: GrArc() function
From: "Greg Haerr" ####@####.#### Date: 29 Nov 2000 22:05:22 -0000 Message-Id: <014f01c05a51$969c9970$6817dbd0@censoft.com> : Should I send you the patch again, Greg? Yes. Sorry, I seem to have forgotten about this. : 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 I included GrArc() for those tiny systems that don't have floating point support. The ax,ay and bx,by values specify any point on the line from the arc centerpoint through the initial point and end point of the arc to be drawn, respectively. This function is included because if an angle is specified, then we've got to drag in floating point for the tan/atan function. An easier function to understand is GrArcAngle, where the arc is specified in 1/10 degrees, rather than the strange start/end point values in GrArc. Check out src/engine/devarc.c for to see how GrArcAngle ends up calling GrArc, which then draws the arc. Regards, Greg | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
[<<] [<] Page 1 of 1 [>] [>>] |