TTMSFNCSVGImport Class
Abstract base class for SVG importers that parse and render scalable vector graphics into bitmaps or directly onto a canvas.
API unit family: TMSFNCTypes
Inherits from: TPersistent
Syntax
TTMSFNCSVGImport = class(TPersistent)
Properties
| Name | Description |
|---|---|
| CustomFillColor | Overrides all SVG fill colors with the specified custom color. |
| CustomOpacity | Overrides the global opacity of the rendered SVG. Use values between 0 (transparent) and 1 (fully opaque). |
| CustomStrokeColor | Overrides all SVG stroke colors with the specified custom color. |
| GrayScale | When True, renders the SVG in grayscale. Defaults to False. |
| RotationAngle | The angle in degrees by which the SVG content is rotated during rendering. |
| TintColor | Blends all SVG fill colors toward the specified tint color. |
| ViewRect | The bounding rectangle defined in the SVG viewport, used for scaling and clipping. |
Methods
| Name | Description |
|---|---|
| Clear | Removes the currently loaded SVG content and resets all parsed elements. |
| Draw | Renders the current SVG content onto the specified canvas within the given rectangle. |
| ElementCount | Returns the number of top-level SVG elements parsed from the current SVG source. |
| GenerateBitmap | Renders the current SVG content into a new bitmap of the specified size and returns it. |
| HasElements | Returns True when the importer has parsed at least one SVG element. |
| LoadFromFile | Parses SVG content from the specified file and prepares it for rendering. |
| LoadFromStream | Parses SVG content from the specified stream and prepares it for rendering. |
| LoadFromText | Parses SVG content from the specified string and prepares it for rendering. |
| SaveToFile | Saves the current SVG source to the specified file. |
| SaveToStream | Writes the current SVG source to the specified stream. |