Struct directwrite::text_layout::TextLayout [] [src]

pub struct TextLayout { /* fields omitted */ }

The TextLayout interface represents a block of text after it has been fully analyzed and formatted.

Methods

impl TextLayout
[src]

[src]

[src]

[src]

[src]

[src]

Determines the minimum possible width the layout can be set to without emergency breaking between the characters of whole words occurring.

[src]

Gets the number of ClusterMetrics objects which exist for this TextLayout

[src]

Retrieves the ClusterMetrics for the glyph clusters in this layout. You should ensure the slice is large enough to hold all of the metrics, which can be obtained by calling get_cluster_metrics_count. If the slice is not large enough, it will return Err(actual_count), otherwise returns Ok(actual_count).

[src]

Fill all of the Cluster metrics into a Vec. This function will resize the Vec to fit all of the metrics structures exactly.

[src]

Gets the font em height of the text at the specified position. Also returns the text range which has identical formatting to the current character.

[src]

Gets the font stretch of the text at the specified position. Also returns the text range which has identical formatting to the current character.

[src]

Gets the font style of the text at the specified position. Also returns the text range which has identical formatting to the current character.

[src]

Gets the font weight of the text at the specified position. Also returns the text range which has identical formatting to the current character.

[src]

Get the number of LineMetrics objects that you need room for when calling get_line_metrics_slice

[src]

Retrieves the information about each individual text line of the text string. You should first call get_line_metrics_count to know how large your slice must be to fit all of the metrics objects. The return value will contain the actual number of elements in the layout, but the official documentation does not specify whether the array will be filled with any values in the Err case, so that behavior is not guaranteed between windows versions.

[src]

etrieves the information about each individual text line of the text string. Resizes buf to fit all of the elements exactly.

[src]

Gets the layout maximum height.

[src]

Gets the layout maximum width.

[src]

Retrieves overall metrics for the formatted string.

[src]

Returns the overhangs (in DIPs) of the layout and all objects contained in it, including text glyphs and inline objects.

[src]

The application calls this function passing in a specific pixel location relative to the top-left location of the layout box and obtains the information about the correspondent hit-test metrics of the text string where the hit-test has occurred. Returns None if the specified pixel location is outside the string.

[src]

The application calls this function to get the pixel location relative to the top-left of the layout box given the text position and the logical side of the position. This function is normally used as part of caret positioning of text where the caret is drawn at the location corresponding to the current text editing position. It may also be used as a way to programmatically obtain the geometry of a particular text position in UI automation.

[src]

The application calls this function to get a set of hit-test metrics corresponding to a range of text positions. One of the main usages is to implement highlight selection of the text string. origin_x and origin_y are added to the hit-test metrics returned.

[src]

Sets the drawing style for text within a text range.

[src]

Sets the font style for text within a text range.

[src]

Sets the font weight for text within a text range.

[src]

Sets underlining for text within a specified text range.

Trait Implementations

impl FromParams for TextLayout
[src]

[src]

impl Clone for TextLayout
[src]

[src]

Returns a copy of the value. Read more

1.0.0
[src]

Performs copy-assignment from source. Read more

impl PartialEq for TextLayout
[src]

[src]

This method tests for self and other values to be equal, and is used by ==. Read more

[src]

This method tests for !=.

Auto Trait Implementations

impl !Send for TextLayout

impl !Sync for TextLayout