|
AlignText(TSVGCustomText,TSVGShapePath,TSVGRect,TSVGPoint)
|
Aligns (start, middle, end) the text shape in the Line parameter (a string of character shapes) within the TextR rectangle. The TextPadding parameter controls the amount of padding, or margin, to leave within the TextR rectangle.
The alignment is based on the GetTextAlign method as well as the inline progression direction.
|
|
AssignProperties(TPersistent)
|
Copies the properties of source to the current element (but not children) (Overrides RSSVG.TSVGGraphicElement.AssignProperties(TPersistent).)
|
|
ChunkChildrenText(TSVGCanvas,TSVGMatrix,TSVGTextChunks)
|
Chunks the children of the current text element
|
|
ChunkText(TSVGCanvas,TSVGMatrix,TSVGTextChunks)
|
Chunks the current text element. If the TextChunks parameter already holds chunks, it appends onto the end.
Chunking means to divide text up into segments. Each absolute position adjustment defines a new text chunk. A text chunk can span text child elements if they do not define a new absolute position.
The Text field holds the text. The Chars array holds the position and formatting information for each character in the text.
|
|
Clear
|
Clears the SVG element and resets its properties back to their defaults (Overrides RSSVG.TSVGGraphicElement.Clear.)
|
|
ClearShapes(Boolean)
|
Clear the current Shape property and all children
|
|
ConvertToPath(TSVGShapePath,TSVGCanvas,String,Single,Single,TSVGTextAlign)
|
Overloaded. Convert text to path in one text chunk (no using X, Y, dx, dy, rotate, kerning, etc)
fast but inaccurate
|
|
CreateTextShapes(TSVGCanvas,TSVGMatrix)
|
Create text shapes, i.e., create path representations of the glyphs in the RSSVG.Text.TSVGCustomText.Text property.
|
|
CreateXLength(Single)
|
Represents method CreateXLength(Single).
|
|
CreateYLength(Single)
|
Represents method CreateYLength(Single).
|
|
DoDrawing(TObject,TSVGMatrix,TSVGCanvas,TSVGRect)
|
This method is called just before drawing the current element and its children. The method is called after the canvas brush, pen, font, clipping, etc are set up but before the actual drawing.
It exposes the OnDrawing event.
Note
|
This function returns True if the current element should be drawn. If the function returns False, the current element will not be drawn. However, its children's draw methods will still be called.
|
|
|
DoFillTextChunks(TSVGMatrix,TSVGCanvas,TSVGRect,TSVGTextChunks)
|
Draw the text chunks to the canvas using FillText calls
|
|
DoInternalDraw(TSVGMatrix,TSVGCanvas,TSVGRect)
|
Draw the current SVG element only (not its children) to the specified canvas inside the specified rectangle. The matrix parameter specifies the cumulative transformations from the Parent element (and its Parents) to apply when drawing the element.
This method is overridden by descendant classes for svg element specific drawing.
Note
|
If the Shape property returns a path, this method will draw the path
|
|
|
DoLoadFromXML(IXMLNode)
|
This method sets the properties of the svg element from the node when loading the svg from XML
This method does the work for the current svg element only.
|
|
DoMeasureText(TSVGCanvas)
|
Measures the width and height of the current element's RSSVG.Text.TSVGCustomText.Text and all children. This is a quick measurement of the text using its font; the method does not factor in per-character placement, rotations, etc.
|
|
DoOnParsedNode(TSVGElement)
|
Called when an OnParsedNode event should fire (i.e., just after the node is parsed to set the properties of the svg element) (Overrides RSSVG.TSVGElement.DoOnParsedNode(TSVGElement).)
|
|
DoSaveToXML(IXMLNode)
|
This method saves the properties of the svg element to the xml node.
This method does the work for the current svg element only.
|
|
FillChildrenTextChunks(TSVGMatrix,TSVGCanvas,TSVGRect,TSVGTextChunks)
|
Draw the child elements' text chunks to the canvas using FillText calls
|
|
FillText(TSVGMatrix,TSVGCanvas,TSVGRect,String,Single,Single,TSVGTextAlign)
|
Draws the text to the canvas by filling the text (traditional way) versus generating text shapes and drawing those. This method is provided for backwards compatibility with RSCL v1.0 and for the FMX GPU Canvas (which cannot convert text to paths)
|
|
GetBaseline(TSVGCustomText,TSVGCanvas,Char,TSVGShapePath)
|
Returns the baseline of the character based on the element's Font property. The baseline refers to the alignment point for the characters in a string of text. In horizontal writing-modes, the glyphs of a given script are positioned so that a particular point on each glyph, the alignment-point, is aligned with the alignment-points of the other glyphs in that script. The glyphs of different scripts, for example, Western, Northern Indic and Far-Eastern scripts, are typically aligned at different points on the glyph. For example, Western glyphs are aligned on the bottoms of the capital letters, northern indic glyphs are aligned at the top of a horizontal stroke near the top of the glyphs and far-eastern glyphs are aligned either at the bottom or center of the glyph.
All text elements and their children share the same baseline, even if the font or font size change.
|
|
GetBaselineFont(TSVGCanvas)
|
Returns the font for the calculating baseline points.
All text elements and their children share the same baseline, even if the font or font size change.
|
|
GetDecorationPoint(TSVGPoint)
|
Returns the decoration point, or baseline, for a decoration (i.e., underline, strike-out, or overline). The decoration point depends on the Font and the RSSVG.Text.TSVGCustomText.InlineProgressionDirection properties.
|
|
GetDX(Cardinal)
|
Returns the delta x-axis coordinate for the character at the Index position. If the index is greater than the RSSVG.Text.TSVGCustomText.DX property length, it returns its parent text element's DX property.
|
|
GetDY(Cardinal)
|
Returns the delta y-axis coordinate for the character at the Index position. If the index is greater than the RSSVG.Text.TSVGCustomText.DY property length, it returns its parent text element's DY property.
|
|
GetGlyphOrientation(Char)
|
Returns the orientation of the character glyph
|
|
GetGlyphRotationMatrix(Char,Single,TSVGPoint)
|
Calculates the rotation matrix necessary for rotating the character based on its baseline and rotation angle
|
|
GetGlyphSpacing(Char,TSVGCanvas,TSVGFont)
|
Returns the spacing to use between this character and the next character. This spacing excludes any extra spacing introduced by the Kerning or LetterSpacing properties.
|
|
GetRotate(Cardinal)
|
Overloaded. Returns the rotation (in degrees) for the character at the Index position. If the index is greater than the RSSVG.Text.TSVGCustomText.Rotate property length, it returns the last rotation item in the Rotate array.
|
|
GetShape
|
Returns a path that represents the shape of the current svg element.
This method does not work for all svg element types
|
|
GetText
|
Returns the text to draw
|
|
GetTextAlign
|
Returns the text alignment for the element ( TextAlign ). If the direction of the text is right to left, this method swaps alignment values for start and end.
|
|
GetX
|
Overloaded. Returns the X Coordinate of the Element.
If the X property is a percentage, this method returns the X Coordinate for the Element by calculating the percentage of the nearest ViewBox's Width
|
|
GetX(Cardinal)
|
Overloaded. Returns the x-axis coordinate for the character at the Index position. If the index is greater than the RSSVG.Text.TSVGCustomText.X property length, it returns its parent text element's X property.
|
|
GetY
|
Overloaded. Returns the Y Coordinate of the Element.
If the Y property is a percentage, this method returns the Y Coordinate for the Element by calculating the percentage of the nearest ViewBox's Height
|
|
GetY(Cardinal)
|
Overloaded. Returns the y-axis coordinate for the character at the Index position. If the index is greater than the RSSVG.Text.TSVGCustomText.Y property length, it returns its parent text element's Y property.
|
|
InternalDraw(TSVGMatrix,TSVGCanvas,TSVGRect)
|
Overloaded. Draw the SVG to the specified canvas inside the specified rectangle. The matrix parameter specifies the cumulative transformations from the Parent element (and its Parents) to apply when drawing the element.
The current element is drawn first and then child elements.
|
|
InternalDraw(TSVGMatrix,TSVGCanvas,TSVGRect,TSVGTextChunks)
|
Overloaded. Draw the text to the canvas by using TCanvas.FillText calls for all the text chunks
|
|
IsCharClipped(Cardinal)
|
Returns true if the character is outside of the boundary of the text element. This method really only applies to text on a path element where text can run off the end of the path.
|
|
IsFillingText
|
Returns true if the text element should fill text instead of creating text paths
|
|
IsXSpecified(Cardinal)
|
Returns true if there is an x-axis value specified for the character at the index position. If the index is greater than the RSSVG.Text.TSVGCustomText.X property length, it checks its parent text element's X property.
|
|
IsYSpecified(Cardinal)
|
Returns true if there is an y-axis value specified for the character at the index position. If the index is greater than the RSSVG.Text.TSVGCustomText.Y property length, it checks its parent text element's Y property.
|
|
MeasureText(TSVGCanvas)
|
Measures the width and height of the current element's RSSVG.Text.TSVGCustomText.Text and all children. This is a quick measurement of the text using its font; the method does not factor in per-character placement, rotations, etc.
|
|
NextTextPosition(TSVGPoint,TSVGPoint,Char,Boolean,Single)
|
Returns the position of the next character in the text based on last character's position, the char, Kerning, and spacing rules (either LetterSpacing or WordSpacing )
|
|
PropagateObjectPropChange(TObject)
|
Called when a property that is an object (Brush, Pen, Font, Description, etc) changes. This method propagates the change to all children so that they know they need to recalculate stuff. Calls the RSSVG.TSVGElement.Change(TSVGElement) method (Overrides RSSVG.TSVGGraphicElement.PropagateObjectPropChange(TObject).)
|
|
ReadChild(IXMLNode)
|
Reads the specified node and sets properties on the current TSVGGraphicElement. This method is meant to read child nodes that do not represent TSVGGraphicElements in the svg hierarchy. For example, it can read a child node that represents the Description property of the current svg element. (Overrides RSSVG.TSVGGraphicElement.ReadChild(IXMLNode).)
|
|
Reset
|
Resets the SVG for drawing. This means setting up the svg element to rebuild its Brush, Pen, Font, Shape, etc (Overrides RSSVG.TSVGGraphicElement.Reset.)
|
|
SetText(String)
|
Sets the Text property
|
|
SetX(Single)
|
Overloaded. Sets the X coordinate, in pixels, of the element (Overrides RSSVG.TSVGGraphicElement.SetX(Single).)
|
|
SetX(TSVGLengths)
|
Overloaded. Sets the RSSVG.Text.TSVGCustomText.X Array property to a copy of the value arrray.
Note
|
This is a deep copy. Every item in the value array is cloned.
|
|
|
SetY(Single)
|
Overloaded. Sets the Y coordinate, in pixels, of the element (Overrides RSSVG.TSVGGraphicElement.SetY(Single).)
|
|
SetY(TSVGLengths)
|
Overloaded. Sets the RSSVG.Text.TSVGCustomText.Y Array property to a copy of the value arrray.
Note
|
This is a deep copy. Every item in the value array is cloned.
|
|
|
ShouldDrawTextAllAtOnce
|
Returns true if the text drawing can be optimized and all text can be drawn at once.
Text can be drawn as one unit if there are not multiple X, Y coordinates, or DX, DY changes, and no individual character rotations. Also, the text needs to be left-to-right or right-to-left and the characters need to be facing perpendicular to the text direction (up with Western alphabets).
|