============================ ``grail.ip.metafile`` Module ============================ .. include:: ../../version.h .. contents:: Table of Contents :backlinks: top -------- Overview -------- xxx --------- Functions --------- :df:`hCreateMetafile(filename, description, x, y)` Takes a :a:`filename` and a :a:`description` along with the :a:`x` and :a:`y` dimensions in centimeters and returns a metafile handle. The handle is for use with the other grail.ip.metafile functions. :df:`vCloseMetafile(handle)` Closes the metafile. :df:`vMetaDrawRect(handle, left, top, right, bottom, edge_red, edge_green, edge_blue, fill_red, fill_green, fill_blue)` Draws a rectangle to the metafile with the coordinates defined by :a:`left`, :a:`top`, :a:`right` and :a:`bottom`. In otherwords, the co-ordinates define the top-left corner an the bottom-right corners of the rectangle. You can specify the colors you want for both the edges and the fill of the triangle using red, green and blue color specification. :df:`vMetaDrawPie(handle, x, y, radius, start_angle, end_angle, edge_red, edge_green, edge_blue, fill_red, fill_green, fill_blue)` Draws a pie shape that inscribes a circle with its center at :a:`x` and :a:`y` and with the given :a:`radius`. The inscribed circle will proceed from the start angle to the end angle. You can specify the colors you want for both the edges and the fill of the pie using red, green and blue color specification. :df:`vMetaDrawEllip(left, top, right, bottom, edge_red, edge_green, edge_blue, fill_red, fill_green, fill_blue)` Draws an ellipse based on the top-left corner and bottom-right corners of a triangle that would contain the ellipse. You can specify the colors you want for both the edges and the fill of the ellipse using red, green and blue color specification. :df:`vMetaDrawCircle(handle, x, y, radius, edge_red, edge_green, edge_blue, fill_red, fill_green, fill_blue)` Draws a circle centered at :a:`x` and :a:`y` with the given :a:`radius`. You can specify the colors you want for both the edges and the fill of the circle using red, green and blue color specification. :df:`vMetaDrawLine(handle, x0, y0, x1, y1, edge_red, edge_green, edge_blue, fill_red, fill_green, fill_blue)` Draws a line that goes from (:a:`x0`, :a:`y0`) to (:a:`x1`, :a:`y1`). You can specify the colors you want for both the edges and the fill of the line using red, green and blue color specification. :df:`vMetaSetTextColor(handle, red, green, blue)` Sets the text color the :a:`red`, :a:`green` and :a:`blue` combination specified. The :a:`handle` is the handle to the metafile. :df:`vMetaSetBackColor(handle, red, green, blue)` Sets the background color the :a:`red`, :a:`green` and :a:`blue` combination specified. The :a:`handle` is the handle to the metafile. :df:`vMetaSetBackTrans(handle)` Sets the background of the metafile to be transparent. The :a:`handle` is the handle to the metafile. :df:`vMetaSetFont(handle, font)` Sets the font that the metafile will use. Valid values for :a:`font` are one of the following strings, * "ANSI_FIXED" * "ANSI_VAR" * "DEFAULT_DEVICE" * "SYS_FIXED" * "SYS_VAR" If the value of :a:`font` is unknown, then it will default to "ANSI_FIXED". :df:`vMetaTextOut(handle, x, y, textheight, fontname, text)` Generates :a:`text` out to the metafile. :df:`vMetaFloodFill(handle, x, y, edge_red, edge_green, edge_blue, fill_red, fill_green, fill_blue)` Fills the target location given by :a:`x` and :a:`y` with the given color specifications.