Renders a source vector in the effect pipeline.
The SourceFX class will render a named vector into a given rectangle within the current user coordinate system.
Technically the SourceFX object is represented by a new viewport, the bounds of which are defined by attributes X
, Y
, Width
and Height
. The placement and scaling of the referenced vector is controlled by the AspectRatio field.
The SourceFX class consists of the following fields:
Access | Name | Type | Comment | ||||||||||||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
AspectRatio | INT | SVG compliant aspect ratio settings. | |||||||||||||||||||||
| |||||||||||||||||||||||
Source | OBJECTPTR | The source Vector that will be rendered. | |||||||||||||||||||||
The Source field must refer to a Vector that will be rendered in the filter pipeline. The vector must be under the ownership of the same VectorScene that the filter pipeline belongs. | |||||||||||||||||||||||
SourceName | STRING | Name of a source definition to be rendered. | |||||||||||||||||||||
Setting Def to the name of a pre-registered scene definition will reference that object in Source. If the name is not registered then Vectors are registered via the VectorScene⇒AddDef() method. | |||||||||||||||||||||||
XMLDef | STRING | Returns an SVG compliant XML string that describes the filter. |
The following actions are currently supported:
Name | Comment | |||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|
Draw | Render the source vector to the target bitmap. | |||||||||||
ERR acDraw(*Object, DOUBLE X, DOUBLE Y, DOUBLE Width, DOUBLE Height)
|
Aspect ratios control alignment, scaling and clipping.
Name | Description |
---|---|
ARF::MEET | Aspect ratio is preserved. The entire viewbox will be visible in the viewport. The viewbox is scaled up as much as possible. |
ARF::NONE | Scale the viewbox to match the size of the viewport. Aspect ratio is not preserved. |
ARF::SLICE | Aspect ratio is preserved. The viewbox can extend beyond the viewport's edges on one axis. The viewbox is scaled up as much as possible. |
ARF::X_MAX | Align to the right. |
ARF::X_MID | Align to the horizontal center. |
ARF::X_MIN | Align to the left. |
ARF::Y_MAX | Align to the bottom. |
ARF::Y_MID | Align to the vertical center. |
ARF::Y_MIN | Align to the top. |
Class Info | |
---|---|
ID | ID_SOURCEFX |
Category | Graphics |
Include | modules/sourcefx.h |
Version | 1 |