PURPOSE
Draws specified geometric elements, specified in device coordinates, with color specified by a true color argument.
CALLING SEQUENCE
HIC_Draw_DC_Colorized_Face (nr, count, points, color)
HIC_Draw_DC_Colorized_Line (nr, points2, color)
HIC_Draw_DC_Colorized_Marker (nr, point, color)
HIC_Draw_DC_Colorized_Triangle (nr, points3, color)
------------------------------------------------------------------------- nr HT_Rendition Rendition. Passed by reference. count int Number of face vertices. points HT_DC_Point Array of face vertices. Passed by reference. color HT_RGB32 Color to draw object. Passed by reference. points2 HT_DC_Point Array of two line endpoints. Passed by reference. point HT_DC_Point Marker position. Passed by reference. points3 HT_DC_Point Array of three triangle vertices. Passed by ref erence. -------------------------------------------------------------------------
DETAILS
Each of these is the standard default method for the corresponding "draw dc colorized ..." callback point.
Their function is to draw the specified element, specified in device coordinates, using the color argument to determine the color, rather than the normal color attribute contained in the rendition nr. Each works essentially by changing the color attribute in the rendition to the value specified by the color argument, then executing the corresponding HIC_Draw_DC_... function.
NOTES
The "draw dc colorized ..." methods are called typically when the color of the object has been computed by HOOPS, rather than directly specified as an attribute by the application, as in the case of color determined by lighting or fog.
PURPOSE
Draws a dot, with position specified in device coordinates.
CALLING SEQUENCE
HIC_Draw_DC_Dot (nr, point)
----------------------------------------------------------------------- nr HT_Rendition Rendition. Passed by reference. point HT_DC_Point Location of dot, in device coordinates. Passed by reference. -----------------------------------------------------------------------
DETAILS
This function draws a small visible mark, usually a single pixel, in the color specified by the line color attribute in the rendition nr.
PURPOSE
Draws a filled ellipse, specified in device coordinates.
CALLING SEQUENCE
HIC_Draw_DC_Ellipse (nr, where, radius)
---------------------------------------------------------------------- nr HT_Rendition Rendition. Passed by reference. where HT_DC_Point Location of ellipse center. Passed by reference. radius HT_DC_Point Ellipse semimajor axes. Passed by reference. ----------------------------------------------------------------------
VARIANTS
HIC_Draw_DC_Elliptical_Arc (nr, where, radius, start, end)
------------------------------------------------------------------------- nr HT_Rendition As above. where HT_DC_Point As above. radius HT_DC_Point As above. start HT_DC_Point Start of elliptical arc. Passed by reference. end HT_DC_Point Termination of elliptical arc. Passed by reference. -------------------------------------------------------------------------
DETAILS
This function draws a filled ellipse with major axes aligned with the device coordinate axes. The ellipse is drawn with the face color, face pattern, and face contrast color attributes contained in the rendition nr.
The x and y coordinates of radius give the major radii. The z coordinate of radius gives the corresponding depth extent, which is relevant when Z-buffering is in effect.
NOTES
This function works by tessellating the ellipse to a polygon and drawing the polygon's face. The tessellation depends on the screen size of the ellipse.
PURPOSE
Draws a filled polygon, without edge, specified in device coordinates.
CALLING SEQUENCE
HIC_Draw_DC_Face (nr, count, points)
------------------------------------------------------------------- nr HT_Rendition Rendition. Passed by reference. count int Number of vertices in face. points HT_DC_Point Array of count vertices. Passed by reference. -------------------------------------------------------------------
DETAILS
This is the standard default method for the "draw dc faces" callback point.
count and points specify an array of vertices that define the polygon, which may have arbitrary complexity. (The interior of a self-intersecting polygon is defined by an odd-intersection rule.)
The polygon is filled with the face color, face pattern, and face contrast color attributes contained in the rendition nr.
NOTES
The vertex array is closed implicitly. That is, there is no need to repeat the first vertex as the last vertex, just as in Insert_Polygon.
PURPOSE
Draws a figure, specified in device coordinates, with color interpolated from vertex colors.
CALLING SEQUENCE
HIC_Draw_DC_Gouraud_Line (nr, points2, colors2)
HIC_Draw_DC_Gouraud_Triangle (nr, points3, colors3)
------------------------------------------------------------------------ nr HT_Rendition Rendition. Passed by reference. points2 HT_DC_Point Array of two endpoints. Passed by reference. colors2 HT_RGB32 Array of two vertex colors. Passed by reference. points3 HT_DC_Point Array of three vertices. Passed by reference. colors3 HT_RGB32 Array of three vertex colors.Passed by reference. ------------------------------------------------------------------------
DETAILS
These functions are the standard default methods for the corresponding "draw dc gouraud ..." callback points.
HIC_Draw_DC_Gouraud_Line draws a line segment with color interpolated from the argument endpoint colors, subject to the line pattern and line weight attributes in the rendition nr
HIC_Draw_DC_Gouraud_Triangle draws a filled triangle with color interpolated from the argument vertex colors, subject to the face pattern and face contrast color attributes in the rendition nr.
NOTES
HOOPS calls on "draw dc gouraud lines" when the application calls for lighting interpolation of edges of mesh or shell primitives, or when applying atmospheric attenuation to line primitives. HOOPS calls on "draw dc gouraud triangles" when the application calls for lighting interpolation of meshes and shells.
PURPOSE
Draws a generalized image.
CALLING SEQUENCE
HIC_Draw_DC_Image_Block (nr, start, width, height, format, data)
-------------------------------------------------------------------------- nr HT_Rendition Rendition. Passed by reference start HT_DC_Point Upper-left corner of image on display. Passed by reference width int Horizontal size of image, in pixels. height int Vertical size of image, in pixels. format enumerated char Image format symbolic constant (See below for details.) data pointer Pointer to the data block. --------------------------------------------------------------------------
VARIANT
HIC_Draw_DC_Image (nr, start, end, hoffset, rasters, format, pattern, contr_clr)
------------------------------------------------------------------------------- nr HT_Rendition Rendition. Passed by reference start HT_DC_Point Upper-left corner of image on display. Passed by reference end HT_DC_Point Lower-right corner. Passed by reference hoffset int Byte offset of each image scan line in the data block. rasters pointer Pointer to an array of pointers to successive scan lines in the data block. format enumerated char Image format symbolic constant. (See below for details.) pattern enumerated For internal use. Should be set to FP_SOLID. contr_clr pointer For internal use. Should be set to null. -------------------------------------------------------------------------------
DETAILS
start may be off-screen
Format has one of the following values, with the indicated meanings.
-------------------------------------------------------------------------- Image_MAPPED_8 One byte per pixel, used as index into current color map. Image_MAPPED_16 Two bytes per pixel, used as 16-bit index into current color map. Image_RGB Three bytes per pixel, giving red, green, and blue values in order. Image_ARGB Four bytes per pixel, giving alpha, red, green, and blue values in order. Image_RGBA Four bytes per pixel, giving red, blue, green, and alpha values in order. --------------------------------------------------------------------------
In HIC_Draw_DC_Image, the array of pointers rasters, and the hoffset argument allow for drawing a subimage of a stored image. Because it has both a start and end argument, it allows for drawing a tilted image that may be subject to Z-buffer comparison, when Z-buffering is in effect. However, Z-buffering of tilted images works only for images consisting of a single scan-line, with start->y = end->y. Z-buffering results are unpredictable for multiline tilted images.
Currently, the alpha value is used as a stencil. That is, pixels with A=0 are not drawn and pixels with A not zero are drawn.
NOTES
Both of these routines are device-independent, in that they can be called for devices of any visual type.
HIC_Draw_DC_Image_Block is the simplest and preferred method of drawing images and rasters. However, it allows drawing only the entire image stored in the data block, and does not provide for Z-buffering tilted images.
HIC_Draw_DC_Image is a more general image drawing routine. You would use it when you want to draw a subblock of the stored image, or when the image is tilted and you want to apply Z-buffering.
PURPOSE
Draws a line segment, specified in device coordinates.
CALLING SEQUENCE
HIC_Draw_DC_Line (nr, points)
------------------------------------------------------------------ nr HT_Rendition Rendition. Passed by reference. points HT_DC_Point Array of two endpoints. Passed by reference. ------------------------------------------------------------------
DETAILS
This is the standard default method for the "draw dc lines" callback point.
It is a special case of HIC_Draw_DC_Polyline, subject to the same attributes.
NOTES
The "draw dc lines" method is called only from the "draw dc colorized lines" method. The latter method sets the line color attribute in the rendition nr to its own color argument, then passes nr to "draw dc lines".
PURPOSE
Draws a marker, with position specified in device coordinates.
CALLING SEQUENCE
HIC_Draw_DC_Marker (nr, point)
------------------------------------------------------------- nr HT_Rendition Rendition point HT_DC_Point Location of marker. Passed by reference. -------------------------------------------------------------
DETAILS
This is the standard default method for the "draw dc markers" callback point.
It draws a marker at the specified point, subject to the marker symbol, marker color, and marker size attributes contained in the rendition nr.
PURPOSE
Draws an ellipse boundary (closed curve), specified in device coordinates.
CALLING SEQUENCE
HIC_Draw_DC_Outline_Ellipse (nr, where, radius)
---------------------------------------------------------------------- nr HT_Rendition Rendition. Passed by reference. where HT_DC_Point Location of ellipse center. Passed by reference. radius HT_DC_Point Ellipse semi-major axes. Passed by reference. ----------------------------------------------------------------------
DETAILS
This function draws an ellipse outline (closed curve) with major axes aligned with the device coordinate axes. The ellipse outline is drawn with the line color, line pattern, and line weight attributes contained in the rendition nr.
The x and y coordinates of radius give the major radii. The z coordinate of radius gives the corresponding depth extent, which is relevant when Z-buffering is in effect.
NOTES
This function works by tessellating the ellipse outline to a closed polyline. The tessellation depends on the screen size of the ellipse.
PURPOSE
Draws a filled polygon with edge, specified in device coordinates.
CALLING SEQUENCE
HIC_Draw_DC_Polygon (nr, count, points)
------------------------------------------------------------------- nr HT_Rendition Rendition. Passed by reference. count int Number of vertices in polygon plus one. points HT_DC_Point Array of count vertices. Passed by reference. -------------------------------------------------------------------
DETAILS
This draws a filled polygon with edge. The polygon is drawn according to the face attributes in nr, and the edge according to the line attributes in nr.
This function requires an explicitly closed vertex array. That is, count is one greater than the number of polygon vertices, and the last point in the vertex array should be the same as the first.
NOTES
Note that the vertex closing convention differs from that of Insert_Polygon, HIC_Draw_3D_Polygon, and HIC_Draw_DC_Face.
This function is equivalent to calling HIC_Draw_DC_Face (count-1, points), then replacing the line attributes by the edge attributes and calling HIC_Draw_DC_Polyline (count, points)
PURPOSE
Draws a polyline, specified in device coordinates.
CALLING SEQUENCE
HIC_Draw_DC_Polyline (nr, count points)
------------------------------------------------------------------- nr HT_Rendition Rendition. Passed by reference. count int Number of vertices in polyline. points HT_DC_Point Array of count vertices. Passed by reference. -------------------------------------------------------------------
DETAILS
This is the standard default method for the "draw dc polyline" callback point. It is also the standard default method for the "draw dc edges" callback point, after the line attributes in the rendition nr have been replaced by the edge attributes in the rendition passed to "draw dc edges". It is also the standard default method for "draw dc text strokes".
It draws a polyline, subject to the line color, pattern and weight attributes in the rendition nr
PURPOSE
Draws a raster of a specific visual type.
CALLING SEQUENCE
HIC_Draw_DC_Bit_Raster (nr, start, end, raster)
HIC_Draw_DC_Gray8_Rasters (nr, start, end, raster)
HIC_Draw_DC_Mapped8_Rasters (nr, start, end, raster)
HIC_Draw_DC_Mapped16_Rasters (nr, start, end, raster)
HIC_Draw_DC_RGB32_Rasters (nr, start, end, raster)
----------------------------------------------------------------------- nr HT_Rendition Rendition. Passed by reference. start HT_DC_Point Device coordinates of upper-left pixel of raster on the screen. Passed by reference. end HT_DC_Point Device coordinates of pixel at lower-right. Passed by reference. raster pointer Pointer to data array -----------------------------------------------------------------------
DETAILS
HIC_Draw_DC_Bit_Raster draws a single scan line determined by the bits in the data array. That is, start and end should have the same y-coordinate, otherwise the result is unpredictable. The number of pixels is implied by start and end (namely, 1+end->x-start->x). raster points to an array of bytes, each containing the bits to be written to eight consecutive pixels on a scan line, with the least significant bit representing the left-most pixel. A one bit means the bright color, a zero bit the dark color. The pixel corresponding to the first bit of the first byte need not be on an eight-pixel boundary. If the number of pixels (as determined by the difference between the x-coordinates of end and start) is not a multiple of eight, then some of the bits of the last byte will be discarded.
HIC_Draw_DC_Gray8_Rasters draws an image specified by an array of eight-bit gray scale values. The number of rows is determined by the difference between the y coordinates of end and start, and the number of columns by the difference between the x coordinates. The number of bytes in the raster array should be the product of the number of rows and the number of columns, and the bytes should be arranged in natural scan order.
HIC_Draw_DC_Mapped8_Rasters draws an image specified by an array of eight-bit color indices into the current color map. The number of rows is determined by the difference between the y coordinates of end and start, and the number of columns by the difference between the x coordinates. The number of bytes in the raster array should be the product of the number of rows and the number of columns, and the bytes should be arranged in natural scan order.
HIC_Draw_DC_Mapped16_Rasters draws an image specified by an array of 16-bit color indices into the current color map. The number of rows is determined by the difference between the y coordinates of end and start, and the number of columns by the difference between the x coordinates. The number of short words in the raster array should be the product of the number of rows and the number of columns, and the bytes should be arranged in natural scan order.
HIC_Draw_DC_RGB32_Rasters draws an image specified by an array of 32-bit words, each giving a pixel color in the platform-dependent four-byte color format. The number of rows is determined by the difference between the y coordinates of end and start, and the number of columns by the difference between the x coordinates. The number of long words in the raster array should be the product of the number of rows and the number of columns. The long words should be arranged in natural scan order.
NOTES
These routines are not entirely device-independent. Each should be called only for devices with the corresponding visual type.
Note the singular form of the name HIC_Draw_DC_Bit_Raster, as opposed to the plural form of the other functions, which is to indicate that it draws only a single scan line.
PURPOSE
Draws a filled rectangle, specified in device coordinates.
CALLING SEQUENCE
HIC_Draw_DC_Rectangle (nr, left, right, bottom, top)
----------------------------------------------------------------------- nr HT_Rendition Rendition. Passed by reference. left int Integer x device coordinate of left edge of rect angle. right int Integer x device coordinate of right edge of rect angle. bottom int Integer y device coordinate of bottom edge of rectangle. top int Integer y device coordinate of top edge of rect angle. -----------------------------------------------------------------------
DETAILS
This is a special case of HIC_Draw_DC_Face. It draws a filled rectangle, filled according to the face color, pattern, and contrast color attributes contained in the rendition nr.
The rectangle is aligned with the device coordinate axes.
NOTES
HOOPS uses this function to fill windows, after replacing the face attributes in nr with the window attributes.
PURPOSE
Draws a figure, specified in device coordinates, with color interpolated from vertex colors.
CALLING SEQUENCE
HIC_Draw_DC_Reshaded_Line (nr, points2, colors, planes, parameters, flags)
HIC_Draw_DC_Reshaded_Triangle (nr, points3, colors, planes, parameters, flags)
-------------------------------------------------------------------------- nr HT_Rendition Rendition. Passed by reference. points2 HT_DC_Point Array of two endpoints. Passed by reference. colors2 HT_RGB32 Array of two vertex colors. Passed by reference. points3 HT_DC_Point Array of three vertices. Passed by reference. colors HT_RGB32 Array of colors.Passed by reference. parameters HT_RGB32 Array of parameters.Passed by reference. flags HT_RGB32 Array of parameter flagss.Passed by reference. --------------------------------------------------------------------------
DETAILS
These functions are the standard default methods for the corresponding "draw dc reshaded ..." callback points.
HIC_Draw_DC_Reshaded_Line draws a line segment with color interpolated at each pixel, subject to the line pattern and line weight attributes in the rendition nr
HIC_Draw_DC_Reshaded_Triangle draws a filled triangle with color interpolated at each pixel, subject to the face pattern and face contrast color attributes in the rendition nr.
PURPOSE
Draws a filled triangle, specified in device coordinates.
CALLING SEQUENCE
HIC_Draw_DC_Triangle (nr, points3)
-------------------------------------------------------------------- nr HT_Rendition Rendition. Passed by reference. points3 HT_DC_Point Array of three vertices. Passed by reference. --------------------------------------------------------------------
DETAILS
This is the standard default method for the "draw dc triangles" callback point.
It is a special case of HIC_Draw_DC_Face, and is subject to the face color, pattern, and contrast color attributes contained in the rendition nr.
NOTES
HOOPS calls on "draw dc triangles" in the rendering of mesh and shell primitives.
PURPOSE
Draws all the geometry in a segment and its subsegments.
CALLING SEQUENCE
HIC_ Draw_Segment(nr, si)
----------------------------------------------------------------- nr HT_Rendition Rendition. Passed by reference. si HT_Segment_Info Segment information structure. Passed by ref erence. -----------------------------------------------------------------
DETAILS
This is the standard default method for the "draw segments" and "draw segment tree" callback points. It draws all the geometry defined in the specified segment and its subsegments, subject to the applicable attributes contained in the rendition nr and the attribute inheritance rules.
NOTES
You would normally call this only from your "draw segments" or "draw segment tree" callback functions.
PURPOSE
To draw text specified by an intermediate text information structure.
CALLING SEQUENCE
HIC_Draw_Text (nr, text_info)
------------------------------------------------------------------------- nr HT_Rendition Rendition. Passed by reference. text_info HT_Text_Info Text information structure. Passed by reference. -------------------------------------------------------------------------
VARIANTS
HIC_Draw_DC_Text (nr, where, count, string)
----------------------------------------------------------------------- nr HT_Rendition Rendition. Passed by reference. where HT_DC_Point Baseline of the text string. Passed by reference. count int Number of characters. string string Array of characters. Passed by reference. -----------------------------------------------------------------------
DETAILS
This is the standard default method for the "draw text" callback point. You would normally call it only from your "draw text" callback function.
The text_info structure describes a text string that was inserted with Insert_Text, along with some information on how it is transformed to device coordinates. You would normally pass on to HIC_Draw_Text the same text_info structure that is passed to your callback function, except that HOOPS I.M. lets you reposition it with HIC_Set_Text_Position.
HIC_Draw_Text reconciles the text attributes in the rendition nr with the capabilities of the requested font, and completes the computations needed to draw the text. In particular, it applies the per-character transformations when appropriate and the atmospheric attenuation when called for in the rendition. It may replace the font specified in the rendition by a stroked font if the former font does not admit the transformations that are called for.
If the text is finally to be drawn in a font provided by the hardware, the window system, or the driver, "draw text" eventually calls on a driver-level "draw dc text" method, which does not have a callback point in the current version of I.M.. Otherwise, "draw text" causes the text to be stroked out, using the ordinary geometry drawing provisions, through "draw 3d text strokes" and "draw 3d text areas" when per-character transformations are in effect, or through "draw dc text strokes" and "draw dc text areas" when they are not in effect.
You can query fields of the text_info structure with the HIC_Show_Text_(parameters) functions listed below and reposition it with HIC_Set_Text_Position
PURPOSE
Draws a HOOPS window.
CALLING SEQUENCE
HIC_Draw_Window (nr, extent)
------------------------------------------------------------------------ nr HT_Rendition Rendition. Passed by reference. extent HT_Int_Rectangle Rectangle describing window in integer device coordinates. Passed by reference. ------------------------------------------------------------------------
DETAILS
This is the standard default method for the "draw windows" callback point.
It fills the intersection of the rectangle specified by extent and the current clipping rectangle with the pattern determined by the window color, window pattern, and window contrast color attributes contained in the rendition nr.
NOTES
Essentially, this function works by replacing the face attributes in the rendition nr with the window attributes and calling the "draw dc rectangle" method.
Note that it differs from the Set_Window of classic HOOPS in that it uses integer device coordinates rather than normalized floating window-relative coordinates.
PURPOSE
Draws the frame around a window.
CALLING SEQUENCE
HIC_Draw_Window_Frame (nr, extent, frame, calc)
--------------------------------------------------------------------------- nr HT_Rendition Rendition. Passed by reference. extent HT_Int_Rectangle Rectangle describing widow in integer device coordinates. Passed by reference. frame HT_Int_Rectangle Frame thickness, in integer device coordinate units. Returned by function. Passed by reference. calc boolean Calculate-only flag. ---------------------------------------------------------------------------
DETAILS
This is the standard default method for the "draw window frames" callback point.
It draws the frame around the window specified by extent, clipped to the clip rectangle specified in the rendition nr, provided that calc is false. The frame consists of two solid polylines in the form of concentric rectangles, each drawn with the device's default line weight, in the color of the window contrast color attribute contained in the rendition nr. The outer polyline is at the edge of the clipped window. The spacing between the two polylines is the default line weight.
The function returns the default line weight in all four components of frame.
If calc is true then the function draws nothing, but still returns the default line weight in all four components of frame.