wzzc-dev/moui_skia/native does not have a README file

Bitmap

pub(all) struct Bitmap {
// private fields
}

Native Skia bitmap with owned pixel storage.

Bitmap::alloc_n32_premul

fn Bitmap::alloc_n32_premul(size :
ISize
) -> Bitmap?

Bitmap::byte_size

fn Bitmap::byte_size(self : Bitmap) -> Int

Bitmap::dimensions

fn Bitmap::dimensions(self : Bitmap) ->
ISize

Bitmap::erase_color

fn Bitmap::erase_color(self : Bitmap, color :
Color
) -> Unit

Bitmap::from_pixels

fn Bitmap::from_pixels(pixels : Bytes, width : Int, height : Int, row_bytes : Int) -> Bitmap?

Bitmap::height

fn Bitmap::height(self : Bitmap) -> Int

Bitmap::image_info

Bitmap::is_available

fn Bitmap::is_available(self : Bitmap) -> Bool

Bitmap::row_bytes

fn Bitmap::row_bytes(self : Bitmap) -> Int

Bitmap::to_bytes

fn Bitmap::to_bytes(self : Bitmap) -> Bytes

Bitmap::to_pixmap

Bitmap::width

fn Bitmap::width(self : Bitmap) -> Int

Canvas

pub(all) struct Canvas {
// private fields
}

Canvas borrowed from a native surface.

Canvas::clear

fn Canvas::clear(self : Canvas, color :
Color
) -> Unit

Canvas::clip_path

fn Canvas::clip_path(self : Canvas, path : Path, op? :
ClipOp
, anti_alias? : Bool) -> Unit

Canvas::clip_rect

fn Canvas::clip_rect(self : Canvas, rect :
Rect
, op? :
ClipOp
, anti_alias? : Bool) -> Unit

Canvas::clip_rrect

fn Canvas::clip_rrect(self : Canvas, rrect :
RRect
, op? :
ClipOp
, anti_alias? : Bool) -> Unit

Canvas::concat

fn Canvas::concat(self : Canvas, matrix :
Matrix
) -> Unit

Canvas::device_clip_bounds

fn Canvas::device_clip_bounds(self : Canvas) ->
IRect
?

Canvas::discard

fn Canvas::discard(self : Canvas) -> Unit

Canvas::draw_arc

fn Canvas::draw_arc(self : Canvas, oval :
Rect
, start_angle : Float, sweep_angle : Float, use_center : Bool, paint :
Paint
) -> Unit

Canvas::draw_circle

fn Canvas::draw_circle(self : Canvas, center :
Point
, radius : Float, paint :
Paint
) -> Unit

Canvas::draw_color

fn Canvas::draw_color(self : Canvas, color :
Color
, blend_mode? :
BlendMode
) -> Unit

Canvas::draw_drrect

Canvas::draw_glyphs

fn Canvas::draw_glyphs(self : Canvas, glyphs : Array[GlyphId], positions : Array[
Point
], font : Font, paint :
Paint
, origin? :
Point
) -> Unit

Canvas::draw_glyphs_checked

fn Canvas::draw_glyphs_checked(self : Canvas, glyphs : Array[GlyphId], positions : Array[
Point
], font : Font, paint :
Paint
, origin? :
Point
) -> Bool

Canvas::draw_image

fn Canvas::draw_image(self : Canvas, image : Image, top_left :
Point
) -> Unit

Canvas::draw_image_rect

Canvas::draw_line

Canvas::draw_oval

fn Canvas::draw_oval(self : Canvas, oval :
Rect
, paint :
Paint
) -> Unit

Canvas::draw_paint

fn Canvas::draw_paint(self : Canvas, paint :
Paint
) -> Unit

Canvas::draw_paint_shader

fn Canvas::draw_paint_shader(self : Canvas, shader : Shader, paint :
Paint
) -> Unit

Canvas::draw_paragraph

fn Canvas::draw_paragraph(self : Canvas, paragraph : Paragraph, origin? :
Point
) -> Bool

Canvas::draw_path

fn Canvas::draw_path(self : Canvas, path : Path, paint :
Paint
) -> Unit

Canvas::draw_path_shader

fn Canvas::draw_path_shader(self : Canvas, path : Path, shader : Shader, paint :
Paint
) -> Unit

Canvas::draw_path_value

fn Canvas::draw_path_value(self : Canvas, path :
Path
, paint :
Paint
) -> Unit

Canvas::draw_picture

fn Canvas::draw_picture(self : Canvas, picture : Picture) -> Unit

Canvas::draw_point

fn Canvas::draw_point(self : Canvas, point :
Point
, paint :
Paint
) -> Unit

Canvas::draw_points

Canvas::draw_rect

fn Canvas::draw_rect(self : Canvas, rect :
Rect
, paint :
Paint
) -> Unit

Canvas::draw_rect_shader

fn Canvas::draw_rect_shader(self : Canvas, rect :
Rect
, shader : Shader, paint :
Paint
) -> Unit

Canvas::draw_round_rect

fn Canvas::draw_round_rect(self : Canvas, rect :
Rect
, rx : Float, ry : Float, paint :
Paint
) -> Unit

Canvas::draw_round_rect_shader

fn Canvas::draw_round_rect_shader(self : Canvas, rect :
Rect
, rx : Float, ry : Float, shader : Shader, paint :
Paint
) -> Unit

Canvas::draw_rrect

fn Canvas::draw_rrect(self : Canvas, rrect :
RRect
, paint :
Paint
) -> Unit

Canvas::draw_text_utf8

fn Canvas::draw_text_utf8(self : Canvas, text : Bytes, origin :
Point
, font : Font, paint :
Paint
) -> Unit

Canvas::is_available

fn Canvas::is_available(self : Canvas) -> Bool

Canvas::local_clip_bounds

fn Canvas::local_clip_bounds(self : Canvas) ->
Rect
?

Canvas::quick_reject_path

fn Canvas::quick_reject_path(self : Canvas, path : Path) -> Bool

Canvas::quick_reject_rect

fn Canvas::quick_reject_rect(self : Canvas, rect :
Rect
) -> Bool

Canvas::replay

Replay is a counted no-op when the native Canvas target is unavailable.

Canvas::replay_frame

Replay frame is a counted no-op when the native Canvas target is unavailable.

Canvas::replay_frame_with_resources

fn Canvas::replay_frame_with_resources(self : Canvas, frame :
RenderFrameDescriptor
, resources : NativeReplayResources, font? : Font?) -> CanvasReplayStats

Replay frame with native resource caches is also a counted no-op on unavailable targets.

Canvas::replay_with_image_cache

Replay with an image cache is also a counted no-op on unavailable targets.

Canvas::replay_with_resources

fn Canvas::replay_with_resources(self : Canvas, commands :
RenderCommandList
, resources : NativeReplayResources, font? : Font?) -> CanvasReplayStats

Replay with native resource caches is also a counted no-op on unavailable targets.

Canvas::reset_matrix

fn Canvas::reset_matrix(self : Canvas) -> Unit

Canvas::restore

fn Canvas::restore(self : Canvas) -> Unit

Canvas::restore_to_count

fn Canvas::restore_to_count(self : Canvas, count : Int) -> Unit

Canvas::rotate

fn Canvas::rotate(self : Canvas, degrees : Float) -> Unit

Canvas::save

fn Canvas::save(self : Canvas) -> Int

Canvas::save_count

fn Canvas::save_count(self : Canvas) -> Int

Canvas::save_layer

fn Canvas::save_layer(self : Canvas, bounds? :
Rect
?, paint? :
Paint
, color_filter? : ColorFilter?, image_filter? : ImageFilter?, mask_filter? : MaskFilter?) -> Int

Canvas::scale

fn Canvas::scale(self : Canvas, scale :
Size
) -> Unit

Canvas::skew

fn Canvas::skew(self : Canvas, skew :
Point
) -> Unit

Canvas::translate

fn Canvas::translate(self : Canvas, delta :
Point
) -> Unit

CanvasReplayStats

pub(all) struct CanvasReplayStats {
command_count : Int
replayed_count : Int
skipped_count : Int
draw_count : Int
state_count : Int
transform_count : Int
clip_count : Int
clear_count : Int
text_count : Int
present_count : Int
resource_declaration_count : Int
image_resource_count : Int
shader_resource_count : Int
filter_resource_count : Int
path_resource_count : Int
text_resource_count : Int
} derive(Eq,
Debug
)

Summary of replaying a value-layer render command list into a native Canvas.

CanvasReplayStats::empty

CanvasReplayStats::is_complete

fn CanvasReplayStats::is_complete(self : CanvasReplayStats) -> Bool

CanvasReplayStats::status

CanvasReplayStatus

pub(all) enum CanvasReplayStatus {
CanvasReplayComplete
CanvasReplayDeferredPresent
CanvasReplaySkippedCommands
} derive(Eq,
Debug
)

Coarse outcome for replaying commands into a native Canvas.

CanvasReplayStatus::is_complete

fn CanvasReplayStatus::is_complete(self : CanvasReplayStatus) -> Bool

Codec

pub(all) struct Codec {
// private fields
}

Native Skia codec for encoded image data.

Codec::decode_n32_premul

fn Codec::decode_n32_premul(self : Codec) -> Bitmap?

Codec::dimensions

fn Codec::dimensions(self : Codec) ->
ISize

Codec::encoded_format

Codec::from_bytes

fn Codec::from_bytes(bytes : Bytes) -> Codec?

Codec::from_data

fn Codec::from_data(data : Data) -> Codec?

Codec::height

fn Codec::height(self : Codec) -> Int

Codec::image_info

Codec::is_available

fn Codec::is_available(self : Codec) -> Bool

Codec::width

fn Codec::width(self : Codec) -> Int

ColorFilter

pub(all) struct ColorFilter {
// private fields
}

Native Skia color filter.

ColorFilter::brightness

fn ColorFilter::brightness(amount : Float) -> ColorFilter?

ColorFilter::contrast

fn ColorFilter::contrast(amount : Float) -> ColorFilter?

ColorFilter::is_available

fn ColorFilter::is_available(self : ColorFilter) -> Bool

ColorFilter::matrix

fn ColorFilter::matrix(values : Array[Float]) -> ColorFilter?

ColorFilter::saturation

fn ColorFilter::saturation(amount : Float) -> ColorFilter?

Data

pub(all) struct Data {
// private fields
}

Immutable encoded or raw byte data owned by Skia.

Data::from_bytes

fn Data::from_bytes(bytes : Bytes) -> Data?

Data::is_available

fn Data::is_available(self : Data) -> Bool

Data::is_empty

fn Data::is_empty(self : Data) -> Bool

Data::size

fn Data::size(self : Data) -> Int

Data::to_bytes

fn Data::to_bytes(self : Data) -> Bytes

Font

pub(all) struct Font {
// private fields
}

Native Skia font.

Font::count_text_utf8

fn Font::count_text_utf8(self : Font, text : Bytes) -> Int

Font::default

fn Font::default(size? : Float) -> Font?

Font::empty

fn Font::empty(size? : Float) -> Font?

Font::from_typeface

fn Font::from_typeface(typeface : Typeface, size? : Float) -> Font?

Font::glyph_bounds

fn Font::glyph_bounds(self : Font, glyph : GlyphId) ->
Rect

Font::glyph_bounds_many

fn Font::glyph_bounds_many(self : Font, glyphs : Array[GlyphId]) -> Array[
Rect
]

Font::glyph_positions

fn Font::glyph_positions(self : Font, glyphs : Array[GlyphId], origin? :
Point
) -> Array[
Point
]

Font::glyph_width

fn Font::glyph_width(self : Font, glyph : GlyphId) -> Float

Font::glyph_widths

fn Font::glyph_widths(self : Font, glyphs : Array[GlyphId]) -> Array[Float]

Font::glyph_x_positions

fn Font::glyph_x_positions(self : Font, glyphs : Array[GlyphId], origin? : Float) -> Array[Float]

Font::is_available

fn Font::is_available(self : Font) -> Bool

Font::measure_text_bounds_utf8

fn Font::measure_text_bounds_utf8(self : Font, text : Bytes) ->
Rect
?

Font::measure_text_utf8

fn Font::measure_text_utf8(self : Font, text : Bytes) -> Float

Font::metrics

fn Font::metrics(self : Font) -> FontMetrics

Font::set_size

fn Font::set_size(self : Font, size : Float) -> Unit

Font::shape_text_utf8

fn Font::shape_text_utf8(self : Font, text : Bytes, width? : Float, left_to_right? : Bool) -> ShapedTextRun?

Font::size

fn Font::size(self : Font) -> Float

Font::spacing

fn Font::spacing(self : Font) -> Float

Font::text_glyph_positions_utf8

fn Font::text_glyph_positions_utf8(self : Font, text : Bytes, origin? :
Point
) -> Array[
Point
]

Font::text_glyph_x_positions_utf8

fn Font::text_glyph_x_positions_utf8(self : Font, text : Bytes, origin? : Float) -> Array[Float]

Font::text_to_glyphs_utf8

fn Font::text_to_glyphs_utf8(self : Font, text : Bytes) -> Array[GlyphId]

FontMetrics

pub(all) struct FontMetrics {
top : Float
ascent : Float
descent : Float
bottom : Float
leading : Float
average_char_width : Float
max_char_width : Float
x_min : Float
x_max : Float
x_height : Float
cap_height : Float
underline_thickness : Float?
underline_position : Float?
strikeout_thickness : Float?
strikeout_position : Float?
has_bounds : Bool
} derive(Eq,
Debug
)

Native Skia font metrics in y-down coordinates.

FontMgr

pub(all) struct FontMgr {
// private fields
}

Native Skia font manager.

FontMgr::count_families

fn FontMgr::count_families(self : FontMgr) -> Int

FontMgr::default

fn FontMgr::default() -> FontMgr?

FontMgr::family_name

fn FontMgr::family_name(self : FontMgr, index : Int) -> Bytes?

FontMgr::is_available

fn FontMgr::is_available(self : FontMgr) -> Bool

FontMgr::match_fallback_request

FontMgr::match_family_style

fn FontMgr::match_family_style(self : FontMgr, family_name : Bytes, weight? : Int, width? : Int, slant? : Int) -> Typeface?

FontMgr::match_family_style_character

fn FontMgr::match_family_style_character(self : FontMgr, family_name : Bytes, bcp47 : Array[Bytes], character : Int, style? :
FontStyleRequest
) -> Typeface?

FontMgr::match_family_style_request

fn FontMgr::match_family_style_request(self : FontMgr, family_name : Bytes, style :
FontStyleRequest
) -> Typeface?

FontMgr::resolve_fallback_request

GlyphId

pub(all) struct GlyphId(UInt16) derive(Eq,
Debug
)

Native Skia glyph identifier.

GlyphId::new

fn GlyphId::new(value : UInt16) -> GlyphId

GlyphId::to_int

fn GlyphId::to_int(self : GlyphId) -> Int

GlyphId::to_uint16

fn GlyphId::to_uint16(self : GlyphId) -> UInt16

GpuContext

pub(all) struct GpuContext {
descriptor :
GpuContextDescriptor

// private fields
}

Native Skia GPU context. The handle owns a Ganesh direct context when a GPU backend is linked.

GpuContext::direct3d12

GpuContext::is_available

fn GpuContext::is_available(self : GpuContext) -> Bool

GpuContext::support_status

fn GpuContext::support_status(self : GpuContext) -> SkiaGpuContextSupportStatus

GpuRenderCompletion

pub(all) struct GpuRenderCompletion {
sequence : Int
surface_generation : Int
image_resource_revision : Int64
submitted_at_ms : Double
gpu_completed_at_ms : Double
presented_at_ms : Double
status : GpuRenderCompletionStatus
context_generation : Int
} derive(Eq,
Debug
)

GpuRenderCompletionStatus

pub(all) enum GpuRenderCompletionStatus {
PictureRecorded
Presented
Dropped
FallbackToRaster
} derive(Eq,
Debug
)

GpuRenderPictureFrame

type GpuRenderPictureFrame

GpuRenderWorker

pub struct GpuRenderWorker {
state : GpuRenderWorkerState
next_sequence : Int
surface_generation : Int
context_generation : Int
in_flight : GpuRenderPictureFrame?
pending : GpuRenderPictureFrame?
controls : Array[GpuRenderWorkerControl]
completions : Array[GpuRenderCompletion]
submitted : Int
started : Int
completed : Int
dropped : Int
replaced_pending : Int
rejected_generation : Int
recovery_count : Int
recovery_failures : Int
fail_next_recovery : Bool
resource_cache_bytes : Int64
worker_thread_id : Int64
}

Capacity-two native-picture queue. Platform integrations drive poll only from the renderer worker thread; the queue never invokes MoonBit callbacks.

GpuRenderWorker::diagnostics

GpuRenderWorker::drain_completions

fn GpuRenderWorker::drain_completions(self : GpuRenderWorker) -> Array[GpuRenderCompletion]

GpuRenderWorker::fail_next_context_recovery

fn GpuRenderWorker::fail_next_context_recovery(self : GpuRenderWorker) -> Unit

GpuRenderWorker::new

fn GpuRenderWorker::new(surface_generation? : Int, worker_thread_id? : Int64) -> GpuRenderWorker

GpuRenderWorker::poll

fn GpuRenderWorker::poll(self : GpuRenderWorker, gpu_completed_at_ms? : Double, presented_at_ms? : Double) -> Unit

GpuRenderWorker::submit

fn GpuRenderWorker::submit(self : GpuRenderWorker, picture : Picture?, image_resource_revision? : Int64, submitted_at_ms? : Double) -> Int

GpuRenderWorker::submit_control

fn GpuRenderWorker::submit_control(self : GpuRenderWorker, control : GpuRenderWorkerControl) -> Int

GpuRenderWorkerControl

pub(all) enum GpuRenderWorkerControl {
Attach(UInt64)
AttachSurface(UInt64, UInt64)
Resize(Int, Int)
Detach
ContextLoss(String)
Shutdown
} derive(Eq,
Debug
)

GpuRenderWorkerDiagnostics

pub(all) struct GpuRenderWorkerDiagnostics {
state : GpuRenderWorkerState
submitted : Int
started : Int
completed : Int
dropped : Int
replaced_pending : Int
rejected_generation : Int
surface_generation : Int
context_generation : Int
recovery_count : Int
recovery_failures : Int
readback_count : Int
resource_cache_bytes : Int64
control_pending : Int
in_flight : Bool
pending : Bool
worker_thread_id : Int64
} derive(Eq,
Debug
)

GpuRenderWorkerState

pub(all) enum GpuRenderWorkerState {
Idle
Lost
Recovering
Recovered
FallbackToRaster
Shutdown
} derive(Eq,
Debug
)

Image

pub(all) struct Image {
// private fields
}

Native Skia image.

Image::dimensions

fn Image::dimensions(self : Image) ->
ISize

Image::encode_to_data

fn Image::encode_to_data(self : Image, format? :
EncodedImageFormat
, quality? : Int) -> Data?

Image::from_bitmap

fn Image::from_bitmap(bitmap : Bitmap) -> Image?

Image::from_encoded_bytes

fn Image::from_encoded_bytes(bytes : Bytes) -> Image?

Image::from_encoded_data

fn Image::from_encoded_data(data : Data) -> Image?

Image::height

fn Image::height(self : Image) -> Int

Image::image_info

Image::is_available

fn Image::is_available(self : Image) -> Bool

Image::width

fn Image::width(self : Image) -> Int

ImageFilter

pub(all) struct ImageFilter {
// private fields
}

Native Skia image filter.

ImageFilter::blur

fn ImageFilter::blur(sigma_x : Float, sigma_y : Float) -> ImageFilter?

ImageFilter::is_available

fn ImageFilter::is_available(self : ImageFilter) -> Bool

MaskFilter

pub(all) struct MaskFilter {
// private fields
}

Native Skia mask filter.

MaskFilter::blur

fn MaskFilter::blur(sigma : Float) -> MaskFilter?

MaskFilter::is_available

fn MaskFilter::is_available(self : MaskFilter) -> Bool

NativeGpuRenderWorker

pub struct NativeGpuRenderWorker {
}

NativeGpuRenderWorker::diagnostics

NativeGpuRenderWorker::drain_completions

NativeGpuRenderWorker::new

NativeGpuRenderWorker::shutdown

fn NativeGpuRenderWorker::shutdown(self : NativeGpuRenderWorker) -> Unit

NativeGpuRenderWorker::submit_control

fn NativeGpuRenderWorker::submit_control(self : NativeGpuRenderWorker, control : GpuRenderWorkerControl) -> Int64

NativeGpuRenderWorker::submit_empty_picture

fn NativeGpuRenderWorker::submit_empty_picture(self : NativeGpuRenderWorker, image_resource_revision? : Int64, submitted_at_ms? : Double) -> Int64

NativeGpuRenderWorker::submit_picture

fn NativeGpuRenderWorker::submit_picture(self : NativeGpuRenderWorker, picture : Picture, image_resource_revision? : Int64, submitted_at_ms? : Double) -> Int64

NativeGpuRenderWorker::wait_completion

fn NativeGpuRenderWorker::wait_completion(self : NativeGpuRenderWorker, timeout_ms? : Int) -> Bool

NativeGpuWorkerCompletion

pub(all) struct NativeGpuWorkerCompletion {
sequence : Int64
control_token : Int64
surface_generation : Int
context_generation : Int
image_resource_revision : Int64
submitted_at_ms : Double
processed_at_ms : Double
presented_at_ms : Double
status : NativeGpuWorkerCompletionStatus
} derive(Eq,
Debug
)

NativeGpuWorkerCompletionStatus

pub(all) enum NativeGpuWorkerCompletionStatus {
PictureRecorded
Dropped
ControlAcknowledged
FallbackToRaster
Presented
Unknown(Int)
} derive(Eq,
Debug
)

NativeGpuWorkerDiagnostics

pub(all) struct NativeGpuWorkerDiagnostics {
worker_thread_id : Int64
submitted : Int64
completed : Int64
dropped : Int64
replaced_pending : Int64
readback_count : Int64
surface_generation : Int
context_generation : Int
recovery_count : Int64
resource_cache_bytes : Int64
control_pending : Int
completion_pending : Int
} derive(Eq,
Debug
)

NativeReplayResourceStats

pub(all) struct NativeReplayResourceStats {
cache_count : Int
resource_count : Int
byte_size : Int64
max_bytes : Int64
hits : Int
misses : Int
evictions : Int
} derive(Eq,
Debug
)

Aggregate counters across the native replay resource caches.

NativeReplayResources

Native resource caches shared across one or more Canvas replay calls.

NativeReplayResources::new

fn NativeReplayResources::new(image_max_bytes? : Int64, shader_max_bytes? : Int64, path_max_bytes? : Int64, text_run_max_bytes? : Int64, font_max_bytes? : Int64, typeface_max_bytes? : Int64, color_filter_max_bytes? : Int64, image_filter_max_bytes? : Int64, mask_filter_max_bytes? : Int64) -> NativeReplayResources

NativeReplayResources::stats

NativeReplayTextRun

Paragraph

pub(all) struct Paragraph {
// private fields
}

Native SkParagraph layout.

Paragraph::height

fn Paragraph::height(self : Paragraph) -> Float

Paragraph::hit_test_utf8

fn Paragraph::hit_test_utf8(self : Paragraph, x : Float, y : Float) -> ParagraphHitTestResult

Paragraph::is_available

fn Paragraph::is_available(self : Paragraph) -> Bool

Paragraph::layout_utf8

fn Paragraph::layout_utf8(text : Bytes, family_name? : Bytes, size? : Float, weight? : Int, width? : Int, slant? : Int, max_width? : Float, left_to_right? : Bool) -> Paragraph?

Paragraph::line_count

fn Paragraph::line_count(self : Paragraph) -> Int

Paragraph::line_metrics

fn Paragraph::line_metrics(self : Paragraph) -> Array[ParagraphLineMetric]

Paragraph::text_box_directions_utf8

fn Paragraph::text_box_directions_utf8(self : Paragraph, start : Int, end : Int) -> Array[Int]

Paragraph::text_boxes_utf8

fn Paragraph::text_boxes_utf8(self : Paragraph, start : Int, end : Int) -> Array[
Rect
]

Paragraph::width

fn Paragraph::width(self : Paragraph) -> Float

ParagraphHitTestResult

pub(all) struct ParagraphHitTestResult {
offset : Int
downstream : Bool
} derive(Eq,
Debug
)

SkParagraph hit-test result exposed as a UTF-8 byte offset.

ParagraphLineMetric

pub(all) struct ParagraphLineMetric {
start : Int
end : Int
end_excluding_whitespace : Int
end_including_newline : Int
line_number : Int
hard_break : Bool
left : Float
width : Float
baseline : Float
ascent : Float
descent : Float
height : Float
} derive(Eq,
Debug
)

SkParagraph line metrics exposed with UTF-8 byte ranges.

ParagraphLineMetric::is_valid

fn ParagraphLineMetric::is_valid(self : ParagraphLineMetric) -> Bool

ParagraphLineMetric::right

fn ParagraphLineMetric::right(self : ParagraphLineMetric) -> Float

Path

pub(all) struct Path {
// private fields
}

Native Skia path.

Path::add_circle

fn Path::add_circle(self : Path, center :
Point
, radius : Float, direction? :
PathDirection
) -> Unit

Path::add_oval

Path::add_path_value

Path::add_path_value_matrix

Path::add_path_value_offset

fn Path::add_path_value_offset(self : Path, path :
Path
, offset :
Point
, mode? :
AddPathMode
) -> Unit

Path::add_poly

fn Path::add_poly(self : Path, points : Array[
Point
], close? : Bool) -> Unit

Path::add_rect

Path::add_round_rect

fn Path::add_round_rect(self : Path, rect :
Rect
, rx : Float, ry : Float, direction? :
PathDirection
) -> Unit

Path::add_rrect

fn Path::add_rrect(self : Path, rrect :
RRect
, direction? :
PathDirection
) -> Unit

Path::bounds

fn Path::bounds(self : Path) ->
Rect
?

Path::close

fn Path::close(self : Path) -> Unit

Path::compute_tight_bounds

fn Path::compute_tight_bounds(self : Path) ->
Rect
?

Path::conic_to

fn Path::conic_to(self : Path, control :
Point
, end :
Point
, weight : Float) -> Unit

Path::contains

fn Path::contains(self : Path, point :
Point
) -> Bool

Path::count_points

fn Path::count_points(self : Path) -> Int

Path::count_verbs

fn Path::count_verbs(self : Path) -> Int

Path::cubic_to

Path::fill_type

Path::from_value

fn Path::from_value(path :
Path
) -> Path?

Path::is_available

fn Path::is_available(self : Path) -> Bool

Path::is_empty

fn Path::is_empty(self : Path) -> Bool

Path::is_finite

fn Path::is_finite(self : Path) -> Bool

Path::is_inverse_fill_type

fn Path::is_inverse_fill_type(self : Path) -> Bool

Path::is_last_contour_closed

fn Path::is_last_contour_closed(self : Path) -> Bool

Path::is_line

Path::is_oval

fn Path::is_oval(self : Path) ->
Rect
?

Path::is_rect

Path::last_point

fn Path::last_point(self : Path) ->
Point
?

Path::line_to

fn Path::line_to(self : Path, point :
Point
) -> Unit

Path::move_to

fn Path::move_to(self : Path, point :
Point
) -> Unit

Path::new

fn Path::new() -> Path?

Path::offset

fn Path::offset(self : Path, dx : Float, dy : Float) -> Unit

Path::quad_to

fn Path::quad_to(self : Path, control :
Point
, end :
Point
) -> Unit

Path::reset

fn Path::reset(self : Path) -> Unit

Path::rewind

fn Path::rewind(self : Path) -> Unit

Path::segment_masks

Path::set_fill_type

fn Path::set_fill_type(self : Path, fill_type :
PathFillType
) -> Unit

Path::transform

fn Path::transform(self : Path, matrix :
Matrix
) -> Unit

Picture

pub(all) struct Picture {
// private fields
}

Immutable Skia display list. A picture is safe to retain and replay on the renderer worker; it does not contain MoonBit objects.

Picture::approximate_bytes_used

fn Picture::approximate_bytes_used(self : Picture) -> Int64

Picture::is_available

fn Picture::is_available(self : Picture) -> Bool

Picture::unique_id

fn Picture::unique_id(self : Picture) -> Int

PictureRecorder

pub(all) struct PictureRecorder {
// private fields
}

Native recorder for immutable Skia pictures.

PictureRecorder::begin

fn PictureRecorder::begin(self : PictureRecorder, _width : Int, _height : Int) -> Canvas?

PictureRecorder::finish

fn PictureRecorder::finish(self : PictureRecorder) -> Picture?

PictureRecorder::new

PictureRecorder::record_empty

fn PictureRecorder::record_empty(self : PictureRecorder, _width : Int, _height : Int) -> Unit

ResolvedTypeface

Native typeface plus the value-layer fallback metadata that resolved it.

ResolvedTypeface::font_descriptor

fn ResolvedTypeface::font_descriptor(self : ResolvedTypeface, size? : Float, scale_x? : Float, skew_x? : Float) ->
FontDescriptor

ResolvedTypeface::is_available

fn ResolvedTypeface::is_available(self : ResolvedTypeface) -> Bool

ResolvedTypeface::resource_plan

fn ResolvedTypeface::resource_plan(self : ResolvedTypeface, size? : Float, scale_x? : Float, skew_x? : Float, request_byte_size? : Int64, resolution_byte_size? : Int64, match_byte_size? : Int64, font_byte_size? : Int64) ->
RendererResourcePlan

Shader

pub(all) struct Shader {
// private fields
}

Native Skia shader.

Shader::color

Shader::is_available

fn Shader::is_available(self : Shader) -> Bool

Shader::radial_gradient

fn Shader::radial_gradient(center :
Point
, radius : Float, inner_color :
Color
, outer_color :
Color
, tile_mode? :
TileMode
) -> Shader?

ShapedTextRun

pub(all) struct ShapedTextRun {
// private fields
}

Native Skia shaped text run.

ShapedTextRun::advance

ShapedTextRun::clusters

fn ShapedTextRun::clusters(self : ShapedTextRun) -> Array[Int]

ShapedTextRun::glyph_count

fn ShapedTextRun::glyph_count(self : ShapedTextRun) -> Int

ShapedTextRun::glyphs

fn ShapedTextRun::glyphs(self : ShapedTextRun) -> Array[GlyphId]

ShapedTextRun::is_available

fn ShapedTextRun::is_available(self : ShapedTextRun) -> Bool

ShapedTextRun::positions

SkiaGpuContextSupportStatus

pub(all) enum SkiaGpuContextSupportStatus {
SkiaGpuContextAvailable
SkiaGpuContextSkiaUnavailable
SkiaGpuContextAnonymous
SkiaGpuContextMockUnsupported
SkiaGpuContextBackendUnsupported
SkiaGpuContextMetalOptInDisabled
SkiaGpuContextMetalHeadersUnavailable
SkiaGpuContextMetalRuntimeUnavailable
SkiaGpuContextDirect3DOptInDisabled
SkiaGpuContextDirect3DHeadersUnavailable
SkiaGpuContextDirect3DRuntimeUnavailable
SkiaGpuContextVulkanOptInDisabled
SkiaGpuContextVulkanHeadersUnavailable
SkiaGpuContextVulkanRuntimeUnavailable
SkiaGpuContextEglOptInDisabled
SkiaGpuContextEglHeadersUnavailable
SkiaGpuContextEglRuntimeUnavailable
} derive(Eq,
Debug
)

Native diagnostic status for a value-layer GPU context descriptor.

SkiaGpuContextSupportStatus::is_available

Surface

pub(all) struct Surface {
descriptor :
SurfaceDescriptor

// private fields
}

Native raster or GPU surface. The handle owns a Skia SkSurface when Skia is linked.

Surface::canvas

fn Surface::canvas(self : Surface) -> Canvas?

Borrow the surface canvas.

Surface::dimensions

Surface::direct3d_gpu_context_headers_available

fn Surface::direct3d_gpu_context_headers_available() -> Bool

Surface::direct3d_gpu_context_opt_in_enabled

fn Surface::direct3d_gpu_context_opt_in_enabled() -> Bool

Surface::direct3d_gpu_context_runtime_available

fn Surface::direct3d_gpu_context_runtime_available() -> Bool

Surface::direct3d_present_and_acquire_next

fn Surface::direct3d_present_and_acquire_next(surface : Surface, context : GpuContext, hwnd_ptr : UInt64) -> Surface?

Surface::direct3d_window_surface

fn Surface::direct3d_window_surface(context : GpuContext, hwnd_ptr : UInt64, descriptor :
SurfaceDescriptor
) -> Surface?

Surface::egl_gpu_context_headers_available

fn Surface::egl_gpu_context_headers_available() -> Bool

Surface::egl_gpu_context_opt_in_enabled

fn Surface::egl_gpu_context_opt_in_enabled() -> Bool

Surface::egl_gpu_context_runtime_available

fn Surface::egl_gpu_context_runtime_available() -> Bool

Surface::egl_present_and_acquire_next

fn Surface::egl_present_and_acquire_next(surface : Surface, context : GpuContext, native_window_ptr : UInt64) -> Surface?

Surface::egl_window_surface

fn Surface::egl_window_surface(context : GpuContext, native_window_ptr : UInt64, descriptor :
SurfaceDescriptor
) -> Surface?

Surface::flush_and_submit

fn Surface::flush_and_submit(self : Surface) -> Bool

Finalize pending surface work; current raster surfaces use this as a no-op boundary.

Surface::for_target_with_gpu_context

fn Surface::for_target_with_gpu_context(target :
SurfaceTargetDescriptor
, context : GpuContext) -> Surface?

Surface::gpu_context_support_status

Surface::gpu_n32_premul

Surface::height

fn Surface::height(self : Surface) -> Int

Surface::image_info

Surface::image_snapshot

fn Surface::image_snapshot(self : Surface) -> Image?

Snapshot current surface contents into an immutable image.

Surface::image_snapshot_with_bounds

fn Surface::image_snapshot_with_bounds(self : Surface, bounds :
IRect
) -> Image?

Snapshot a bounded rectangle of current surface contents into an image.

Surface::metal_gpu_context_headers_available

fn Surface::metal_gpu_context_headers_available() -> Bool

Surface::metal_gpu_context_opt_in_enabled

fn Surface::metal_gpu_context_opt_in_enabled() -> Bool

Surface::metal_gpu_context_runtime_available

fn Surface::metal_gpu_context_runtime_available() -> Bool

Surface::metal_present_and_acquire_next

fn Surface::metal_present_and_acquire_next(surface : Surface, context : GpuContext, layer_ptr : UInt64) -> Surface?

Surface::metal_window_surface

fn Surface::metal_window_surface(context : GpuContext, layer_ptr : UInt64, descriptor :
SurfaceDescriptor
) -> Surface?

Surface::raster_n32_premul

fn Surface::raster_n32_premul(size :
ISize
) -> Surface?

Surface::read_pixels

Read surface pixels into an owned MoonBit Pixmap.

Surface::render_frame

fn Surface::render_frame(self : Surface, frame :
RenderFrameDescriptor
, font? : Font?, frame_index? : Int) -> SurfaceFrameReplayStats

Surface::render_frame_with_resources

fn Surface::render_frame_with_resources(self : Surface, frame :
RenderFrameDescriptor
, resources : NativeReplayResources, font? : Font?, frame_index? : Int) -> SurfaceFrameReplayStats

Surface::target_support_status

Report why a value-layer render target cannot be allocated by this backend.

Surface::target_support_status_with_gpu_context

Surface::vulkan_gpu_context_headers_available

fn Surface::vulkan_gpu_context_headers_available() -> Bool

Surface::vulkan_gpu_context_opt_in_enabled

fn Surface::vulkan_gpu_context_opt_in_enabled() -> Bool

Surface::vulkan_gpu_context_runtime_available

fn Surface::vulkan_gpu_context_runtime_available() -> Bool

Surface::vulkan_present_and_acquire_next

fn Surface::vulkan_present_and_acquire_next(surface : Surface, context : GpuContext, anw_ptr : UInt64) -> Surface?

Surface::vulkan_wayland_surface

fn Surface::vulkan_wayland_surface(context : GpuContext, display_ptr : UInt64, surface_ptr : UInt64, descriptor :
SurfaceDescriptor
) -> Surface?

Surface::vulkan_window_surface

fn Surface::vulkan_window_surface(context : GpuContext, anw_ptr : UInt64, descriptor :
SurfaceDescriptor
) -> Surface?

Surface::width

fn Surface::width(self : Surface) -> Int

SurfaceFrameReplayStats

Summary of rendering a value-layer frame through a native surface boundary.

SurfaceFrameReplayStats::finalization_is_ready

fn SurfaceFrameReplayStats::finalization_is_ready(self : SurfaceFrameReplayStats) -> Bool

SurfaceFrameReplayStats::finalization_resource_plan

SurfaceFrameReplayStats::is_complete

fn SurfaceFrameReplayStats::is_complete(self : SurfaceFrameReplayStats) -> Bool

SurfaceFrameReplayStats::status

SurfaceFrameReplayStatus

pub(all) enum SurfaceFrameReplayStatus {
SurfaceFrameReplayComplete
SurfaceFrameReplayValidationFailed(
RenderFrameValidationStatus
)
SurfaceFrameReplaySurfaceMismatch
SurfaceFrameReplaySkippedCommands
SurfaceFrameReplayFinalizationFailed
} derive(Eq,
Debug
)

Coarse outcome for rendering a value-layer frame through a native surface.

SurfaceFrameReplayStatus::is_complete

fn SurfaceFrameReplayStatus::is_complete(self : SurfaceFrameReplayStatus) -> Bool

SurfaceTargetSupportStatus

pub(all) enum SurfaceTargetSupportStatus {
SurfaceTargetSupported
SurfaceTargetEmpty
SurfaceTargetSkiaUnavailable
SurfaceTargetWindowUnsupported
SurfaceTargetGpuUnsupported
SurfaceTargetMissingGpuContext
SurfaceTargetGpuContextMismatch
SurfaceTargetGpuContextUnsupported
} derive(Eq,
Debug
)

Native support decision for creating a surface from a value-layer target.

SurfaceTargetSupportStatus::is_supported

Typeface

pub(all) struct Typeface {
// private fields
}

Native Skia typeface.

Typeface::default

fn Typeface::default() -> Typeface?

Typeface::family_name

fn Typeface::family_name(self : Typeface) -> Bytes?

Typeface::from_data

fn Typeface::from_data(data : Bytes, index? : Int) -> Typeface?

Typeface::from_file

fn Typeface::from_file(path : Bytes, index? : Int) -> Typeface?

Typeface::from_font_mgr_family

fn Typeface::from_font_mgr_family(font_mgr : FontMgr, family_name : Bytes, weight? : Int, width? : Int, slant? : Int) -> Typeface?

Typeface::from_font_mgr_request

fn Typeface::from_font_mgr_request(font_mgr : FontMgr, request :
FontFallbackRequest
) -> Typeface?

Typeface::from_name

fn Typeface::from_name(family_name : Bytes, weight? : Int, width? : Int, slant? : Int) -> Typeface?

Typeface::from_name_style

fn Typeface::from_name_style(family_name : Bytes, style :
FontStyleRequest
) -> Typeface?

Typeface::has_color_glyphs

fn Typeface::has_color_glyphs(self : Typeface) -> Bool

Typeface::is_available

fn Typeface::is_available(self : Typeface) -> Bool

Typeface::is_bold

fn Typeface::is_bold(self : Typeface) -> Bool

Typeface::is_fixed_pitch

fn Typeface::is_fixed_pitch(self : Typeface) -> Bool

Typeface::is_italic

fn Typeface::is_italic(self : Typeface) -> Bool

Typeface::register_data

fn Typeface::register_data(family_alias : Bytes, data : Bytes, index? : Int) -> Typeface?

Typeface::with_variations

fn Typeface::with_variations(self : Typeface, variations : Array[(Bytes, Float)]) -> Typeface?

skia_available

fn skia_available() -> Bool

Runtime availability of the linked Skia native backend.

skia_paragraph_available

fn skia_paragraph_available() -> Bool

Runtime availability of the optional linked SkParagraph backend.

skia_shaper_available

fn skia_shaper_available() -> Bool

Runtime availability of the optional linked Skia shaper backend.