Struct skia_bindings::SkCanvas

source ·
#[repr(C)]
pub struct SkCanvas {
Show 13 fields pub vtable_: *const SkCanvas__bindgen_vtable, pub fMCRecStorage: [isize; 384], pub fMCStack: SkDeque, pub fMCRec: *mut SkCanvas_MCRec, pub fBaseDevice: sk_sp<SkBaseDevice>, pub fProps: SkSurfaceProps, pub fSaveCount: c_int, pub fAllocator: u64, pub fSurfaceBase: *mut SkSurface_Base, pub fClipRestrictionRect: SkIRect, pub fClipRestrictionSaveCount: c_int, pub fQuickRejectBounds: SkRect, pub fScratchGlyphRunBuilder: u64,
}

Fields§

§vtable_: *const SkCanvas__bindgen_vtable§fMCRecStorage: [isize; 384]§fMCStack: SkDeque§fMCRec: *mut SkCanvas_MCRec§fBaseDevice: sk_sp<SkBaseDevice>§fProps: SkSurfaceProps§fSaveCount: c_int§fAllocator: u64§fSurfaceBase: *mut SkSurface_Base§fClipRestrictionRect: SkIRect§fClipRestrictionSaveCount: c_int§fQuickRejectBounds: SkRect§fScratchGlyphRunBuilder: u64

Implementations§

source§

impl SkCanvas

source

pub unsafe fn MakeRasterDirect( info: *const SkImageInfo, pixels: *mut c_void, rowBytes: usize, props: *const SkSurfaceProps ) -> u64

source

pub unsafe fn imageInfo(&self) -> SkImageInfo

source

pub unsafe fn getProps(&self, props: *mut SkSurfaceProps) -> bool

source

pub unsafe fn getBaseProps(&self) -> SkSurfaceProps

source

pub unsafe fn getTopProps(&self) -> SkSurfaceProps

source

pub unsafe fn flush(&mut self)

source

pub unsafe fn makeSurface( &mut self, info: *const SkImageInfo, props: *const SkSurfaceProps ) -> sk_sp<SkSurface>

source

pub unsafe fn getSurface(&self) -> *mut SkSurface

source

pub unsafe fn accessTopLayerPixels( &mut self, info: *mut SkImageInfo, rowBytes: *mut usize, origin: *mut SkIPoint ) -> *mut c_void

source

pub unsafe fn accessTopRasterHandle(&self) -> SkRasterHandleAllocator_Handle

source

pub unsafe fn peekPixels(&mut self, pixmap: *mut SkPixmap) -> bool

source

pub unsafe fn readPixels( &mut self, dstInfo: *const SkImageInfo, dstPixels: *mut c_void, dstRowBytes: usize, srcX: c_int, srcY: c_int ) -> bool

source

pub unsafe fn readPixels1( &mut self, pixmap: *const SkPixmap, srcX: c_int, srcY: c_int ) -> bool

source

pub unsafe fn readPixels2( &mut self, bitmap: *const SkBitmap, srcX: c_int, srcY: c_int ) -> bool

source

pub unsafe fn writePixels( &mut self, info: *const SkImageInfo, pixels: *const c_void, rowBytes: usize, x: c_int, y: c_int ) -> bool

source

pub unsafe fn writePixels1( &mut self, bitmap: *const SkBitmap, x: c_int, y: c_int ) -> bool

source

pub unsafe fn save(&mut self) -> c_int

source

pub unsafe fn saveLayer( &mut self, bounds: *const SkRect, paint: *const SkPaint ) -> c_int

source

pub unsafe fn saveLayerAlphaf( &mut self, bounds: *const SkRect, alpha: f32 ) -> c_int

source

pub unsafe fn saveLayer1( &mut self, layerRec: *const SkCanvas_SaveLayerRec ) -> c_int

source

pub unsafe fn restore(&mut self)

source

pub unsafe fn getSaveCount(&self) -> c_int

source

pub unsafe fn restoreToCount(&mut self, saveCount: c_int)

source

pub unsafe fn translate(&mut self, dx: SkScalar, dy: SkScalar)

source

pub unsafe fn scale(&mut self, sx: SkScalar, sy: SkScalar)

source

pub unsafe fn rotate(&mut self, degrees: SkScalar)

source

pub unsafe fn rotate1(&mut self, degrees: SkScalar, px: SkScalar, py: SkScalar)

source

pub unsafe fn skew(&mut self, sx: SkScalar, sy: SkScalar)

source

pub unsafe fn concat(&mut self, matrix: *const SkMatrix)

source

pub unsafe fn concat1(&mut self, arg1: *const SkM44)

source

pub unsafe fn setMatrix(&mut self, matrix: *const SkM44)

source

pub unsafe fn setMatrix1(&mut self, matrix: *const SkMatrix)

source

pub unsafe fn resetMatrix(&mut self)

source

pub unsafe fn clipRect( &mut self, rect: *const SkRect, op: SkClipOp, doAntiAlias: bool )

source

pub unsafe fn androidFramework_setDeviceClipRestriction( &mut self, rect: *const SkIRect )

source

pub unsafe fn clipRRect( &mut self, rrect: *const SkRRect, op: SkClipOp, doAntiAlias: bool )

source

pub unsafe fn clipPath( &mut self, path: *const SkPath, op: SkClipOp, doAntiAlias: bool )

source

pub unsafe fn clipShader(&mut self, arg1: sk_sp<SkShader>, arg2: SkClipOp)

source

pub unsafe fn clipRegion(&mut self, deviceRgn: *const SkRegion, op: SkClipOp)

source

pub unsafe fn quickReject(&self, rect: *const SkRect) -> bool

source

pub unsafe fn quickReject1(&self, path: *const SkPath) -> bool

source

pub unsafe fn getLocalClipBounds(&self) -> SkRect

source

pub unsafe fn getDeviceClipBounds(&self) -> SkIRect

source

pub unsafe fn drawColor(&mut self, color: *const SkColor4f, mode: SkBlendMode)

source

pub unsafe fn drawPaint(&mut self, paint: *const SkPaint)

source

pub unsafe fn drawPoints( &mut self, mode: SkCanvas_PointMode, count: usize, pts: *const SkPoint, paint: *const SkPaint )

source

pub unsafe fn drawPoint( &mut self, x: SkScalar, y: SkScalar, paint: *const SkPaint )

source

pub unsafe fn drawLine( &mut self, x0: SkScalar, y0: SkScalar, x1: SkScalar, y1: SkScalar, paint: *const SkPaint )

source

pub unsafe fn drawRect(&mut self, rect: *const SkRect, paint: *const SkPaint)

source

pub unsafe fn drawRegion( &mut self, region: *const SkRegion, paint: *const SkPaint )

source

pub unsafe fn drawOval(&mut self, oval: *const SkRect, paint: *const SkPaint)

source

pub unsafe fn drawRRect(&mut self, rrect: *const SkRRect, paint: *const SkPaint)

source

pub unsafe fn drawDRRect( &mut self, outer: *const SkRRect, inner: *const SkRRect, paint: *const SkPaint )

source

pub unsafe fn drawCircle( &mut self, cx: SkScalar, cy: SkScalar, radius: SkScalar, paint: *const SkPaint )

source

pub unsafe fn drawArc( &mut self, oval: *const SkRect, startAngle: SkScalar, sweepAngle: SkScalar, useCenter: bool, paint: *const SkPaint )

source

pub unsafe fn drawRoundRect( &mut self, rect: *const SkRect, rx: SkScalar, ry: SkScalar, paint: *const SkPaint )

source

pub unsafe fn drawPath(&mut self, path: *const SkPath, paint: *const SkPaint)

source

pub unsafe fn drawImage( &mut self, arg1: *const SkImage, x: SkScalar, y: SkScalar, arg2: *const SkSamplingOptions, arg3: *const SkPaint )

source

pub unsafe fn drawImageRect( &mut self, arg1: *const SkImage, src: *const SkRect, dst: *const SkRect, arg2: *const SkSamplingOptions, arg3: *const SkPaint, arg4: SkCanvas_SrcRectConstraint )

source

pub unsafe fn drawImageRect1( &mut self, arg1: *const SkImage, dst: *const SkRect, arg2: *const SkSamplingOptions, arg3: *const SkPaint )

source

pub unsafe fn drawImageNine( &mut self, image: *const SkImage, center: *const SkIRect, dst: *const SkRect, filter: SkFilterMode, paint: *const SkPaint )

source

pub unsafe fn drawImageLattice( &mut self, image: *const SkImage, lattice: *const SkCanvas_Lattice, dst: *const SkRect, filter: SkFilterMode, paint: *const SkPaint )

source

pub unsafe fn experimental_DrawEdgeAAQuad( &mut self, rect: *const SkRect, clip: *const SkPoint, aaFlags: SkCanvas_QuadAAFlags, color: *const SkColor4f, mode: SkBlendMode )

source

pub unsafe fn experimental_DrawEdgeAAImageSet( &mut self, imageSet: *const SkCanvas_ImageSetEntry, cnt: c_int, dstClips: *const SkPoint, preViewMatrices: *const SkMatrix, arg1: *const SkSamplingOptions, paint: *const SkPaint, constraint: SkCanvas_SrcRectConstraint )

source

pub unsafe fn drawSimpleText( &mut self, text: *const c_void, byteLength: usize, encoding: SkTextEncoding, x: SkScalar, y: SkScalar, font: *const SkFont, paint: *const SkPaint )

source

pub unsafe fn drawGlyphs( &mut self, count: c_int, glyphs: *const SkGlyphID, positions: *const SkPoint, clusters: *const u32, textByteCount: c_int, utf8text: *const c_char, origin: SkPoint, font: *const SkFont, paint: *const SkPaint )

source

pub unsafe fn drawGlyphs1( &mut self, count: c_int, glyphs: *const SkGlyphID, positions: *const SkPoint, origin: SkPoint, font: *const SkFont, paint: *const SkPaint )

source

pub unsafe fn drawGlyphs2( &mut self, count: c_int, glyphs: *const SkGlyphID, xforms: *const SkRSXform, origin: SkPoint, font: *const SkFont, paint: *const SkPaint )

source

pub unsafe fn drawTextBlob( &mut self, blob: *const SkTextBlob, x: SkScalar, y: SkScalar, paint: *const SkPaint )

source

pub unsafe fn drawPicture( &mut self, picture: *const SkPicture, matrix: *const SkMatrix, paint: *const SkPaint )

source

pub unsafe fn drawVertices( &mut self, vertices: *const SkVertices, mode: SkBlendMode, paint: *const SkPaint )

source

pub unsafe fn drawVertices1( &mut self, vertices: *const sk_sp<SkVertices>, mode: SkBlendMode, paint: *const SkPaint )

source

pub unsafe fn drawMesh( &mut self, mesh: *const SkMesh, blender: sk_sp<SkBlender>, paint: *const SkPaint )

source

pub unsafe fn drawPatch( &mut self, cubics: *const SkPoint, colors: *const SkColor, texCoords: *const SkPoint, mode: SkBlendMode, paint: *const SkPaint )

source

pub unsafe fn drawAtlas( &mut self, atlas: *const SkImage, xform: *const SkRSXform, tex: *const SkRect, colors: *const SkColor, count: c_int, mode: SkBlendMode, sampling: *const SkSamplingOptions, cullRect: *const SkRect, paint: *const SkPaint )

source

pub unsafe fn drawDrawable( &mut self, drawable: *mut SkDrawable, matrix: *const SkMatrix )

source

pub unsafe fn drawDrawable1( &mut self, drawable: *mut SkDrawable, x: SkScalar, y: SkScalar )

source

pub unsafe fn drawAnnotation( &mut self, rect: *const SkRect, key: *const c_char, value: *mut SkData )

source

pub unsafe fn getLocalToDevice(&self) -> SkM44

source

pub unsafe fn getTotalMatrix(&self) -> SkMatrix

source

pub unsafe fn temporary_internal_getRgnClip(&mut self, region: *mut SkRegion)

source

pub unsafe fn private_draw_shadow_rec( &mut self, arg1: *const SkPath, arg2: *const SkDrawShadowRec )

source

pub unsafe fn new() -> Self

source

pub unsafe fn new1( width: c_int, height: c_int, props: *const SkSurfaceProps ) -> Self

source

pub unsafe fn new2(device: sk_sp<SkBaseDevice>) -> Self

source

pub unsafe fn new3(bitmap: *const SkBitmap) -> Self

source

pub unsafe fn new4( bitmap: *const SkBitmap, props: *const SkSurfaceProps ) -> Self

source

pub unsafe fn new5(bounds: *const SkIRect) -> Self

Trait Implementations§

source§

impl Debug for SkCanvas

source§

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

Formats the value using the given formatter. Read more

Auto Trait Implementations§

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.