[−][src]Struct directwrite::text_format::TextFormat
Represents a format for laying out text. You can think of this like a Font with all of the little customization boxes filled in.
Methods
impl TextFormat
[src]
pub fn create<'a>(factory: &'a Factory) -> TextFormatBuilder<'a>
[src]
Get a builder for creating a new text format.
pub fn flow_direction(&self) -> UncheckedEnum<FlowDirection>
[src]
Get the flow direction of text in this format.
pub fn font_collection(&self) -> Option<FontCollection>
[src]
Get the font collection this format loaded its font from.
pub fn font_family_name(&self) -> Option<String>
[src]
Get the name of the font family specified for this format.
pub fn font_size(&self) -> f32
[src]
Get the font size associated with this format.
pub fn font_stretch(&self) -> UncheckedEnum<FontStretch>
[src]
Get the stretch applied to this format.
pub fn font_style(&self) -> UncheckedEnum<FontStyle>
[src]
Get the style applied to this format.
pub fn font_weight(&self) -> FontWeight
[src]
Get the weight applied to this format.
pub fn incremental_tabstop(&self) -> f32
[src]
Get the incremental tabstop size for this format.
pub fn line_spacing(&self) -> DWResult<LineSpacing>
[src]
Get the line spacing information for this format.
pub fn locale_name(&self) -> DWResult<String>
[src]
Get the locale used for this format.
pub fn paragraph_alignment(&self) -> UncheckedEnum<ParagraphAlignment>
[src]
Get the paragraph alignment of text under this format.
pub fn reading_direction(&self) -> UncheckedEnum<ReadingDirection>
[src]
Get the reading direction of text under this format.
pub fn text_alignment(&self) -> UncheckedEnum<TextAlignment>
[src]
Get the alignment of text under this format.
pub fn trimming(&self) -> DWResult<(Trimming, Option<InlineObject>)>
[src]
Gets the trimming options for text that overflows the layout box.
The inline object is an omission sign that will be rendered to show that text was omitted.
pub fn word_wrapping(&self) -> UncheckedEnum<WordWrapping>
[src]
Get the word wrapping for text under this format.
pub fn set_flow_direction(&mut self, value: FlowDirection) -> DWResult<()>
[src]
Set the flow direction for text under this format.
pub fn set_incremental_tabstop(&mut self, value: f32) -> DWResult<()>
[src]
Set the incremental tabstop value for text under this format.
pub fn set_line_spacing(
&mut self,
method: LineSpacingMethod,
spacing: f32,
baseline: f32
) -> DWResult<()>
[src]
&mut self,
method: LineSpacingMethod,
spacing: f32,
baseline: f32
) -> DWResult<()>
Set the line spacing metrics for text under this format.
pub fn set_paragraph_alignment(
&mut self,
value: ParagraphAlignment
) -> DWResult<()>
[src]
&mut self,
value: ParagraphAlignment
) -> DWResult<()>
Set the paragraph alignment for text under this format.
pub fn set_reading_direction(&mut self, value: ReadingDirection) -> DWResult<()>
[src]
Set the reading direction used to lay out text under this format.
pub fn set_text_alignment(&mut self, value: TextAlignment) -> DWResult<()>
[src]
Set the text alignment for this format.
pub fn set_trimming(
&self,
trimming: &Trimming,
omission_sign: Option<&InlineObject>
) -> DWResult<()>
[src]
&self,
trimming: &Trimming,
omission_sign: Option<&InlineObject>
) -> DWResult<()>
Sets trimming options for text overflowing the layout width.
pub fn set_word_wrapping(&mut self, value: WordWrapping) -> DWResult<()>
[src]
Set the word wrapping for text under this format.
Trait Implementations
impl PartialEq<TextFormat> for TextFormat
[src]
fn eq(&self, other: &TextFormat) -> bool
[src]
fn ne(&self, other: &TextFormat) -> bool
[src]
impl Sync for TextFormat
[src]
impl Send for TextFormat
[src]
impl Debug for TextFormat
[src]
impl ComWrapper for TextFormat
[src]
type Interface = IDWriteTextFormat
The raw interface type from winapi
unsafe fn get_raw(&self) -> *mut IDWriteTextFormat
[src]
unsafe fn from_raw(ptr: *mut IDWriteTextFormat) -> Self
[src]
unsafe fn into_raw(self) -> *mut IDWriteTextFormat
[src]
unsafe fn from_ptr(ptr: ComPtr<IDWriteTextFormat>) -> Self
[src]
unsafe fn into_ptr(self) -> ComPtr<IDWriteTextFormat>
[src]
Blanket Implementations
impl<T> FontKey for T where
T: Send + Sync + 'static + ?Sized,
[src]
T: Send + Sync + 'static + ?Sized,
impl<T> From for T
[src]
impl<T, U> Into for T where
U: From<T>,
[src]
U: From<T>,
impl<T, U> TryFrom for T where
U: Into<T>,
[src]
U: Into<T>,
type Error = !
try_from
)The type returned in the event of a conversion error.
fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>
[src]
impl<T> Borrow for T where
T: ?Sized,
[src]
T: ?Sized,
impl<T> BorrowMut for T where
T: ?Sized,
[src]
T: ?Sized,
fn borrow_mut(&mut self) -> &mut T
[src]
impl<T, U> TryInto for T where
U: TryFrom<T>,
[src]
U: TryFrom<T>,
type Error = <U as TryFrom<T>>::Error
try_from
)The type returned in the event of a conversion error.
fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>
[src]
impl<T> Any for T where
T: 'static + ?Sized,
[src]
T: 'static + ?Sized,