[][src]Trait dxplr::dwrite::ITextLayout

pub trait ITextLayout: ITextFormat {
    fn determine_min_width(&self) -> Result<f32, HResult>;
fn draw(
        &self,
        context: Option<*mut c_void>,
        renderer: &impl ITextRenderer,
        origin_x: f32,
        origin_y: f32
    ) -> Result<(), HResult>;
fn get_cluster_metrics(&self) -> Result<Vec<ClusterMetrics>, HResult>;
fn get_drawing_effect(
        &self,
        current_position: u32
    ) -> Result<(Unknown, TextRange), HResult>;
fn get_font_collection(
        &self,
        current_position: u32
    ) -> Result<(FontCollection, TextRange), HResult>;
fn get_font_family_name(
        &self,
        current_position: u32
    ) -> Result<(String, TextRange), HResult>;
fn get_font_family_name_length(
        &self,
        current_position: u32
    ) -> Result<(u32, TextRange), HResult>;
fn get_font_size(
        &self,
        current_position: u32
    ) -> Result<(f32, TextRange), HResult>;
fn get_font_stretch(
        &self,
        current_position: u32
    ) -> Result<(FontStretch, TextRange), HResult>;
fn get_font_style(
        &self,
        current_position: u32
    ) -> Result<(FontStyle, TextRange), HResult>;
fn get_font_weight(
        &self,
        current_position: u32
    ) -> Result<(FontWeight, TextRange), HResult>;
fn get_inline_object(
        &self,
        current_position: u32
    ) -> Result<(InlineObject, TextRange), HResult>;
fn get_line_metrics(&self) -> Result<Vec<LineMetrics>, HResult>;
fn get_locale_name(
        &self,
        current_position: u32
    ) -> Result<(String, TextRange), HResult>;
fn get_locale_name_length(
        &self,
        current_position: u32
    ) -> Result<(u32, TextRange), HResult>;
fn get_max_height(&self) -> f32;
fn get_max_width(&self) -> f32;
fn get_metrics(&self) -> Result<TextMetrics, HResult>;
fn get_overhang_metrics(&self) -> Result<OverhangMetrics, HResult>;
fn get_strikethrough(
        &self,
        current_position: u32
    ) -> Result<(bool, TextRange), HResult>;
fn get_typography(
        &self,
        current_position: u32
    ) -> Result<(Typography, TextRange), HResult>;
fn get_underline(
        &self,
        current_position: u32
    ) -> Result<(bool, TextRange), HResult>;
fn hit_test_point(
        &self,
        x: f32,
        y: f32
    ) -> Result<HitTestPointResult, HResult>;
fn hit_test_text_position(
        &self,
        text_position: u32,
        is_trailing_hit: bool
    ) -> Result<HitTestTextPositionResult, HResult>;
fn hit_test_text_range(
        &self,
        text_position: u32,
        text_length: u32,
        origin_x: f32,
        origin_y: f32
    ) -> Result<Vec<HitTestMetrics>, HResult>;
fn set_drawing_effect(
        &self,
        effect: &impl Interface,
        text_range: TextRange
    ) -> Result<(), HResult>;
fn set_font_collection(
        &self,
        collection: &impl IFontCollection,
        text_range: TextRange
    ) -> Result<(), HResult>;
fn set_font_family_name(
        &self,
        family_name: impl AsRef<str>,
        text_range: TextRange
    ) -> Result<(), HResult>;
fn set_font_size(
        &self,
        size: f32,
        text_range: TextRange
    ) -> Result<(), HResult>;
fn set_font_stretch(
        &self,
        stretch: FontStretch,
        text_range: TextRange
    ) -> Result<(), HResult>;
fn set_font_style(
        &self,
        style: FontStyle,
        text_range: TextRange
    ) -> Result<(), HResult>;
fn set_font_weight(
        &self,
        weight: FontWeight,
        text_range: TextRange
    ) -> Result<(), HResult>;
fn set_inline_object(
        &self,
        inline_object: &impl IInlineObject,
        text_range: TextRange
    ) -> Result<(), HResult>;
fn set_locale_name(
        &self,
        locale_name: impl AsRef<str>,
        text_range: TextRange
    ) -> Result<(), HResult>;
fn set_max_height(&self, height: f32) -> Result<(), HResult>;
fn set_max_width(&self, width: f32) -> Result<(), HResult>;
fn set_strikethrough(
        &self,
        has_strikethrough: bool,
        text_range: TextRange
    ) -> Result<(), HResult>;
fn set_typography(
        &self,
        typography: &impl ITypography,
        text_range: TextRange
    ) -> Result<(), HResult>;
fn set_underline(
        &self,
        has_underline: bool,
        text_range: TextRange
    ) -> Result<(), HResult>; }

Required methods

fn determine_min_width(&self) -> Result<f32, HResult>

fn draw(
    &self,
    context: Option<*mut c_void>,
    renderer: &impl ITextRenderer,
    origin_x: f32,
    origin_y: f32
) -> Result<(), HResult>

fn get_cluster_metrics(&self) -> Result<Vec<ClusterMetrics>, HResult>

fn get_drawing_effect(
    &self,
    current_position: u32
) -> Result<(Unknown, TextRange), HResult>

fn get_font_collection(
    &self,
    current_position: u32
) -> Result<(FontCollection, TextRange), HResult>

fn get_font_family_name(
    &self,
    current_position: u32
) -> Result<(String, TextRange), HResult>

fn get_font_family_name_length(
    &self,
    current_position: u32
) -> Result<(u32, TextRange), HResult>

fn get_font_size(
    &self,
    current_position: u32
) -> Result<(f32, TextRange), HResult>

fn get_font_stretch(
    &self,
    current_position: u32
) -> Result<(FontStretch, TextRange), HResult>

fn get_font_style(
    &self,
    current_position: u32
) -> Result<(FontStyle, TextRange), HResult>

fn get_font_weight(
    &self,
    current_position: u32
) -> Result<(FontWeight, TextRange), HResult>

fn get_inline_object(
    &self,
    current_position: u32
) -> Result<(InlineObject, TextRange), HResult>

fn get_line_metrics(&self) -> Result<Vec<LineMetrics>, HResult>

fn get_locale_name(
    &self,
    current_position: u32
) -> Result<(String, TextRange), HResult>

fn get_locale_name_length(
    &self,
    current_position: u32
) -> Result<(u32, TextRange), HResult>

fn get_max_height(&self) -> f32

fn get_max_width(&self) -> f32

fn get_metrics(&self) -> Result<TextMetrics, HResult>

fn get_overhang_metrics(&self) -> Result<OverhangMetrics, HResult>

fn get_strikethrough(
    &self,
    current_position: u32
) -> Result<(bool, TextRange), HResult>

fn get_typography(
    &self,
    current_position: u32
) -> Result<(Typography, TextRange), HResult>

fn get_underline(
    &self,
    current_position: u32
) -> Result<(bool, TextRange), HResult>

fn hit_test_point(&self, x: f32, y: f32) -> Result<HitTestPointResult, HResult>

fn hit_test_text_position(
    &self,
    text_position: u32,
    is_trailing_hit: bool
) -> Result<HitTestTextPositionResult, HResult>

fn hit_test_text_range(
    &self,
    text_position: u32,
    text_length: u32,
    origin_x: f32,
    origin_y: f32
) -> Result<Vec<HitTestMetrics>, HResult>

fn set_drawing_effect(
    &self,
    effect: &impl Interface,
    text_range: TextRange
) -> Result<(), HResult>

fn set_font_collection(
    &self,
    collection: &impl IFontCollection,
    text_range: TextRange
) -> Result<(), HResult>

fn set_font_family_name(
    &self,
    family_name: impl AsRef<str>,
    text_range: TextRange
) -> Result<(), HResult>

fn set_font_size(&self, size: f32, text_range: TextRange) -> Result<(), HResult>

fn set_font_stretch(
    &self,
    stretch: FontStretch,
    text_range: TextRange
) -> Result<(), HResult>

fn set_font_style(
    &self,
    style: FontStyle,
    text_range: TextRange
) -> Result<(), HResult>

fn set_font_weight(
    &self,
    weight: FontWeight,
    text_range: TextRange
) -> Result<(), HResult>

fn set_inline_object(
    &self,
    inline_object: &impl IInlineObject,
    text_range: TextRange
) -> Result<(), HResult>

fn set_locale_name(
    &self,
    locale_name: impl AsRef<str>,
    text_range: TextRange
) -> Result<(), HResult>

fn set_max_height(&self, height: f32) -> Result<(), HResult>

fn set_max_width(&self, width: f32) -> Result<(), HResult>

fn set_strikethrough(
    &self,
    has_strikethrough: bool,
    text_range: TextRange
) -> Result<(), HResult>

fn set_typography(
    &self,
    typography: &impl ITypography,
    text_range: TextRange
) -> Result<(), HResult>

fn set_underline(
    &self,
    has_underline: bool,
    text_range: TextRange
) -> Result<(), HResult>

Loading content...

Implementors

impl ITextLayout for TextLayout[src]

Loading content...