Method CreateImageElement
CreateImageElement(AbstractControl?, SvgImage, int?, Color?)
Creates a Graphics.DrawElementParams object for rendering an image element based on the specified SVG image, size, and optional color.
public static Graphics.DrawElementParams CreateImageElement(AbstractControl? control, SvgImage svg, int? size, Color? color = null)
Parameters
controlAbstractControlThe control associated with the image element. This is used to determine default size and color if not explicitly provided. Can be null.
svgSvgImageThe SvgImage to be rendered as the image element.
sizeint?The size of the image in pixels. If null, a default size is determined based on the
control.colorColorThe color to apply to the SVG image. If null, a default color is determined based on the
control.
Returns
- Graphics.DrawElementParams
A Graphics.DrawElementParams object representing the configured image element.
Remarks
If both size and color
are null, the method uses default values derived
from the provided control.
The resulting image element is created with the specified or default
size and color.
CreateImageElement(Image?)
Creates a new image element for rendering using the specified image.
public static Graphics.DrawElementParams CreateImageElement(Image? image)
Parameters
Returns
- Graphics.DrawElementParams
A Graphics.DrawElementParams object configured to render the specified image.
CreateImageElement(ref DrawLabelParams, Image?)
Creates an image element based on the specified drawing parameters.
public static Graphics.DrawElementParams CreateImageElement(ref Graphics.DrawLabelParams prm, Image? imageOverride = null)
Parameters
prmGraphics.DrawLabelParamsA reference to the Graphics.DrawLabelParams structure containing the parameters for drawing the image, including the image source and alignment settings.
imageOverrideImageThe Image to use as the image for the element, overriding any image specified in
prm.
Returns
- Graphics.DrawElementParams
An Graphics.DrawElementParams object representing the image element to be drawn, or null if the Image property is null.
Remarks
The returned Graphics.DrawElementParams object includes the size calculation and drawing logic for the image, as well as alignment settings derived from the provided parameters.