.TH flydraw 1 "16 June 2002" "1.0" "Inline drawing tool" .SH NAME flydraw \- an inline drawing tool .SH SYNOPSIS .B flydraw .SH DESCRIPTION .B flydraw is an inline drawing tool, which uses libgd to output PNG, JPG, GIF files. It parse its standard input for drawing commands. Each command takes one line. .SS DRAWING COMMANDS In the following lines, [color] may be either a color name, or 3 integers between 0 and 255, separated by commas, for the values of red,green,blue. .TP \fBanimate fra,del,rep\fR This command is only available for WIMS OEF and doc, and MUST appear on the first line. Set up animation for fra frames, with del seconds between frames, and rep repetitions (rep=0 means infinite repetition). .TP \fBanimstep n\fR Set up an integer which can be called in any evaluation. Used for animation. Direct use of this command must be avoided under WIMS. .TP \fBarc x,y,w,h,a1,a2,[color]\fR Arc segment of an ellipse of width w and hight h centered at (x,y), from angle a1 to angle a2. .TP \fBarrow x1,y1,x2,y2,l,[color]\fR Arrow (x1,y1)--->(x2,y2), where l is the length (in pixels) of arrowhead. .TP \fBcircle x,y,d,[color]\fR Circle of center (x,y) and diameter d (in pixels). .TP \fBcomment\fR Does nothing. .TP \fBcopy x,y,x1,y1,x2,y2,[filename]\fR (\fBSynonym:\fP insert) Insert the region from (x1,y1) to (x2,y2) (in pixels) of [filename] to (x,y). If x1=y1=x2=y2=-1, the whole [filename] is copied. .TP \fBcopyresized x1,y1,x2,y2,dx1,dy1,dx2,dy2,[filename]\fR Insert the region from (x1,y1) to (x2,y2) (in pixels) of [filename], possibly resized, to the region of (dx1,dy1) to (dx2,dy2). If x1=y1=x2=y2=-1, the whole [filename] is copied and resized. .TP \fBdarrow x1,y1,x2,y2,l,[color]\fR (\fBSynonym:\fP dasharrow dashedarrow) Dashed arrow (x1,y1)- - ->(x2,y2), where l is the length (in pixels) of arrowhead. .TP \fBdhline x,y,[color]\fR (\fBSynonym:\fP dashedhorizontalline dashhorizontalline hdline horizontaldashedline) Dashed horizontal line through (x,y). .TP \fBdline x1,y1,x2,y2,[color]\fR (\fBSynonym:\fP dashedline dashline) Dashed line segment (x1,y1)---(x2,y2). .TP \fBdlines [color],x1,y1,x2,y2,x3,y3...\fR (\fBSynonym:\fP dashedlines) dashlines n dashed line segments (x1,y1)---(x2,y2)---(x3,y3)... .TP \fBdvline x,y,[color]\fR (\fBSynonym:\fP dashedverticaline dashverticalline vdline verticaldashedline) Dashed vertical line through (x,y). .TP \fBellipse x,y,w,h,[color]\fR Ellipse with center (x,y), width w and height h. .TP \fBfcircle x,y,d,[color]\fR (\fBSynonym:\fP ball disk filledcircle) Filled circle of center (x,y) and diameter d (in pixels). .TP \fBfellipse x,y,w,h,[color]\fR (\fBSynonym:\fP filledellipse) Filled ellipse with center (x,y), width w and height h. .TP \fBfill x,y,[color]\fR (\fBSynonym:\fP flood floodfill) Flood fill the region containing (x,y) with the same original color, by color. .TP \fBfilltoborder x,y,[color1],[color2]\fR Flood fill by color2 the region containing (x,y) and bounded by color1. .TP \fBfpoly [color],x1,y1,x2,y2,x3,y3...\fR (\fBSynonym:\fP filledpoly filledpolygon fpolygon) Filled polygon (x1,y1)-(x2,y2)-(x3,y3)... .TP \fBfrect x1,y1,x2,y2,[color]\fR (\fBSynonym:\fP filledrect fillecrectangle frectangle) Filled rectangle with corners (x1,y1) and (x2,y2). .TP \fBfsquare x,y,s,[color]\fR (\fBSynonym:\fP filledsquare) Filled square with sides s (in pixels) and first corner at (x,y). .TP \fBftriangle x1,y1,x2,y2,x3,y3,[color]\fR (\fBSynonym:\fP filledtriangle) Filled triangle with vertices (x1,y1),(x2,y2),(x3,y3). .TP \fBhline x,y,[color]\fR (\fBSynonym:\fP horizontalline) Horizontal line through (x,y). .TP \fBinterlace\fR Set interlaced image .TP \fBkillbrush\fR Turns off brush selection for line drawing. .TP \fBkilltile\fR Turns off tile selection for filling. .TP \fBlattice x0,y0,x1,y1,x2,y2,n1,n2,[color]\fR A lattice of n1xn2 points starting with (x0,y0), with n1 rows in direction of (x1,y1) and n2 rows in direction of (x2,y2). .TP \fBline x1,y1,x2,y2,[color]\fR (\fBSynonym:\fP seg segment) Line segment (x1,y1)---(x2,y2). .TP \fBlines [color],x1,y1,x2,y2,x3,y3...\fR n line segments (x1,y1)---(x2,y2)---(x3,y3)... .TP \fBlinewidth w\fR Set line width to w (in pixels) for line drawing. .TP \fBnew x,y\fR Set a new image of size x,y. .TP \fBoutput [filename]\fR Output the current image to [filename]. .TP \fBparallel x1,y1,x2,y2,xv,yv,n,[color]\fR n parallel lines starting from (x1,y1)---(x2,y2), with displacement (xv,yv). .TP \fBpixels [color],x1,y1,x2,y2,...\fR Points (all of diameter 1) at (x1,y1), (x2,y2), ... .TP \fBplot [color],[formula]\fR (\fBSynonym:\fP curve) Plot a curve according to [formula] which can be either an explicit function of x, or a pair of parametric functions in t. .TP \fBplotjump j\fR Plotted curve willjump is two consecutive points have distance more than j pixels. Useful to avoid plotting discontinuous functions as continuous. Default value: 200. .TP \fBplotstep n\fR (\fBSynonym:\fP plotsteps tstep tsteps) Set the number of point computations in curve plot. Defaults to 100. .TP \fBpoint x,y,[color]\fR A (fat) point at (x,y), whose diameter is equal to linewidth. points [color],x1,y1,x2,y2,... (Fat) points at (x1,y1), (x2,y2), ..., whose diameters are equal to linewidth. .TP \fBpoly [color],x1,y1,x2,y2,x3,y3...\fR (\fBSynonym:\fP polygon) Polygon (x1,y1)-(x2,y2)-(x3,y3)... .TP \fBrange x1,x2,y1,y2\fR Set the drawing range to [x1,x2] horizontally and [y1,y2] vertically. Note that by default, horizontal range is [0,xsize-1] and vertical range is [ysize-1,0]. .TP \fBrays [color],x0,y0,x1,y1,x2,y2...\fR Line segments (x0,y0)---(x1,y1), (x0,y0)---(x2,y2), ... .TP \fBrect x1,y1,x2,y2,[color]\fR (\fBSynonym:\fP rectangle) Rectangle with corners (x1,y1) and (x2,y2). .TP \fBsetbrush [filename]\fR Use the image [filename] as a brush for all line draws. .TP \fBsetpixel x,y,[color]\fR A point (of diameter 1 pixel) at (x,y). .TP \fBsetstyle [color1],[color2],...\fR Set the line style to color1,color2,... .TP \fBsettile [filename]\fR Use the image [filename] as a tile for all filling commands. .TP \fBsize x,y\fR Set the image size to x pixels horizontally and y pixels vertically. .TP \fBsquare x,y,s,[color]\fR Square with sides s (in pixels) and first corner at (x,y). .TP \fBtext [color],x,y,[font],[string]\fR (\fBSynonym:\fP print string write) Write the string at (x,y), with font=small,medium,large or giant. .TP \fBtextup [color],x,y,[font],[string]\fR (\fBSynonym:\fP stringup writeup) Write upwards the string at (x,y), with font=small,medium,large or giant. .TP \fBtrange t1,t2\fR (\fBSynonym:\fP ranget) Set the t range to [t1,t2] for parametric curve plotting. Defaults to [0,1]. .TP \fBtransparent [color]\fR Makes [color] a transparent color. .TP \fBtriangle x1,y1,x2,y2,x3,y3,[color]\fR Triangle with vertices (x1,y1),(x2,y2),(x3,y3). .TP \fBvline x,y,[color]\fR (\fBSynonym:\fP verticalline) Vertical line through (x,y). .TP \fBxrange x1,x2\fR (\fBSynonym:\fP rangex) Set the horizontal drawing range to [x1,x2]. Defaults to [0,xsize-1]. .TP \fByrange y1,y2\fR (\fBSynonym:\fP rangey) Set the horizontal drawing range to [y1,y2]. Defaults to [ysize-1,0]. .SH AUTHORS Flydraw was completely rewritten to replace a public domain program called Fly by XIAO Gang from the University of Nice (France) in April 2000.