Create, manipulate and draw vector graphics to bitmaps.
The Vector module exports a small number of functions to assist the Vector class, as well as some primitive functions for creating paths and rendering them to bitmaps.
ApplyPath | ArcTo | CharWidth | ClosePath | Curve3 | Curve4 | DrawPath | FlushMatrix | GenerateEllipse | GeneratePath | GenerateRectangle | GetFontHandle | GetFontMetrics | GetVertex | LineTo | MoveTo | Multiply | MultiplyMatrix | ParseTransform | ReadPainter | ResetMatrix | RewindPath | Rotate | Scale | Skew | Smooth3 | Smooth4 | StringWidth | TracePath | Translate | TranslatePath
DiffusionCurveRecord | FontMetrics | GouraudVertex | GradientStop | MergeSource | MeshControl | MeshPatchRecord | PathCommand | Transition | VectorMatrix | VectorPainter | VectorPoint | VoronoiPoint
BlurFX | ColourFX | CompositeFX | ConvolveFX | DisplacementFX | FilterEffect | FloodFX | Gradient | GradientConic | GradientContour | GradientDiamond | GradientDiffusion | GradientDistal | GradientGouraud | GradientLinear | GradientMesh | GradientRadial | GradientVoronoi | ImageFX | LightingFX | MergeFX | MorphologyFX | OffsetFX | RemapFX | SourceFX | TurbulenceFX | Vector | VectorClip | VectorColour | VectorEllipse | VectorFilter | VectorGroup | VectorImage | VectorPath | VectorPattern | VectorPolygon | VectorRectangle | VectorScene | VectorShape | VectorSpiral | VectorText | VectorTransition | VectorViewport | VectorWave | WaveFunctionFX
Applies a generated path resource to a VectorPath object.
| Parameter | Description |
|---|---|
| Path | The source path to be copied. |
| VectorPath | The target VectorPath object. |
Any path originating from GeneratePath(), GenerateEllipse() or GenerateRectangle() can be applied to a VectorPath object by calling ApplyPath(). The source Path can then be deallocated with FreeResource() if it is no longer required.
This function is intended for paths that are generated or changed at run-time, where converting the path back to a string would add unnecessary processing overhead.
| Okay | Operation successful. |
|---|---|
| InvalidData | There is an error in the provided data |
| NullArgs | Function call missing argument value(s) |
| WrongClass | An object is not of the required class type |
Appends an arc command to a generated path.
| Parameter | Description |
|---|---|
| Path | The vector path to modify. |
| RX | The horizontal radius of the arc. |
| RY | The vertical radius of the arc. |
| Angle | The angle of the arc, expressed in radians. |
| X | The horizontal end point for the arc command. |
| Y | The vertical end point for the arc command. |
| Flags | Optional flags. |
This function appends an arc segment from the current point to X,Y. The LARGE and SWEEP values in Flags control which of the possible arcs is selected.
Returns the rendered width of a single character.
| Parameter | Description |
|---|---|
| FontHandle | The font to use for calculating the character width. |
| Char | A 32-bit unicode character. |
| KChar | A unicode character to use for calculating the font kerning (optional). |
| Kerning | The resulting kerning value (optional). |
This function returns the pixel width of a font character. The character is specified as a Unicode value in the Char parameter. Kerning can also be returned for positioning the character against a preceding character. Pass the preceding character in KChar and a Kerning pointer to receive the horizontal adjustment. If kerning information is not required, set KChar to zero and Kerning to NULL.
The font's glyph spacing value is not used in calculating the character width.
The pixel width of the character, or 0 if FontHandle is NULL.
Closes the current sub-path.
| Parameter | Description |
|---|---|
| Path | The vector path to modify. |
This function appends a close-path command that connects the current point to the beginning of the current sub-path.
Closing a path does not terminate the path resource. Further sub-paths can be added to the sequence, and fill rules can then be used to control how overlapping areas are rendered.
Appends a quadratic Bezier curve to a generated path.
| Parameter | Description |
|---|---|
| Path | The vector path to modify. |
| CtrlX | Control point horizontal coordinate. |
| CtrlY | Control point vertical coordinate. |
| X | The horizontal end point for the curve3 command. |
| Y | The vertical end point for the curve3 command. |
This function appends a quadratic Bezier segment from the current point to X,Y using CtrlX,CtrlY as the control point.
Appends a cubic Bezier curve to a generated path.
| Parameter | Description |
|---|---|
| Path | The vector path to modify. |
| CtrlX1 | Control point 1 horizontal coordinate. |
| CtrlY1 | Control point 1 vertical coordinate. |
| CtrlX2 | Control point 2 horizontal coordinate. |
| CtrlY2 | Control point 2 vertical coordinate. |
| X | The horizontal end point for the curve4 command. |
| Y | The vertical end point for the curve4 command. |
This function appends a cubic Bezier segment from the current point to X,Y using two control points.
Draws a generated vector path to a target bitmap.
| Parameter | Description |
|---|---|
| Bitmap | Pointer to a target Bitmap object. |
| Path | The vector path to render. |
| StrokeWidth | The width of the stroke. Set to 0 if no stroke is required. |
| StrokeStyle | Pointer to a valid object for stroke definition, or NULL if none required. |
| FillStyle | Pointer to a valid object for fill definition, or NULL if none required. |
Use DrawPath() to draw a generated path to a Bitmap, using customised fill and stroke definitions. This functionality provides an effective alternative to configuring vector scenes for situations where only simple vector shapes are required. However, it is limited in that advanced rendering options and effects are not available to the client.
At least one of StrokeStyle or FillStyle is required to render visible output. Valid styles are allocated and configured using recognised vector style objects, specifically VectorImage, VectorPattern and Gradient. If a fill or stroke operation is not required, set the relevant parameter to NULL. Stroke rendering is also disabled when StrokeWidth is less than 0.001.
| Okay | Operation successful. |
|---|---|
| NullArgs | Function call missing argument value(s) |
Marks a vector transform as changed after direct matrix edits.
| Parameter | Description |
|---|---|
| Matrix | The matrix to be flushed. |
If a vector's matrix values have been modified directly by the client, call FlushMatrix() before the next draw cycle so the owning vector is marked for transform recalculation.
Note that if the client uses API functions to modify a VectorMatrix, a call to FlushMatrix() is unnecessary as the vector will have already been marked for an update.
| Okay | Operation successful. |
|---|---|
| NullArgs | Function call missing argument value(s) |
Generates an elliptical path resource.
| Parameter | Description |
|---|---|
| CX | Horizontal centre point of the ellipse. |
| CY | Vertical centre point of the ellipse. |
| RX | Horizontal radius of the ellipse. |
| RY | Vertical radius of the ellipse. |
| Vertices | Optional. If this is 3 or greater, the ellipse will be generated with exactly this many vertices. |
| Path | A pointer variable that will receive the resulting path. |
Use GenerateEllipse() to create an elliptical path suitable for passing to vector functions that receive a Path parameter. The path must be manually deallocated with FreeResource() once it is no longer required.
| Okay | Operation successful. |
|---|---|
| NullArgs | Function call missing argument value(s) |
| CreateResource | Failed to create a new resource |
Generates a path resource from an SVG path command sequence.
| Parameter | Description |
|---|---|
| Sequence | The command sequence to process. If no sequence is specified then the path will be empty. |
| Path | A pointer variable that will receive the resulting path. |
This function generates a vector path from a sequence of coordinates and path instructions. The resulting path can then be passed to vector functions that receive a Path parameter. The path must be manually deallocated with FreeResource() once it is no longer required.
The Sequence string is based on the SVG path element's d attribute. Uppercase commands use absolute coordinates; lowercase commands use coordinates relative to the previous command.
The following commands are supported:
M: Move To L: Line To V: Vertical Line To H: Horizontal Line To Q: Quadratic Curve To T: Quadratic Smooth Curve To C: Curve To S: Smooth Curve To A: Arc Z: Close Path
If Sequence is empty, an empty path resource will be generated. This path can be populated with functions such as MoveTo() and LineTo().
| Okay | Operation successful. |
|---|---|
| InvalidData | There is an error in the provided data |
| AllocMemory | Failed to create a new memory block |
| BufferOverflow | A buffer overflow has occurred |
| NullArgs | Function call missing argument value(s) |
| InvalidValue | A value has not passed validation |
Generates a rectangular path resource.
| Parameter | Description |
|---|---|
| X | The horizontal position of the rectangle. |
| Y | The vertical position of the rectangle. |
| Width | The width of the rectangle. |
| Height | The height of the rectangle. |
| Path | A pointer variable that will receive the resulting path. |
Use GenerateRectangle() to create a rectangular path suitable for passing to vector functions that receive a Path parameter. The path must be manually deallocated with FreeResource() once it is no longer required.
| Okay | Operation successful. |
|---|---|
| NullArgs | Function call missing argument value(s) |
| CreateResource | Failed to create a new resource |
Returns a cached handle for a font family, style and size.
| Parameter | Description |
|---|---|
| Family | The name of the font family to access. |
| Style | The preferred style to choose from the family. Use Regular or NULL for the default. |
| Weight | Equivalent to CSS font-weight; a value of 400 or 0 will equate to normal. |
| Size | The font-size, measured in pixels @ 72 DPI. |
| Handle | The resulting font handle is returned here. |
For a given font family, style and size, this function returns a Handle that can be passed to font querying functions.
The handle is deterministic and permanent, remaining valid for the lifetime of the program.
| Okay | Operation successful. |
|---|---|
| Failed | General failure |
| File | File error, e.g. file not found |
| Search | A search routine in this function failed |
| Args | Invalid arguments passed to function |
| AccessObject | Attempting to lock an object failed |
| AllocMemory | Failed to create a new memory block |
| ResolvePath | A call to ResolvePath() failed |
| CreateObject | A call to CreateObject() failed |
Returns display metrics for a font handle.
| Parameter | Description |
|---|---|
| Handle | A font handle obtained from GetFontHandle(). |
| Info | The font metrics for the Handle will be stored here. |
Call GetFontMetrics() to retrieve the font height, line spacing, ascent and descent values for a font handle.
| Okay | Operation successful. |
|---|---|
| NullArgs | Function call missing argument value(s) |
Retrieves the next vertex from a generated path.
| Parameter | Description |
|---|---|
| Path | The vector path to query. |
| X | Pointer to a double that will receive the X coordinate value. |
| Y | Pointer to a double that will receive the Y coordinate value. |
The coordinates of the next vertex are returned in X and Y. The return value is the internal command value for that vertex, or the path stop command when there are no more vertices to read.
The internal command value for the vertex will be returned.
Appends a line segment to a generated path.
| Parameter | Description |
|---|---|
| Path | The vector path to modify. |
| X | The line end point on the horizontal plane. |
| Y | The line end point on the vertical plane. |
This function appends a straight line from the current point to X,Y.
Moves the current point in a generated path.
| Parameter | Description |
|---|---|
| Path | The vector path to modify. |
| X | The horizontal end point for the command. |
| Y | The vertical end point for the command. |
This function appends a move command. The current point is moved to X,Y without drawing a line.
Multiplies a matrix by explicit affine transform values.
| Parameter | Description |
|---|---|
| Matrix | The target transformation matrix. |
| ScaleX | Matrix value A. |
| ShearY | Matrix value B. |
| ShearX | Matrix value C. |
| ScaleY | Matrix value D. |
| TranslateX | Matrix value E. |
| TranslateY | Matrix value F. |
This function multiplies the target VectorMatrix by the supplied affine transform values.
| Okay | Operation successful. |
|---|---|
| NullArgs | Function call missing argument value(s) |
Multiplies a target matrix by a source matrix.
| Parameter | Description |
|---|---|
| Target | The target transformation matrix. |
| Source | The source transformation matrix. |
This function multiplies Target by Source and stores the result in Target.
| Okay | Operation successful. |
|---|---|
| NullArgs | Function call missing argument value(s) |
Parses an SVG transform string and applies it to a matrix.
| Parameter | Description |
|---|---|
| Matrix | The target transformation matrix. |
| Transform | The transform to apply, expressed as a string instruction. |
This function parses a sequence of SVG transform instructions and applies them to a matrix.
The string must be written using SVG transform attribute syntax. For example, skewX(20) rotate(45 50 50) is valid. Transform instructions are applied in reverse order, as required by the SVG transform model. Unsupported transform text is skipped.
Any existing values in Matrix are reset before the parsed transforms are applied. If existing matrix values need to be retained, parse into a separate matrix and use MultiplyMatrix() to combine the result.
| Okay | Operation successful. |
|---|---|
| NullArgs | Function call missing argument value(s) |
Parses a painter string to its colour, gradient, pattern or image value.
| Parameter | Description |
|---|---|
| Scene | Optional. Required if url() references are to be resolved. |
| IRI | The IRI string to be translated. |
| Painter | This VectorPainter structure will store the deserialised result. |
| Result | Optional reference for storing the end of the parsed IRI string. An empty string is returned if there is no further content to parse or an error occurred. |
This function will parse an SVG style IRI into its equivalent logical values. The results can then be processed for rendering a stroke or fill operation in the chosen style.
Colours can be expressed in the following formats:
| Name | Description |
|---|---|
| Named colour | Standard SVG colour names such as orange and red are accepted. Application-defined
colour names are also supported. |
| #RRGGBB / #RRGGBBAA | Hexadecimal formats. Alpha defaults to fully opaque when omitted. |
| rgb(R,G,B) / rgba(R,G,B,A) | Legacy comma-separated format. Component values range from 0 to 255,
or from 0% to 100%. The alpha component ranges from 0.0 to 1.0 (or 0% to 100%). |
| rgb(R G B) / rgb(R G B / A) | Modern CSS space-separated format. Component values range from 0 to
255, or from 0% to 100%. Alpha is optional, preceded by /, and ranges from 0.0 to 1.0 (or 0% to
100%). |
| hsl(H,S,L) / hsla(H,S,L,A) | Hue is expressed in degrees (0-360). Saturation and lightness are
percentages. Alpha ranges from 0.0 to 1.0. |
| hsv(H,S,V) | Hue in degrees (0-360), saturation and value as percentages. An optional alpha
component ranging from 0.0 to 1.0 is supported. |
| oklab(L a b [/ A]) | CSS Color Level 4 OKLAB colour space. Lightness (L) is 0-1 or 0%-100%.
The a and b axes range from approximately -0.4 to 0.4, or as percentages where 100% equals 0.4.
Alpha (A) is optional, preceded by /, and ranges from 0.0 to 1.0 or 0% to 100%. |
| oklch(L C H [/ A]) | CSS Color Level 4 OKLCh colour space. Lightness (L) is 0-1 or 0%-100%.
Chroma (C) is an unbounded positive value, or a percentage where 100% equals 0.4. Hue (H) is in degrees.
Alpha (A) is optional, preceded by /, and ranges from 0.0 to 1.0 or 0% to 100%. |
| lab(L a b [/ A]) | CSS Color Level 4 CIE Lab colour space. Lightness (L) is 0-100 or 0%-100%.
The a and b axes range from approximately -125 to 125, or as percentages where 100% equals 125.
Alpha (A) is optional, preceded by /, and ranges from 0.0 to 1.0 or 0% to 100%. |
| lch(L C H [/ A]) | CSS Color Level 4 CIE LCH colour space (cylindrical form of Lab). Lightness (L) is
0-100 or 0%-100%. Chroma (C) is an unbounded positive value, or a percentage where 100% equals 150.
Hue (H) is in degrees. Alpha (A) is optional, preceded by /, and ranges from 0.0 to 1.0 or
0% to 100%. |
A Gradient, Image or Pattern can be referenced using the url(#name) format, where name is a definition registered with the provided Scene object. If Scene is NULL then it will not be possible to find the reference. Any failure to look up a reference will result in an error. The Scene parameter accepts either a VectorScene or a Vector object if its Scene field value is defined.
To access one of the pre-defined colourmaps, use the format url(#cmap:name). The colourmap will be accessible as a linear gradient that belongs to the Scene. Valid colourmap names are cmap:crest, cmap:flare, cmap:icefire, cmap:inferno, cmap:magma, cmap:mako, cmap:plasma, cmap:rocket, cmap:viridis.
A VectorPainter structure must be provided by the client and will be used to store the final result. All pointers that are returned will remain valid as long as the provided Scene exists with its registered painter definitions. An optional Result string can store a reference to the character position up to which the IRI was parsed.
Note: To ensure that colour values are never clipped, values stored in the Colour field are unclamped from the sRGB colour space (colours may be negative or exceed 1.0). Clients must clamp colours as necessary when converting to their target colour space.
| Okay | Operation successful. |
|---|---|
| NotFound | A search routine in this function failed |
| Syntax | Invalid syntax detected |
| NullArgs | Function call missing argument value(s) |
| InvalidObject | An object is not of the required class type |
Resets a transformation matrix to the identity transform.
| Parameter | Description |
|---|---|
| Matrix | The target transformation matrix. |
Call ResetMatrix() to clear all scaling, skewing, rotation and translation from a !VectorMatrix.
| Okay | Operation successful. |
|---|---|
| NullArgs | Function call missing argument value(s) |
Resets path iteration to the first vertex.
| Parameter | Description |
|---|---|
| Path | The vector path to rewind. |
Rewinding a path resets its internal vertex iterator to the first vertex. The next call to GetVertex() will read from the start of the path.
If the referenced Path is empty, this function does nothing.
Applies a rotation transform to a matrix.
| Parameter | Description |
|---|---|
| Matrix | The target transformation matrix. |
| Angle | Angle of rotation, in degrees. |
| CenterX | Centre of rotation on the horizontal axis. |
| CenterY | Centre of rotation on the vertical axis. |
This function rotates a matrix by Angle degrees. Rotation occurs around (0, 0) unless CenterX and CenterY specify another centre point.
| Okay | Operation successful. |
|---|---|
| NullArgs | Function call missing argument value(s) |
Applies a scale transform to a matrix.
| Parameter | Description |
|---|---|
| Matrix | The target transformation matrix. |
| X | The scale factor on the x-axis. |
| Y | The scale factor on the y-axis. |
This function scales a matrix on the x and y axes. Values less than 1.0 shrink the affected vector path, while values greater than 1.0 enlarge it.
Scaling is relative to position (0, 0). If the width and height of the vector path needs to be transformed without affecting its top-left position, the client must translate the path to (0, 0) around its centre point. The path should then be scaled before being transformed back to its original top-left coordinate.
The scale operation can also be used to flip a vector path if negative values are used. For instance, a value of -1.0 on the x axis results in a 1:1 horizontal flip.
| Okay | Operation successful. |
|---|---|
| NullArgs | Function call missing argument value(s) |
Applies a skew transform to a matrix.
| Parameter | Description |
|---|---|
| Matrix | The target transformation matrix. |
| X | The angle to skew along the horizontal. |
| Y | The angle to skew along the vertical. |
The Skew function applies a skew transformation to the horizontal and/or vertical axis of the matrix. Valid X and Y values are in the range -90 < Angle < 90.
If X is valid and Y is outside the valid range, the horizontal skew is applied before ERR::OutOfRange is returned.
| Okay | Operation successful. |
|---|---|
| OutOfRange | At least one of the angles is out of the allowable range. |
| NullArgs | Function call missing argument value(s) |
Appends a smooth quadratic Bezier curve to a generated path.
| Parameter | Description |
|---|---|
| Path | The vector path to modify. |
| X | The horizontal end point for the smooth3 command. |
| Y | The vertical end point for the smooth3 command. |
This function appends a quadratic Bezier segment from the current point to X,Y. The control point is reflected from the previous curve command.
Appends a smooth cubic Bezier curve to a generated path.
| Parameter | Description |
|---|---|
| Path | The vector path to modify. |
| CtrlX | Control point horizontal coordinate. |
| CtrlY | Control point vertical coordinate. |
| X | The horizontal end point for the smooth4 instruction. |
| Y | The vertical end point for the smooth4 instruction. |
This function appends a cubic Bezier segment from the current point to X,Y. The previous curve command supplies the reflected first control point, and CtrlX,CtrlY supply the second control point.
Calculates the rendered width of a UTF-8 string.
| Parameter | Description |
|---|---|
| FontHandle | A font handle obtained from GetFontHandle(). |
| String | Pointer to a null-terminated string. |
| Chars | Maximum number of bytes to process from String. Set to -1 for the full string. |
This function calculates the pixel width of String for a known font. Line-feeds are treated as line breaks, so for multi-line strings the width of the longest line is returned.
For scalable fonts, kerning is included when computing the distance between glyphs.
The pixel width of the string, or 0 if FontHandle or String is NULL.
Calls a function for each traced coordinate in a generated path.
| Parameter | Description |
|---|---|
| Path | The vector path to trace. |
| Callback | A function to call with the path coordinates. |
| Scale | Set to 1.0 (recommended) to trace the path at a scale of 1 to 1. |
Any generated path can be traced by calling this function. Tracing allows the caller to follow the Path point-by-point as it would be rendered with a stroke. The Callback function signature is ERR Function(*Path, INT Index, INT Command, DOUBLE X, DOUBLE Y, *Meta).
The Index is an incrementing counter for each plotted point. The Command value identifies the internal path command, and X,Y are the traced coordinates.
If the Callback returns ERR::Terminate, processing stops and the function returns immediately.
| Okay | Operation successful. |
|---|---|
| Terminate | Termination requested |
| NullArgs | Function call missing argument value(s) |
| Function | A function call failed |
Applies a translation transform to a matrix.
| Parameter | Description |
|---|---|
| Matrix | The target transformation matrix. |
| X | Translation along the x-axis. |
| Y | Translation along the y-axis. |
This function adds the supplied x and y offsets to the matrix translation values.
| Okay | Operation successful. |
|---|---|
| NullArgs | Function call missing argument value(s) |
Translates every vertex in a generated path.
| Parameter | Description |
|---|---|
| Path | Pointer to a generated path. |
| X | Horizontal offset. |
| Y | Vertical offset. |
This function offsets all vertices in Path by X,Y. If Path is NULL, the call is ignored.
Options for drawing arcs.
| Name | Description |
|---|---|
| ARC::LARGE | The arc will take the longest available drawing path rather than the shortest. |
| ARC::SWEEP | Inverts the default behaviour in generating the arc path (go clockwise). |
JET constants are documented in GetInputEvent()
| Name | Description |
|---|---|
| JET::ABS_XY | The X, Y values are defined as absolute coordinates, relative to the top-left of the display |
| JET::BUTTON_1 | Left mouse button; XBox A button, PS square button. Value is pressure sensitive, ranging between 0 - 1.0 (0 is released, 1.0 is fully depressed) |
| JET::BUTTON_10 | Non-specific button assignment |
| JET::BUTTON_2 | Right mouse button; XBox X button, PS cross button |
| JET::BUTTON_3 | Middle mouse button; XBox Y button, PS triangle |
| JET::BUTTON_4 | Alt. mouse button 1; XBox B button, PS circle |
| JET::BUTTON_5 | Alt. mouse button 2 |
| JET::BUTTON_6 | Non-specific button assignment |
| JET::BUTTON_7 | Non-specific button assignment |
| JET::BUTTON_8 | Non-specific button assignment |
| JET::BUTTON_9 | Non-specific button assignment |
| JET::CROSSED_IN | This message is sent by the input system when the mouse pointer enters an area for the first time. The message value refers to the object ID of the container being monitored for movement |
| JET::CROSSED_OUT | This message is sent by the input system when the mouse pointer leaves an area. The message value refers to the object ID of the container being monitored for movement |
| JET::DEVICE_TILT_XY | Controller tilted on the X/Y axis. Value indicates angle, -ve = left, +ve = right |
| JET::DEVICE_TILT_Z | Controller is rising or falling. Value expressed as 'speed', |
| JET::DISPLAY_EDGE | Recently supplied input occurred at the edge of the display |
| JET::PEN_TILT_XY | Pen tilt angle. 0 is pointing down directly with nib at bottom, 0.5 is 90 degrees, 1.0 is inversed (eraser at bottom) |
| JET::PRESSURE | Amount of pressure applied, ranges from 0 (none) to 1.0 (normal) and possibly higher if user presses hard enough |
| JET::WHEEL | Mouse wheel rotation - the value generally reflects the number of 'clicks' rotated on the wheel |
| JET::WHEEL_TILT | Some mouse wheels can be tilted to the left or right. Ranges from -1.0 to +1.0 |
JTYPE flags are used to categorise input types
| Name | Description |
|---|---|
| JTYPE::ANALOG | Analog movement (ranging from -1.0 to 1.0) |
| JTYPE::ANCHORED | Cursor has been anchored with LockCursor() |
| JTYPE::BUTTON | Input is a physical button or switch |
| JTYPE::CROSSING | Crossing events manage the entering and leaving of an area |
| JTYPE::DBL_CLICK | Set by the input system if the Type is a button and the button has been clicked in quick succession so as to be classed as a double-click |
| JTYPE::DIGITAL | D-Pad or digital joystick source (restricted to +/- 1) |
| JTYPE::DRAGGED | Set if sufficient movement occurred between the original click and its point of release (usually requires a 3 or more pixel difference) |
| JTYPE::DRAG_ITEM | This special flag is set by the input system if the pointer is click-dragging an object at the time of the event |
| JTYPE::EXT_MOVEMENT | Extended or indirect movement information. This covers all types of movement that are unconnected to coordinate positioning - mouse wheel movement and pen tilt are two such examples |
| JTYPE::MOVEMENT | X/Y coordinate movement only. Movement such as the wheel mouse spinning is not covered by this type as it does not influence the coordinate system |
| JTYPE::REPEATED | Input is a repeated entry (i.e. user is holding down a button and a repetition timer is being triggered) |
| JTYPE::SECONDARY | Indicates to the receiver of this message that it is not the primary/original recipient |
| Name | Description |
|---|---|
| PE::Arc | |
| PE::ArcRel | |
| PE::ClosePath | |
| PE::Curve | |
| PE::CurveRel | |
| PE::HLine | |
| PE::HLineRel | |
| PE::Line | |
| PE::LineRel | |
| PE::Move | |
| PE::MoveRel | |
| PE::QuadCurve | |
| PE::QuadCurveRel | |
| PE::QuadSmooth | |
| PE::QuadSmoothRel | |
| PE::Smooth | |
| PE::SmoothRel | |
| PE::VLine | |
| PE::VLineRel |
Filter source types - these are used internally
| Name | Description |
|---|---|
| VSF::ALPHA | As for GRAPHIC except that only the alpha channel is used. |
| VSF::BKGD | An image snapshot of the SVG document under the filter region at the time that the filter element was invoked. |
| VSF::BKGD_ALPHA | As for BKGD but only the alpha channel is used. |
| VSF::FILL | The value of the fill property on the target element for the filter effect. |
| VSF::GRAPHIC | Represents the graphics elements that were the original input into the filter element. |
| VSF::IGNORE | The filter does not require an input source. |
| VSF::PREVIOUS | Use the previous effect as input, or source graphic if no previous effect. |
| VSF::REFERENCE | This value is an assigned name for the filter primitive in the form of a custom-ident. If supplied, then graphics that result from processing this filter primitive can be referenced by an in attribute on a subsequent filter primitive within the same filter element. If no value is provided, the output will only be available for re-use as the implicit input into the next filter primitive if that filter primitive provides no value for its in attribute. |
| VSF::STROKE | The value of the stroke property on the target element for the filter effect. |
Describes one curve for the GradientDiffusion Curves field.
| Field | Type | Description |
|---|---|---|
| Curve | struct MeshControl | Cubic Bezier geometry for this curve segment. |
| LeftStart | struct FRGB | Colour on the left side at the start of the curve. |
| LeftEnd | struct FRGB | Colour on the left side at the end of the curve. |
| RightStart | struct FRGB | Colour on the right side at the start of the curve. |
| RightEnd | struct FRGB | Colour on the right side at the end of the curve. |
Font metrics, measured in pixels relative to the display
| Field | Type | Description |
|---|---|---|
| Height | INT | Full font height equivalent to Ascent (cap-height) + Descent (gutter). Does NOT include accents. |
| LineSpacing | INT | Vertical advance from one line to the next. Includes coverage for accents and additional whitespace. |
| Ascent | INT | Height from the baseline to the top (cap-height) of the font. Does NOT include accents. |
| Descent | INT | Height from the baseline to the bottom of the font (gutter) |
Describes a coloured vertex for the GradientGouraud Vertices field.
| Field | Type | Description |
|---|---|---|
| X | DOUBLE | The X coordinate of the vertex. |
| Y | DOUBLE | The Y coordinate of the vertex. |
| Colour | struct FRGB | The floating point RGB colour assigned to this vertex. |
Describes a colour stop for the Gradient Stops field.
| Field | Type | Description |
|---|---|---|
| Offset | DOUBLE | An offset in the range of 0 - 1.0 |
| RGB | struct FRGB | A floating point RGB value. |
Input source declaration for MergeFX
| Field | Type | Description |
|---|---|---|
| SourceType | VSF | The type of the required source. |
| Effect | objFilterEffect * | Effect pointer if the SourceType is REFERENCE. |
Describes one control point for the GradientMesh.
| Field | Type | Description |
|---|---|---|
| StartX | DOUBLE | Starting X coordinate. |
| StartY | DOUBLE | Starting Y coordinate. |
| EndX | DOUBLE | Ending X coordinate. |
| EndY | DOUBLE | Ending Y coordinate. |
| X1 | DOUBLE | First control point X coordinate. |
| Y1 | DOUBLE | First control point Y coordinate. |
| X2 | DOUBLE | Second control point X coordinate. |
| Y2 | DOUBLE | Second control point Y coordinate. |
Describes one bilinear Coons patch for the GradientMesh Patches field.
| Field | Type | Description |
|---|---|---|
| Top | struct MeshControl | Top edge |
| Right | struct MeshControl | Right edge |
| Bottom | struct MeshControl | Bottom edge |
| Left | struct MeshControl | Left edge |
| TopLeft | struct FRGB | Colour assigned to the top-left patch corner. |
| TopRight | struct FRGB | Colour assigned to the top-right patch corner. |
| BottomRight | struct FRGB | Colour assigned to the bottom-right patch corner. |
| BottomLeft | struct FRGB | Colour assigned to the bottom-left patch corner. |
Base structure for path commands.
| Field | Type | Description |
|---|---|---|
| Type | PE | The command type |
| LargeArc | UINT8 | Equivalent to the large-arc-flag in SVG, it ensures that the arc follows the longest drawing path when TRUE. |
| Sweep | UINT8 | Equivalent to the sweep-flag in SVG, it inverts the default behaviour in generating arc paths. |
| Pad1 | UINT8 | Private |
| X | DOUBLE | The targeted X coordinate (absolute or scaled) for the command |
| Y | DOUBLE | The targeted Y coordinate (absolute or scaled) for the command |
| AbsX | DOUBLE | Private |
| AbsY | DOUBLE | Private |
| X2 | DOUBLE | The X2 coordinate for curve commands, or RX for arcs |
| Y2 | DOUBLE | The Y2 coordinate for curve commands, or RY for arcs |
| X3 | DOUBLE | The X3 coordinate for curve-to or smooth-curve-to |
| Y3 | DOUBLE | The Y3 coordinate for curve-to or smooth-curve-to |
| Angle | DOUBLE | Arc angle |
For VectorTransition definitions
| Field | Type | Description |
|---|---|---|
| Offset | DOUBLE | An offset from 0.0 to 1.0 at which to apply the transform. |
| Transform | STRING | A transform string, as per SVG guidelines. |
Vector transformation matrix.
| Field | Type | Description |
|---|---|---|
| Next | struct VectorMatrix * | The next transform in the list. |
| Vector | objVector * | The vector associated with the transform. |
| ScaleX | DOUBLE | Matrix value A |
| ShearY | DOUBLE | Matrix value B |
| ShearX | DOUBLE | Matrix value C |
| ScaleY | DOUBLE | Matrix value D |
| TranslateX | DOUBLE | Matrix value E |
| TranslateY | DOUBLE | Matrix value F |
| Tag | INT | An optional tag value defined by the client for matrix identification. |
Deserialised painter information; compliant with SVG painter definitions.
| Field | Type | Description |
|---|---|---|
| Pattern | objVectorPattern * | A VectorPattern object, suitable for pattern based fills. |
| Image | objVectorImage * | A VectorImage object, suitable for image fills. |
| Gradient | objGradient * | A Gradient object, suitable for gradient fills. |
| Colour | struct FRGB | A single RGB colour definition, suitable for block colour fills. Colour values are unclamped to support all possible colour spaces. |
Structure for the VectorPolygon PointsArray field.
| Field | Type | Description |
|---|---|---|
| X | DOUBLE | The X coordinate of this point. |
| Y | DOUBLE | The Y coordinate of this point. |
| XScaled | UINT8 | TRUE if the X value is scaled to its viewport (between 0 and 1.0). |
| YScaled | UINT8 | TRUE if the Y value is scaled to its viewport (between 0 and 1.0). |
Describes a feature point for the GradientVoronoi Points field.
| Field | Type | Description |
|---|---|---|
| X | DOUBLE | The X coordinate of the feature point. |
| Y | DOUBLE | The Y coordinate of the feature point. |
| Height | DOUBLE | The per-point height used by WEIGHTED and PEAKS modes. |