New to Telerik UI for WinForms? Start a free 30-day trial

Defines the rendering, measurement, and pointer-interaction operations used by a text-rendering backend.

Definition

Namespace:Telerik.WinControls.Primitives

Assembly:Telerik.WinControls.dll

Syntax:

C#
public interface ITextPrimitive

Methods

Measures text using the supplied proposed size as a constraint.

C#
SizeF GetTextSize(SizeF proposedSize, TextParams textParams)
Parameters:proposedSizeSizeF

The size available for measuring the text.

textParamsTextParams

The text content and settings that affect measurement.

Returns:

SizeF

The measured size of the text.

Measures the text without a caller-specified size constraint.

C#
SizeF GetTextSize(TextParams textParams)
Parameters:textParamsTextParams

The text content and settings that affect measurement.

Returns:

SizeF

The measured size of the text.

Measures the desired text size within the available layout size.

C#
SizeF MeasureOverride(SizeF availableSize, TextParams textParams)
Parameters:availableSizeSizeF

The maximum size available to the text.

textParamsTextParams

The text content and settings that affect measurement.

Returns:

SizeF

The desired size of the rendered text.

Notifies the backend of pointer movement so it can update text-specific interaction state.

C#
void OnMouseMove(object sender, MouseEventArgs e)
Parameters:senderobject

The object associated with the pointer event.

eMouseEventArgs

The pointer coordinates and other mouse-event data.

Paints text using the supplied graphics context and parameters. The built-in backends do not apply the supplied angle and scale.

C#
void PaintPrimitive(IGraphics graphics, float angle, SizeF scale, TextParams textParams)
Parameters:graphicsIGraphics

The graphics context used to draw the text.

anglefloat

The rotation angle supplied for the paint operation.

scaleSizeF

The scale supplied for the paint operation.

textParamsTextParams

The text content, layout, and rendering settings.

Paints text using the supplied text parameters without an explicit transform.

C#
void PaintPrimitive(IGraphics graphics, TextParams textParams)
Parameters:graphicsIGraphics

The graphics context used to draw the text.

textParamsTextParams

The text content, layout, and rendering settings.