Sign in

    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?

    Create Bitmap from external pixel buffer (RGBA8888 premultiplied)

    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 the CPU Canvas subset of a value-layer render command list.

    Canvas::replay_frame

    Replay a ready render frame, preserving frame validation as the native boundary.

    Canvas::replay_frame_with_resources

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

    Replay a ready render frame while reusing native resources by key.

    Canvas::replay_with_image_cache

    Replay render commands while reusing decoded native images by resource key.

    Canvas::replay_with_resources

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

    Replay render commands while reusing decoded native resources by key.

    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::equal

    CanvasReplayStats::is_complete

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

    CanvasReplayStats::not_equal

    fn CanvasReplayStats::not_equal(x : CanvasReplayStats, y : 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::equal

    CanvasReplayStatus::is_complete

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

    CanvasReplayStatus::not_equal

    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.

    FontMetrics::equal

    fn FontMetrics::equal(FontMetrics, FontMetrics) -> Bool

    FontMetrics::not_equal

    fn FontMetrics::not_equal(x : FontMetrics, y : FontMetrics) -> Bool

    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::equal

    fn GlyphId::equal(GlyphId, GlyphId) -> Bool

    GlyphId::new

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

    GlyphId::not_equal

    fn GlyphId::not_equal(x : GlyphId, y : GlyphId) -> Bool

    GlyphId::to_int

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

    GlyphId::to_repr

    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

    Create a Direct3D 12 GPU context from the host platform's default D3D12 device. Returns None when the native Skia build lacks D3D support, when the D3D12 device cannot be created, or when descriptor.backend is not Direct3D12GpuContext.

    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
    )

    GpuRenderCompletion::equal

    GpuRenderCompletion::not_equal

    GpuRenderCompletionStatus

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

    GpuRenderCompletionStatus::equal

    GpuRenderCompletionStatus::not_equal

    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
    )

    GpuRenderWorkerControl::equal

    GpuRenderWorkerControl::not_equal

    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
    )

    GpuRenderWorkerDiagnostics::equal

    GpuRenderWorkerDiagnostics::not_equal

    GpuRenderWorkerState

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

    GpuRenderWorkerState::equal

    GpuRenderWorkerState::not_equal

    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 {
    // private fields
    }

    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

    Retains the native SkPicture before enqueueing it. The worker thread sees only the retained Skia reference and POD metadata, never the MoonBit object.

    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
    )

    NativeGpuWorkerCompletion::equal

    NativeGpuWorkerCompletion::not_equal

    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
    )

    NativeGpuWorkerDiagnostics::equal

    NativeGpuWorkerDiagnostics::not_equal

    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.

    NativeReplayResourceStats::equal

    NativeReplayResourceStats::not_equal

    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.

    ParagraphHitTestResult::equal

    ParagraphHitTestResult::not_equal

    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::equal

    ParagraphLineMetric::is_valid

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

    ParagraphLineMetric::not_equal

    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?

    Begin recording into a Canvas owned by this recorder. Finish recording only after all Canvas calls are complete; the Canvas must not be used after finish.

    PictureRecorder::finish

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

    PictureRecorder::new

    PictureRecorder::record_empty

    fn PictureRecorder::record_empty(self : PictureRecorder, width : Int, height : Int) -> Unit

    Records an empty immutable picture. Drawing commands can be appended by the native Canvas bridge before finish in platform integrations.

    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

    SkiaGpuContextSupportStatus::not_equal

    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::copy_from

    fn Surface::copy_from(self : Surface, source : Surface) -> Bool

    Replace the destination surface pixels with a same-sized snapshot of the source surface. Both surfaces must use compatible dimensions and GPU contexts; callers must flush pending source work before copying and flush the destination after copying.

    Surface::dimensions

    Surface::direct3d_gpu_context_headers_available

    fn Surface::direct3d_gpu_context_headers_available() -> Bool

    Report whether this native build can see the Skia Ganesh Direct3D headers.

    Surface::direct3d_gpu_context_opt_in_enabled

    fn Surface::direct3d_gpu_context_opt_in_enabled() -> Bool

    Report whether the Windows Direct3D Skia GPU-context probe is enabled for this native build.

    Surface::direct3d_gpu_context_runtime_available

    fn Surface::direct3d_gpu_context_runtime_available() -> Bool

    Report whether the opt-in Direct3D GPU-context probe can create a D3D12 device.

    Surface::direct3d_present_and_acquire_next

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

    Present the swap chain backing a Surface created via Surface::direct3d_window_surface, and return the next back buffer wrapped as a fresh Surface for the following frame.

    The host renderer has already called Surface::flush_and_submit() before this function; this call only asks the swap chain to present and acquires the next back buffer. expected_size is the host window's current physical size: when it differs from the swap chain extent, the swap chain is resized via ResizeBuffers after the present (an HWND can hold only one flip-model swap chain, so resizing in place is the only live-resize path on Windows). Returns:
    • Some(next_surface) when the swap chain was presented and a next back buffer was successfully acquired and wrapped.
    • None when the swap chain cannot produce a next back buffer (e.g. device lost, or the native Skia build lacks D3D support). The caller should treat None as a present failure.

    Surface::direct3d_window_surface

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

    Wrap a platform window-backed Direct3D 12 swap chain back buffer as a Skia GPU surface.

    hwnd_ptr is a raw HWND handle (typed as UInt64 for FFI portability) obtained from the host window. The host presenter owns the HWND lifecycle; Skia borrows the swap chain's back buffer texture for rendering. The returned Surface must be flushed and then presented via Surface::direct3d_present_and_acquire_next to advance to the next back buffer.

    Returns None when the GPU context is unavailable, the size is empty, or the native Skia build cannot wrap a D3D12 swap chain (e.g. the opt-in flags MOUI_SKIA_ENABLE_GPU_D3D / MOUI_SKIA_HAS_GANESH_D3D_HEADERS are not enabled at link time).

    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?

    Present the EGL surface backing a Surface created via Surface::egl_window_surface, and return a fresh Surface wrapping the next back buffer for the following frame.

    Surface::egl_window_surface

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

    Wrap an Android ANativeWindow or HarmonyOS OHNativeWindow-backed EGL surface as a Skia GPU surface. The caller passes the raw native-window pointer as native_window_ptr. Skia borrows the EGLSurface's back buffer; the host presenter owns the native-window lifecycle. The returned Surface must be flushed and then presented via Surface::egl_present_and_acquire_next to swap the back buffer to the front buffer.

    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

    Allocate a native surface for a value-layer render target.

    Raster targets are supported by the current CPU backend. Window and GPU targets return None until concrete native present/GPU backends are linked.

    Surface::for_target_with_gpu_context

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

    Allocate a native surface for a value-layer render target and explicit GPU context.

    Surface::gpu_context_support_status

    Classify native support for a value-layer GPU context descriptor.

    Surface::gpu_n32_premul

    Allocate an offscreen GPU-backed N32 premultiplied surface from an explicit GPU context.

    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

    Report whether this native build can see the Skia Ganesh Metal headers.

    Surface::metal_gpu_context_opt_in_enabled

    fn Surface::metal_gpu_context_opt_in_enabled() -> Bool

    Report whether the macOS Metal Skia GPU-context probe is enabled for this native build.

    Surface::metal_gpu_context_runtime_available

    fn Surface::metal_gpu_context_runtime_available() -> Bool

    Report whether the opt-in Metal GPU-context probe can create a Metal device and queue.

    Surface::metal_present_and_acquire_next

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

    Present the CAMetalDrawable backing a Surface created via Surface::metal_window_surface, and return the next drawable wrapped as a fresh Surface for the following frame.

    The host renderer has already called Surface::flush_and_submit() before this function; this call only asks the current drawable to present and acquires the next one. Returns:
    • Some(next_surface) when the drawable was presented and a next drawable was successfully acquired and wrapped.
    • None when the layer cannot produce a next drawable (e.g. layer was detached, device lost, or the native Skia build lacks Metal support). The caller should treat None as a present failure.

    Surface::metal_window_surface

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

    Wrap a platform window-backed Metal drawable as a Skia GPU surface.

    layer_ptr is a raw CAMetalLayer* handle (typed as UInt64 for FFI portability) obtained from the host view. The host presenter owns the layer and drawable lifecycle; Skia borrows the drawable's MTLTexture for one frame. The returned Surface must be flushed and then presented via Surface::metal_present_and_acquire_next to advance to the next drawable.

    Returns None when the GPU context is unavailable, the size is empty, or the native Skia build cannot wrap a Metal drawable (e.g. the opt-in flags MOUI_SKIA_ENABLE_GPU_METAL / MOUI_SKIA_HAS_GANESH_METAL_HEADERS are not enabled at link time).

    Surface::raster_n32_premul

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

    Allocate a raster N32 premultiplied surface.

    Returns None when the native Skia backend is not linked or the size is empty.

    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

    Replay a ready frame into this surface and flush/submit its finalization boundary.

    Surface::render_frame_with_resources

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

    Replay a ready frame into this surface with native resource caches, then flush/submit.

    Surface::target_support_status

    Report whether a value-layer render target can be allocated by this backend.

    Surface::target_support_status_with_gpu_context

    Report whether a value-layer render target can be allocated with a concrete 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?

    Present the Vulkan swap chain backing a Surface created via Surface::vulkan_window_surface, and return the next swap chain image wrapped as a fresh Surface for the following frame.

    Surface::vulkan_wayland_surface

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

    Wrap a Linux Wayland wl_surface-backed Vulkan swap chain image as a Skia GPU surface. The caller passes the raw wl_display* as display_ptr and wl_surface* as surface_ptr. Skia borrows the swap chain's back buffer image; the host presenter owns the Wayland surface lifecycle. The returned Surface must be flushed and then presented via Surface::vulkan_present_and_acquire_next to advance to the next back buffer.

    Surface::vulkan_window_surface

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

    Wrap an Android ANativeWindow-backed Vulkan swap chain image as a Skia GPU surface. The caller passes the raw ANativeWindow* as anw_ptr. Skia borrows the swap chain's back buffer image; the host presenter owns the ANativeWindow lifecycle. The returned Surface must be flushed and then presented via Surface::vulkan_present_and_acquire_next to advance to the next back buffer.

    Surface::width

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

    SurfaceFrameReplayStats

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

    SurfaceFrameReplayStats::equal

    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::not_equal

    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::equal

    SurfaceFrameReplayStatus::is_complete

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

    SurfaceFrameReplayStatus::not_equal

    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::equal

    SurfaceTargetSupportStatus::is_supported

    SurfaceTargetSupportStatus::not_equal

    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?

    Creates a typeface from in-memory font data (embedded TTF/OTF bytes). index selects a face from a TTC collection. The resulting typeface is usable for measurement and drawing but is not registered for family-name resolution; use register_data when paragraph layout must resolve it too.

    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?

    Creates a typeface from in-memory font data and registers it under alias (plus the font's own family name) in the embedded-font registry, so that paragraph layout can resolve the family by name as well.

    Typeface::with_variations

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

    Returns a typeface with the given variation axes applied. Each pair is the 4-byte OpenType axis tag (e.g. b"wght") and the desired value. The clone composes with any variations already baked into the typeface. Returns None if the typeface does not support variation cloning; an empty variations list returns the original typeface unchanged.

    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.