Functions |
|
Rt2dBrush * | Rt2dBrushCreate (void) |
RwBool | Rt2dBrushDestroy (Rt2dBrush *brush) |
Rt2dBrush * | Rt2dBrushSetRGBA (Rt2dBrush *brush, RwRGBA *col0, RwRGBA *col1, RwRGBA *col2, RwRGBA *col3) |
Rt2dBrush * | Rt2dBrushSetUV (Rt2dBrush *brush, RwV2d *uv0, RwV2d *uv1, RwV2d *uv2, RwV2d *uv3) |
Rt2dBrush * | Rt2dBrushSetTexture (Rt2dBrush *brush, RwTexture *texture) |
RwUInt32 | Rt2dBrushStreamGetSize (Rt2dBrush *brush) |
Rt2dBrush * | Rt2dBrushStreamWrite (Rt2dBrush *brush, RwStream *stream) |
Rt2dBrush * | Rt2dBrushStreamRead (RwStream *stream) |
Rt2dBrush * | Rt2dBrushSetWidth (Rt2dBrush *brush, RwReal width) |
RwReal | Rt2dBrushGetWidth (Rt2dBrush *brush) |
|
Rt2dBrushCreate is used to create a new brush for painting and filling paths. Note that the primitive resulting from a painted path is topologically equivalent to a rectangle. A newly created brush has a number of default properties but these can be defined by an application using the available API functions. Relevant properties are:
|
|
Rt2dBrushDestroy is used to destroy the specified brush. All brushes created by an application must be destroyed before the application closes down. The include file rt2d.h and the library file rt2d.lib are required to use this function.
|
|
Rt2dBrushGetWidth is used to retrieve the width of the specified brush. The width is used only when painting a path; it is measured perpendicular to path and the path lies at the center of the painted primitive. A newly created brush has a unit width. The include file rt2d.h and the library file rt2d.lib are required to use this function. Note that this function is used for debug purposes only and, for efficiency, is available as a macro for final release versions of an application.
|
|
Rt2dBrushSetRGBA is used to define the color of the specified brush. Four colors are required: For painting they define the colors at the corners of the resulting primitive; for filling they define the colors at the corners of the path's bounding-box. In both cases, corner colors are ordered anticlockwise and interior colors are determined by bilinear interpolation. By default all colors are opaque white. The include file rt2d.h and the library file rt2d.lib are required to use this function.
|
|
Rt2dBrushSetTexture is used to define a texture for the specified brush using the given image. For texturing to work properly, appropriate texture coordinates must also be defined. The include file rt2d.h and the library file rt2d.lib are required to use this function.
|
|
Rt2dBrushSetUV is used to define the texture coordinates for the specified brush. Four (u, v) pairs are required: For painting they define the texture coordinates at the corners of the resulting primitive; for filling they define the texture coordinates at the corners of the path's bounding-box. In both cases, corner texture coordinates are ordered anticlockwise and interior coordinates are determined by bilinear interpolation. By default all texture coordinates are zero. The include file rt2d.h and the library file rt2d.lib are required to use this function.
|
|
Rt2dBrushSetWidth is used to define the width of the specified brush. The width is used only when painting a path; it is measured perpendicular to path and the path lies at the center of the painted primitive. A newly created brush has a unit width. The include file rt2d.h and the library file rt2d.lib are required to use this function.
|
|
Rt2dBrushStreamGetSize is used to determine the size in bytes of the binary representation of the given brush. This is used in the binary chunk header to indicate the size of the chunk. The size does include the size of the chunk header.
|
|
Rt2dBrushStreamRead is used to read a brush object from the specified binary stream. Note that prior to this function call a brush chunk must be found in the stream using the RwStreamFindChunk API function. The sequence to locate and read a brush from a binary stream is as follows: RwStream *stream; Rt2dBrush *newBrush; stream = RwStreamOpen(rwSTREAMFILENAME, rwSTREAMREAD, "mybinary.xxx"); if( stream ) { if( RwStreamFindChunk(stream, rwID_2DBRUSH, NULL, NULL) ) { newBrush = Rt2dBrushStreamRead(stream); } RwStreamClose(stream, NULL); }
|
|
Rt2dBrushStreamWrite is used to write the specified brush to the given binary stream. Note that the stream will have been opened prior to this function call.
|
Converted from CHM to HTML with chm2web Pro 2.85 (unicode) |