Struct skia_bindings::SkFont

source ·
#[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: SkScalar§fScaleX: SkScalar§fSkewX: SkScalar§fFlags: u8§fEdging: u8§fHinting: u8

Implementations§

source§

impl SkFont

source

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

source

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

source

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

source

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

source

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

source

pub unsafe fn setBaselineSnap(&mut self, baselineSnap: bool)

source

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

source

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

source

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

source

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

source

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

source

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

source

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

source

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

source

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

source

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

source

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

source

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

source

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

source

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

source

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

source

pub unsafe fn getIntercepts( &self, glyphs: *const SkGlyphID, count: c_int, pos: *const SkPoint, top: SkScalar, bottom: SkScalar, arg1: *const SkPaint ) -> [u64; 3]

source

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

source

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 )

source

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

source

pub unsafe fn dump(&self)

source

pub unsafe fn new() -> Self

source

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

source

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

source

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

Trait Implementations§

source§

impl Debug for SkFont

source§

fn fmt(&self, f: &mut Formatter<'_>) -> Result

Formats the value using the given formatter. Read more

Auto Trait Implementations§

§

impl !RefUnwindSafe for SkFont

§

impl !Send for SkFont

§

impl !Sync for SkFont

§

impl Unpin for SkFont

§

impl UnwindSafe for SkFont

Blanket Implementations§

source§

impl<T> Any for Twhere T: 'static + ?Sized,

source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
source§

impl<T> Borrow<T> for Twhere T: ?Sized,

source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
source§

impl<T> BorrowMut<T> for Twhere T: ?Sized,

source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
source§

impl<T> From<T> for T

source§

fn from(t: T) -> T

Returns the argument unchanged.

source§

impl<T, U> Into<U> for Twhere U: From<T>,

source§

fn into(self) -> U

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

source§

impl<T, U> TryFrom<U> for Twhere U: Into<T>,

§

type Error = Infallible

The type returned in the event of a conversion error.
source§

fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

Performs the conversion.
source§

impl<T, U> TryInto<U> for Twhere U: TryFrom<T>,

§

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

The type returned in the event of a conversion error.
source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.