|
|
Section Intro: Image Module
Image ModuleSynopsis:Functions which allow the creation of GIF images. You create an image with IMAGE::CREATE, and you can then draw lines, arcs, and points into the image. When you are done creating the image, you call IMAGE::RETRIEVE to get the GIF image in a binary variable. Finally, when you are totally done with the image, you call IMAGE::DELETE to make the image go away. Commands:
Draws a partial ellipse centered at the point specified by X and Y, with a width of WIDTH and height of HEIGHT. The arguments of START and END are given in degrees, and specify the starting and ending points on the curve. The following code draws a red circle with a radius of 50 pixels where the exact center of the circle appears at 100,100: <image::arc image x=100 y=100 width=50 height=50 start=0 end=360 color=FF0000>
Copies bits from SRC-IMAGE to DST-IMAGE. Both images must exist. If a different width or height is specified for the destination, the image is resized to fit the specified values.
Creates a new image with the specified width and height, and makes IMAGEVAR be a receptacle for that image. If you pass SRC=/WWW/DOCS/IMAGES/FOO.GIF, then FOO.GIF will be loaded into the image variable instead of an empty image.
Reclaims any space that is currently being used by IMAGEVAR.
Fill an area of the image in IMAGEVAR with the color specified by COLOR. The filling starts at the point specified by ( X, Y), and continues in all directions bounded by pixels which are not the same color as the color at ( X, Y), or, optionally, which are not the same color as the color specified by BORDER.
Returns the color of the pixel at X, Y in IMAGEVAR
Returns an alist representing information about the image in IMAGEVAR. The alist contains WIDTH, HEIGHT, TOTAL-COLORS, and COLORS. COLORS is an array of the color values which appear in the image.
Draw a line in IMAGEVAR from ( X1, Y1) to
( X2, Y2) in the color COLOR.
BRUSH, if supplied, is another image created with
Draw a rectangle with the border lines in the color COLOR and perhaps filled with the color FILL. The rectangle is drawn with the upper-left corner specified by ( X1 Y1) and the bottom-right corner specified by ( X2, Y2).
Set the pixel in IMAGEVAR at location X, Y to the color COLOR.
Write text on the image in IMAGEVAR at position X, Y, in the color COLOR. ALIGN can be one of "right", "center", or "left", and defaults to "center". SIZE ranges frome 1 to 6 and defaults to 3. If REPORT=TRUE is specified, the text isn't drawn, but all of the information about the drawing is returned as an alist.
Makes COLOR be the transparent one for this image.
Writes the contents of the image in IMAGEVAR to the file specified by FILENAME. Returns "true" if the image was successfully written.
Edit Section
![]() The META-HTML Reference Manual V2.0 Copyright © 1995, 1998, Brian J. Fox Found a bug? Send mail to bug-manual@metahtml.org |