SvgPlottingUtilGetDocumentFontSize Method

Return the font size of the root document, in pixels.

Definition

Namespace: SvgPlotting
Assembly: SvgPlotting (in SvgPlotting.dll) Version: 25.2714.4126
C#
public static float GetDocumentFontSize(
	SvgImageItem svg,
	HtmlNodeItem node,
	float defaultValue = 15.9996f
)

Parameters

svg  SvgImageItem
Reference to the SVG object in focus.
node  HtmlNodeItem
Reference to the node for which the root document font size will be found.
defaultValue  Single  (Optional)
The default value to be assigned if a specific font size is not found on the way to the root.

Return Value

Single
The font size in the root document element, if legitimate. Otherwise, 15.9996 (12pt).

Remarks

GetDocumentFontSize is similar to GetCurrentFontSize because they both recurse backward up the chain through their parent predecessors. However, GetDocumentFontSize will update each time it finds a source closer to the root, while GetCurrentFontSize updates only the first time backward it finds a source.

See Also