Click or drag to resize

AccurateTextMeasureString Method (Graphics, RightToLeft, String, Font, PaletteTextTrim, PaletteRelativeAlign, PaletteTextHotkeyPrefix, TextRenderingHint, Boolean, Boolean, Boolean, Boolean)

Pixel accurate measure of the specified string when drawn with the specified Font object.

Namespace:  Internal.ComponentFactory.Krypton.Toolkit
Assembly:  NeoAxis.Core.Editor (in NeoAxis.Core.Editor.dll) Version: 2024.1.1.0 (2024.1.1.0)
Syntax
C#
public static AccurateTextMemento MeasureString(
	Graphics g,
	RightToLeft rtl,
	string text,
	Font font,
	PaletteTextTrim trim,
	PaletteRelativeAlign align,
	PaletteTextHotkeyPrefix prefix,
	TextRenderingHint hint,
	bool compatiblePadding,
	bool composition,
	bool glowing,
	bool disposeFont
)

Parameters

g
Type: System.DrawingGraphics
Graphics instance used to measure text.
rtl
Type: System.Windows.FormsRightToLeft
Right to left setting for control.
text
Type: SystemString
String to measure.
font
Type: System.DrawingFont
Font object that defines the text format of the string.
trim
Type: Internal.ComponentFactory.Krypton.ToolkitPaletteTextTrim
How to trim excess text.
align
Type: Internal.ComponentFactory.Krypton.ToolkitPaletteRelativeAlign
How to align multine text.
prefix
Type: Internal.ComponentFactory.Krypton.ToolkitPaletteTextHotkeyPrefix
How to process prefix characters.
hint
Type: System.Drawing.TextTextRenderingHint
Rendering hint.
compatiblePadding
Type: SystemBoolean
composition
Type: SystemBoolean
Should draw on a composition element.
glowing
Type: SystemBoolean
When on composition draw with glowing.
disposeFont
Type: SystemBoolean
Dispose of font when finished with it.

Return Value

Type: AccurateTextMemento
A memento used to draw the text.
See Also