[][src]Struct skia_bindings::SkFont

#[repr(C)]
pub struct SkFont {
    pub fTypeface: sk_sp<SkTypeface>,
    pub fSize: SkScalar,
    pub fScaleX: SkScalar,
    pub fSkewX: SkScalar,
    pub fFlags: u8,
    pub fEdging: u8,
    pub fHinting: u8,
}

Fields

fTypeface: sk_sp<SkTypeface>fSize: SkScalarfScaleX: SkScalarfSkewX: SkScalarfFlags: u8fEdging: u8fHinting: u8

Methods

impl SkFont[src]

pub unsafe fn isForceAutoHinting(&self) -> bool[src]

pub unsafe fn isEmbeddedBitmaps(&self) -> bool[src]

pub unsafe fn isSubpixel(&self) -> bool[src]

pub unsafe fn isLinearMetrics(&self) -> bool[src]

pub unsafe fn isEmbolden(&self) -> bool[src]

pub unsafe fn setForceAutoHinting(&mut self, forceAutoHinting: bool)[src]

pub unsafe fn setEmbeddedBitmaps(&mut self, embeddedBitmaps: bool)[src]

pub unsafe fn setSubpixel(&mut self, subpixel: bool)[src]

pub unsafe fn setLinearMetrics(&mut self, linearMetrics: bool)[src]

pub unsafe fn setEmbolden(&mut self, embolden: bool)[src]

pub unsafe fn getEdging(&self) -> SkFont_Edging[src]

pub unsafe fn setEdging(&mut self, edging: SkFont_Edging)[src]

pub unsafe fn setHinting(&mut self, hintingLevel: SkFontHinting)[src]

pub unsafe fn getHinting(&self) -> SkFontHinting[src]

pub unsafe fn makeWithSize(&self, size: SkScalar) -> SkFont[src]

pub unsafe fn getTypeface(&self) -> *mut SkTypeface[src]

pub unsafe fn getTypefaceOrDefault(&self) -> *mut SkTypeface[src]

pub unsafe fn getSize(&self) -> SkScalar[src]

pub unsafe fn getScaleX(&self) -> SkScalar[src]

pub unsafe fn getSkewX(&self) -> SkScalar[src]

pub unsafe fn refTypeface(&self) -> sk_sp<SkTypeface>[src]

pub unsafe fn refTypefaceOrDefault(&self) -> sk_sp<SkTypeface>[src]

pub unsafe fn setTypeface(&mut self, tf: sk_sp<SkTypeface>)[src]

pub unsafe fn setSize(&mut self, textSize: SkScalar)[src]

pub unsafe fn setScaleX(&mut self, scaleX: SkScalar)[src]

pub unsafe fn setSkewX(&mut self, skewX: SkScalar)[src]

pub unsafe fn textToGlyphs(
    &self,
    text: *const c_void,
    byteLength: usize,
    encoding: SkTextEncoding,
    glyphs: *mut SkGlyphID,
    maxGlyphCount: c_int
) -> c_int
[src]

pub unsafe fn unicharToGlyph(&self, uni: SkUnichar) -> SkGlyphID[src]

pub unsafe fn unicharsToGlyphs(
    &self,
    uni: *const SkUnichar,
    count: c_int,
    glyphs: *mut SkGlyphID
)
[src]

pub unsafe fn countText(
    &self,
    text: *const c_void,
    byteLength: usize,
    encoding: SkTextEncoding
) -> c_int
[src]

pub unsafe fn measureText(
    &self,
    text: *const c_void,
    byteLength: usize,
    encoding: SkTextEncoding,
    bounds: *mut SkRect
) -> SkScalar
[src]

pub unsafe fn measureText1(
    &self,
    text: *const c_void,
    byteLength: usize,
    encoding: SkTextEncoding,
    bounds: *mut SkRect,
    paint: *const SkPaint
) -> SkScalar
[src]

pub unsafe fn getWidths(
    &self,
    glyphs: *const SkGlyphID,
    count: c_int,
    widths: *mut SkScalar,
    bounds: *mut SkRect
)
[src]

pub unsafe fn getWidths1(
    &self,
    glyphs: *const SkGlyphID,
    count: c_int,
    widths: *mut SkScalar,
    arg1: std_nullptr_t
)
[src]

pub unsafe fn getWidths2(
    &self,
    glyphs: *const SkGlyphID,
    count: c_int,
    widths: *mut SkScalar
)
[src]

pub unsafe fn getWidthsBounds(
    &self,
    glyphs: *const SkGlyphID,
    count: c_int,
    widths: *mut SkScalar,
    bounds: *mut SkRect,
    paint: *const SkPaint
)
[src]

pub unsafe fn getBounds(
    &self,
    glyphs: *const SkGlyphID,
    count: c_int,
    bounds: *mut SkRect,
    paint: *const SkPaint
)
[src]

pub unsafe fn getPos(
    &self,
    glyphs: *const SkGlyphID,
    count: c_int,
    pos: *mut SkPoint,
    origin: SkPoint
)
[src]

pub unsafe fn getXPos(
    &self,
    glyphs: *const SkGlyphID,
    count: c_int,
    xpos: *mut SkScalar,
    origin: SkScalar
)
[src]

pub unsafe fn getPath(&self, glyphID: SkGlyphID, path: *mut SkPath) -> bool[src]

pub unsafe fn getPaths(
    &self,
    glyphIDs: *const SkGlyphID,
    count: c_int,
    glyphPathProc: Option<unsafe extern "C" fn(pathOrNull: *const SkPath, mx: *const SkMatrix, ctx: *mut c_void)>,
    ctx: *mut c_void
)
[src]

pub unsafe fn getMetrics(&self, metrics: *mut SkFontMetrics) -> SkScalar[src]

pub unsafe fn getSpacing(&self) -> SkScalar[src]

pub unsafe fn dump(&self)[src]

pub unsafe fn new() -> Self[src]

pub unsafe fn new1(typeface: sk_sp<SkTypeface>, size: SkScalar) -> Self[src]

pub unsafe fn new2(typeface: sk_sp<SkTypeface>) -> Self[src]

pub unsafe fn new3(
    typeface: sk_sp<SkTypeface>,
    size: SkScalar,
    scaleX: SkScalar,
    skewX: SkScalar
) -> Self
[src]

Trait Implementations

impl Debug for SkFont[src]

Auto Trait Implementations

impl !Sync for SkFont

impl !Send for SkFont

impl Unpin for SkFont

impl !RefUnwindSafe for SkFont

impl !UnwindSafe for SkFont

Blanket Implementations

impl<T> From<T> for T[src]

impl<T, U> Into<U> for T where
    U: From<T>, 
[src]

impl<T, U> TryFrom<U> for T where
    U: Into<T>, 
[src]

type Error = Infallible

The type returned in the event of a conversion error.

impl<T, U> TryInto<U> for T where
    U: TryFrom<T>, 
[src]

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.

impl<T> BorrowMut<T> for T where
    T: ?Sized
[src]

impl<T> Borrow<T> for T where
    T: ?Sized
[src]

impl<T> Any for T where
    T: 'static + ?Sized
[src]