#[repr(transparent)]pub struct TextNode { /* private fields */ }
Implementations
sourceimpl TextNode
impl TextNode
pub fn new(
font: &impl IsA<Font>,
glyphs: &mut GlyphString,
color: &RGBA,
offset: &Point
) -> Option<TextNode>
pub fn color(&self) -> RGBA
pub fn font(&self) -> Font
pub fn glyphs(&self) -> Vec<GlyphInfo>
pub fn num_glyphs(&self) -> u32
pub fn offset(&self) -> Point
pub fn has_color_glyphs(&self) -> bool
Available on crate feature
v4_2
only.Methods from Deref<Target = RenderNode>
pub const NONE: Option<&'static RenderNode> = None
pub fn draw(&self, cr: &Context)
pub fn bounds(&self) -> Rect
pub fn node_type(&self) -> RenderNodeType
pub fn serialize(&self) -> Bytes
pub fn write_to_file(&self, filename: impl AsRef<Path>) -> Result<(), Error>
pub fn is<T: IsRenderNode>(&self) -> bool
pub fn type_(&self) -> Type
pub fn downcast_ref<T: IsRenderNode>(&self) -> Option<&T>
Trait Implementations
sourceimpl AsRef<RenderNode> for TextNode
impl AsRef<RenderNode> for TextNode
sourcefn as_ref(&self) -> &RenderNode
fn as_ref(&self) -> &RenderNode
Converts this type into a shared reference of the (usually inferred) input type.
sourceimpl Deref for TextNode
impl Deref for TextNode
type Target = RenderNode
type Target = RenderNode
The resulting type after dereferencing.
sourceimpl<'a> FromValue<'a> for TextNode
Available on crate feature v4_6
only.
impl<'a> FromValue<'a> for TextNode
Available on crate feature
v4_6
only.type Checker = GenericValueTypeOrNoneChecker<TextNode>
type Checker = GenericValueTypeOrNoneChecker<TextNode>
Value type checker.
sourceunsafe fn from_value(value: &'a Value) -> Self
unsafe fn from_value(value: &'a Value) -> Self
Get the contained value from a Value
. Read more
sourceimpl IsRenderNode for TextNode
impl IsRenderNode for TextNode
const NODE_TYPE: RenderNodeType = RenderNodeType::TextNode
fn upcast(self) -> RenderNode
fn upcast_ref(&self) -> &RenderNode
sourceimpl StaticType for TextNode
impl StaticType for TextNode
sourcefn static_type() -> Type
fn static_type() -> Type
Returns the type identifier of Self
.
sourceimpl ToValueOptional for TextNode
Available on crate feature v4_6
only.
impl ToValueOptional for TextNode
Available on crate feature
v4_6
only.sourcefn to_value_optional(s: Option<&Self>) -> Value
fn to_value_optional(s: Option<&Self>) -> Value
Convert an Option
to a Value
.
Auto Trait Implementations
impl RefUnwindSafe for TextNode
impl !Send for TextNode
impl !Sync for TextNode
impl Unpin for TextNode
impl UnwindSafe for TextNode
Blanket Implementations
sourceimpl<T> BorrowMut<T> for T where
T: ?Sized,
impl<T> BorrowMut<T> for T where
T: ?Sized,
const: unstable · sourcefn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more
sourceimpl<T> StaticTypeExt for T where
T: StaticType,
impl<T> StaticTypeExt for T where
T: StaticType,
sourcefn ensure_type()
fn ensure_type()
Ensures that the type has been registered with the type system.