Method CreateTextElement
CreateTextElement(ref DrawLabelParams, string?)
Creates a text element with specified parameters for rendering text and associated styles.
public static Graphics.DrawElementParams CreateTextElement(ref Graphics.DrawLabelParams prm, string? textOverride = null)
Parameters
prmGraphics.DrawLabelParamsA reference to the Graphics.DrawLabelParams structure containing the text, font, colors, alignment, and other rendering options.
textOverridestringThe string to use as the text content for the element, overriding any text specified in
prm.
Returns
- Graphics.DrawElementParams
An Graphics.DrawElementParams object that encapsulates the logic for measuring and drawing the text element, including alignment and font styles.
Remarks
This method processes the input parameters to handle various text rendering scenarios, such as vertical text, multi-line text, and text with special formatting (e.g., bold or underlined).