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
impl SkFont
pub unsafe fn setForceAutoHinting(&mut self, forceAutoHinting: bool)
pub unsafe fn setEmbeddedBitmaps(&mut self, embeddedBitmaps: bool)
pub unsafe fn setSubpixel(&mut self, subpixel: bool)
pub unsafe fn setLinearMetrics(&mut self, linearMetrics: bool)
pub unsafe fn setEmbolden(&mut self, embolden: bool)
pub unsafe fn setBaselineSnap(&mut self, baselineSnap: bool)
pub unsafe fn setEdging(&mut self, edging: SkFont_Edging)
pub unsafe fn setHinting(&mut self, hintingLevel: SkFontHinting)
pub unsafe fn makeWithSize(&self, size: SkScalar) -> SkFont
pub unsafe fn getTypefaceOrDefault(&self) -> *mut SkTypeface
pub unsafe fn refTypefaceOrDefault(&self) -> sk_sp<SkTypeface>
pub unsafe fn setSize(&mut self, textSize: SkScalar)
pub unsafe fn setScaleX(&mut self, scaleX: SkScalar)
pub unsafe fn setSkewX(&mut self, skewX: SkScalar)
pub unsafe fn textToGlyphs( &self, text: *const c_void, byteLength: usize, encoding: SkTextEncoding, glyphs: *mut SkGlyphID, maxGlyphCount: c_int ) -> c_int
pub unsafe fn unicharToGlyph(&self, uni: SkUnichar) -> SkGlyphID
pub unsafe fn unicharsToGlyphs( &self, uni: *const SkUnichar, count: c_int, glyphs: *mut SkGlyphID )
pub unsafe fn measureText( &self, text: *const c_void, byteLength: usize, encoding: SkTextEncoding, bounds: *mut SkRect, paint: *const SkPaint ) -> SkScalar
pub unsafe fn getWidthsBounds( &self, glyphs: *const SkGlyphID, count: c_int, widths: *mut SkScalar, bounds: *mut SkRect, paint: *const SkPaint )
pub unsafe fn getPos( &self, glyphs: *const SkGlyphID, count: c_int, pos: *mut SkPoint, origin: SkPoint )
pub unsafe fn getXPos( &self, glyphs: *const SkGlyphID, count: c_int, xpos: *mut SkScalar, origin: SkScalar )
pub unsafe fn getIntercepts( &self, glyphs: *const SkGlyphID, count: c_int, pos: *const SkPoint, top: SkScalar, bottom: SkScalar, arg1: *const SkPaint ) -> [u64; 3]
pub unsafe fn getPath(&self, glyphID: SkGlyphID, path: *mut SkPath) -> bool
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 )
pub unsafe fn getMetrics(&self, metrics: *mut SkFontMetrics) -> SkScalar
pub unsafe fn dump(&self)
pub unsafe fn new() -> Self
pub unsafe fn new1(typeface: sk_sp<SkTypeface>, size: SkScalar) -> Self
pub unsafe fn new2(typeface: sk_sp<SkTypeface>) -> Self
pub unsafe fn new3( typeface: sk_sp<SkTypeface>, size: SkScalar, scaleX: SkScalar, skewX: SkScalar ) -> Self
Trait Implementations§
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> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere T: ?Sized,
source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more