Sign in

    moui_skia

    MoonBit bindings for the Skia Graphics Library

    skia
    graphics
    bindings
    Download zip
    Author
    Version
    0.2.1
    License
    Apache-2.0
    Last updated
    5 days ago
    Downloads
    1K

    Dependencies

    #wzzc-dev/moui_skia

    MoonBit bindings for the Skia Graphics Library, structured after rust-skia/rust-skia.

    The public API is organized in the same spirit as skia-safe: start with safe value-layer drawing types, opt into native handles through the native subpackage, and treat resource planning/frame submission contracts as backend integration APIs.

    • Safe drawing values: geometry, colors, image metadata, transforms, paint, sampling, and portable paths are available directly from @moui_skia.
    • Native drawing handles: @native.Surface, @native.Canvas, @native.Image, @native.Path, @native.Font, shaders, filters, and codecs are opt-in and return None on the fallback build instead of exposing unavailable handles.
    • Backend planning contracts: SurfaceTargetDescriptor, RenderCommandList, RenderFrameDescriptor, RendererResourcePlan, and related descriptors are for GUI/runtime integrations that need replay, cache preflight, presentation, or future GPU admission checks.

    The current package exposes the following value-layer API surface:

    • geometry: Point, IPoint, Size, ISize, Rect, IRect, RRect, including point vector helpers, rectangle constructors, sortedness, centers, offsets, and integer rounding helpers
    • color: Color, Color4f
    • image metadata and pixel layout: ColorInfo, ImageInfo
    • copied pixel snapshots: Pixmap
    • transforms: Matrix, including member access, finite and affine queries, pre/post concat helpers, and point/vector/radius/rect mapping
    • paint state: Paint, PaintStyle, StrokeCap, StrokeJoin, BlendMode
    • canvas point drawing modes: PointMode
    • image sampling: SamplingOptions, FilterMode, MipmapMode, CubicResampler
    • surface contracts: SurfaceDescriptor, SurfaceTargetDescriptor, SurfacePresentDescriptor, SurfaceFinalizationDescriptor, WindowSurfaceDescriptor, SurfaceBackend, SurfaceOrigin, SurfaceBudget, SurfacePresentMode, GpuContextBackend, and GpuContextDescriptor for raster, window, and future GPU render targets, with stable window target identity plus typed resource descriptors for backend surface, present scheduling, finalization, and GPU context caches
    • renderer resource cache: ResourceCache and ResourceCacheStats provide a deterministic byte-budgeted LRU boundary for images, shaders, typefaces, and other backend-owned resources, including cache preflight splits for resident and missing cacheable resource plans
    • renderer resource identity: RendererResourceKind, RendererResourceKey, RendererResourceDescriptor, and RendererResourcePlan give those caches typed keys and auditable resource requirements for images, shaders, filters, text runs, paths, surfaces, and future GPU resources, including GPU-backed resource subplans for backend admission checks plus cacheable/uncacheable subplans for separating reusable handles from one-shot frame work
    • shader and filter resource recipes: ShaderDescriptor, ColorFilterDescriptor, ImageFilterDescriptor, and MaskFilterDescriptor provide stable cache keys for native shader/filter handles before a backend allocates them
    • render pass contracts: RenderPassDescriptor, RenderPassLoadOp, and RenderPassStoreOp define target bounds plus load/clear/store/present semantics before a concrete backend records draw commands, including defaults derived from SurfaceTargetDescriptor and resource descriptors for target surfaces
    • render command contracts: RenderCommandList, RenderCommand, and RenderCommandStats provide the backend-neutral command stream boundary a GUI renderer can validate before replaying into a native Canvas, including current-clip color/paint and shader fills, rounded-rectangle and path clipping, cacheable text-run and shaped glyph-run draw commands, explicit shader/filter/image resource declarations, and target-bound resource plans for backend caches
    • render frame contracts: RenderFrameDescriptor, RenderFrameSubmissionDescriptor, RenderFrameFinalizationDescriptor, and RenderFrameValidationStatus combine a target, finalized command stream, resource plan, readiness diagnostics, cache population boundary, optional present scheduling descriptor, and auditable per-frame submission/finalization resource plans with GPU-backed plus cacheable/uncacheable subsets for backend admission, cache staging, and resident/missing preflight
    • text layout and fallback contracts: TextRunDescriptor, TextMeasurementDescriptor, MeasuredTextRunDescriptor, TextShapingDescriptor, ShapedTextRunDescriptor, ShapedGlyphRunDescriptor, FontDescriptor, FontFallbackRequest, FontFallbackMatchDescriptor, FontFallbackResolutionDescriptor, FontFallbackChain, and FontStyleRequest define the value-layer input and resolved-match metadata for native shaping and font fallback, including deterministic byte-range text-run, text-measurement, measured-result, text-shaping, shaped-result, detailed shaped-glyph, font, fallback request, fallback match, and fallback resolution resource keys, with invalid measured/shaped/fallback-request/result metadata kept uncacheable without downstream cache dependencies, and plans for backend measurement, shaping, font-handle, and typeface-resolution caches
    • portable paths: Path, PathLine, PathRect, PathVerb, PathFillType, PathDirection, PathSegmentMask, including verb/point counts, contour closed queries, rectangle, oval, circle, rounded-rectangle and polyline/polygon contours, control-point and tight bounds, append/extend path modes, path appends, resource descriptors, reset, and rewind

    Native Skia object handles are intentionally staged behind a separate FFI plan so ownership, ref-counting, and linker configuration can be validated package by package.

    The native subpackage contains the first opt-in native boundary:

    • @native.skia_available() reports whether the stub was compiled with real Skia headers and libraries;
    • @native.skia_shaper_available() reports whether the SkShaper boundary was compiled and linked;
    • @native.skia_paragraph_available() reports whether the SkParagraph boundary was compiled and linked; use MOUI_SKIA_REQUIRE_SKPARAGRAPH=1 for smoke/proof runs that should fail when SkParagraph, SkShaper, SkUnicode, HarfBuzz, or ICU support is missing;
    • @native.Surface::raster_n32_premul(size) is the first raster surface entry;
    • @native.Surface::gpu_context_support_status(context) reports the native GPU-context readiness gate for a value-layer context descriptor. macOS Metal probing is opt-in with MOUI_SKIA_ENABLE_GPU_METAL=1; it checks the Skia Ganesh Metal headers plus real GrDirectContext creation;
    • @native.GpuContext::metal(context) creates an explicit native Metal/Ganesh context when the opt-in readiness gate is available;
    • @native.Surface::gpu_n32_premul(context, descriptor) and @native.Surface::for_target_with_gpu_context(target, context) allocate offscreen GPU-backed Skia surfaces for matching GPU target/context pairs;
    • @native.Surface::target_support_status(target) reports whether a target can be allocated as a native surface, including empty, unavailable Skia, window-unsupported, and GPU-unsupported decisions;
    • @native.Surface::for_target(target) allocates supported raster targets from value-layer SurfaceTargetDescriptor values. This default path remains raster-only; GPU targets must use the explicit target+context API;
    • @native.Surface::descriptor() reports the value-layer surface contract satisfied by the native raster surface;
    • @native.Surface::image_snapshot() returns an immutable @native.Image handle when a surface is available;
    • @native.Surface::image_snapshot_with_bounds(bounds) snapshots a bounded surface rectangle and rejects rectangles outside the surface bounds;
    • @native.Surface::flush_and_submit() establishes an explicit finalization boundary for native surfaces; raster surfaces treat it as a no-op, while GPU-backed surfaces flush through their owning direct context;
    • @native.Surface::render_frame(frame) and render_frame_with_resources(...) return SurfaceFrameReplayStats, whose status() classifies validation, surface mismatch, replay skip, finalization failure, and complete outcomes; the stats also expose the value-layer frame finalization descriptor and resource plan used for the native flush/submit boundary;
    • @native.NativeReplayResources::stats() reports aggregate cache slots, resident resources, byte budgets, hits, misses, and evictions across the native replay caches used by Canvas and Surface frame replay;
    • @native.Surface::read_pixels(bounds) reads N32 premultiplied surface pixels into an owned @moui_skia.Pixmap, rejecting rectangles outside the surface bounds;
    • @native.Image::encode_to_data(format, quality) returns immutable @native.Data bytes for PNG/JPEG output, with WEBP enabled only when the linked native Skia build exposes the encoder capability, rejecting unsupported native encode formats and clamping quality to Skia's 0..100 range;
    • @native.Image::from_bitmap(bitmap) snapshots a native bitmap into an immutable image;
    • @native.Data::from_bytes(bytes) and @native.Image::from_encoded_bytes(bytes) provide the first in-memory image decode path;
    • @native.Codec::from_data(data) and @native.Codec::from_bytes(bytes) expose encoded image metadata and decode to an N32 premultiplied Bitmap;
    • @native.Bitmap::alloc_n32_premul(size) owns raster pixel storage and can export a copied @moui_skia.Pixmap;
    • @native.FontMgr::default() enumerates native font families and matches a family plus Skia-style weight/width/slant values to a typeface; @native.Typeface::default() / from_name(family, weight, width, slant) and @native.Font::default(size) / from_typeface(typeface, size) create the first native text handles for drawing and measurement; native typefaces can report their Skia family name; native font sizes, shaping widths, and glyph position origins are finite-checked before crossing into Skia; FontStyleRequest and FontFallbackRequest can be passed through the native FontMgr/Typeface adapters, including Skia character fallback when the request includes BCP47 language tags and a code point, then recorded with FontFallbackMatchDescriptor metadata for cache planning;
    • @native.Shader::color(color), linear_gradient(start, end, colors...), and radial_gradient(center, radius, colors...) create the first native shader handles for shader-backed paint calls, with degenerate linear-gradient inputs plus non-finite linear/radial-gradient geometry rejected before native replay/resource planning;
    • @native.ColorFilter, ImageFilter, and MaskFilter reject non-finite parameters before native handle creation and value-layer resource planning, with native FFI stubs also nulling non-finite matrix/sigma inputs;
    • direct invalid shader/filter descriptor variants produce uncacheable resource descriptors, preserving cache safety even when constructors are bypassed;
    • native replay skips invalid shader/filter descriptor commands without touching or populating shader, color-filter, image-filter, or mask-filter caches;
    • native replay skips undecodable or empty encoded image draw commands without touching or populating image caches;
    • native replay keeps empty path draw, clip, and path-shader commands out of path cache lookups, with zero path-cache resources/misses/hits while still replaying harmless empty native paths;
    • non-finite value-layer paths produce uncacheable resource descriptors, are filtered out of command-list resource plans, and skip native replay without touching path caches;
    • native path appends skip non-finite portable paths or matrices without mutating existing @native.Path geometry;
    • direct native path verb, shape, transform, and offset mutations skip non-finite inputs without mutating existing @native.Path geometry;
    • @native.Path supports the first path construction calls: new, reset, rewind, set_fill_type, fill_type, move_to, line_to, quad_to, cubic_to, conic_to, close, count_points, count_verbs, segment_masks, is_finite, is_inverse_fill_type, is_last_contour_closed, last_point, is_line, is_rect, is_oval, contains, bounds, compute_tight_bounds, add_path_value, add_poly, add_rect, add_oval, add_circle, add_round_rect, add_rrect, transform, offset, and is_empty;
    • @native.Path::from_value(path) replays a finite portable @moui_skia.Path into a native path when Skia is linked and rejects non-finite paths;
    • @native.Canvas supports clear, draw_color, draw_paint, draw_point, draw_line, draw_points, draw_rect, draw_oval, draw_circle, draw_arc, draw_round_rect, draw_rrect, draw_drrect, draw_path, draw_image, and draw_image_rect with explicit SamplingOptions, plus portable path drawing through draw_path_value, render command replay through replay with CanvasReplayStats::status() diagnostics that distinguish complete Canvas work, deferred surface present commands, and skipped replay commands, plus command/resource category counters for declarations, images, shaders, filters, paths, and text resources, UTF-8 text through draw_text_utf8, text-run replay that honors descriptor byte ranges and skips empty ranges without populating text caches, positioned glyph runs through draw_glyphs, invalid shaped glyph replay skips without cacheable dependency planning, optional shaped glyph runs through Font::shape_text_utf8 when SkShaper is linked, shaped-run metadata through TextShapingDescriptor and ShapedTextRunDescriptor, detailed shaped glyph-run metadata through ShapedGlyphRunDescriptor, optional paragraph layout through Paragraph::layout_utf8 with line metrics, UTF-8 range text boxes, and UTF-8 hit-test offsets when SkParagraph is linked, font measurement through Font::measure_text_utf8, glyph IDs through Font::count_text_utf8 / Font::text_to_glyphs_utf8, glyph advances through Font::glyph_width / Font::glyph_widths, glyph positions through Font::glyph_positions / Font::glyph_x_positions and Font::text_glyph_positions_utf8 / Font::text_glyph_x_positions_utf8, glyph bounds through Font::glyph_bounds / Font::glyph_bounds_many, text bounds through Font::measure_text_bounds_utf8, font metrics through Font::metrics, and color-shader paint through draw_paint_shader / draw_rect_shader;
    • direct Canvas geometry, clip, image placement, and text/glyph positioning calls skip non-finite coordinates without mutating pixels;
    • native Canvas paint forwarding sanitizes non-finite stroke scalars, and save_layer treats non-finite bounds as an unbounded layer;
    • native Canvas image sampling disables cubic resampling when cubic coefficients are non-finite, preserving the image draw with ordinary filter/mipmap sampling;
    • @native.Canvas also exposes the first state and transform calls: save, save_layer, restore, restore_to_count, save_count, translate, scale, rotate, skew, concat, reset_matrix, and discard;
    • @native.Canvas exposes clipping with clip_rect, clip_rrect, and clip_path using ClipOp, local/device clip bound queries, and rect/path quick rejection;
    • without Skia link flags it compiles as a safe fallback and returns None.

    #Native smoke test

    The regular test suite keeps the no-Skia fallback build green by skipping the real-backend-only assertions. A real native Skia build should additionally pass the dedicated smoke test:

    The fallback gate also verifies that each target-specific native MoonBit file has an unavailable fallback twin in native/moon.pkg, so new native bindings do not accidentally compile only on the linked Skia path. CI also runs moon check --target all to keep the wasm/js fallback and native/LLVM target maps compileable together.

    cd scripts/native_smoke moon run --target native .

    The smoke module is intentionally separate from the default test suite. Without real Skia link flags it fails fast instead of silently exercising the fallback.

    For the fallback-only validation gate, run:

    .\scripts\check-fallback.ps1

    That script formats/checks the root module, runs moon info, runs the default tests, and builds the native smoke module without real Skia link flags so the smoke entry stays compileable while remaining opt-in at runtime.

    The GitHub Actions fallback workflow mirrors this gate on Windows and Linux. Real Skia smoke tests are intentionally separate until the repository owns a repeatable Skia binary/build source for CI.

    The optional shaped-text boundary is off by default so small Skia builds remain usable. On macOS, pass --enable-skshaper to scripts/macos-skia-smoke.sh when the Skia library directory also contains libskshaper, libskunicode_core, libskunicode_icu, libharfbuzz, and libicu. The wrapper adds -DMOUI_SKIA_HAS_SKSHAPER, links those module libraries, and verifies the native smoke log contains the shaped-run marker.

    The default real-Skia binary provider is now the wzzc-dev/skia GitHub release locked by skia-provider-lock.json to tag dev-6d73578a36 and commit 6d73578a36506d10bc044e920cc71037982e481d. The fetch helpers cache packages under .skia-cache/release and print the include/lib/flag values consumed by the existing native package configurators. The default link mode is static; on routes that support them, dynamic libraries are selected explicitly with MOUI_SKIA_LINK_MODE=dynamic or --link-mode dynamic:

    bash scripts/fetch-release-skia.sh --platform auto --arch auto --print-env

    HarmonyOS uses a platform-specific harmonyos_release provider entry because the first accepted HarmonyOS assets live on release dev-fcb9c18e54 rather than the default desktop/mobile provider release. HarmonyOS auto / skia-gpu must use the complete static asset because the locked libskia.so hides Ganesh internal symbols referenced by libskia_ganesh_ext.a. Dynamic remains valid only for explicit skia-raster. Select the GPU-capable asset with:

    bash scripts/fetch-release-skia.sh --platform harmonyos --arch arm64 --link-mode static --print-env

    .\scripts\fetch-release-skia.ps1 -Platform auto -Arch auto -PrintEnv

    Use REAL_SKIA_SMOKE.md as the acceptance checklist for real-backend artifacts. A passing fallback build, dry-run, or syntax check is not enough to claim real Skia acceptance.

    The smoke test requires @native.skia_available() to be true. It creates a 32x32 raster N32 premul surface, clears it to white, draws red, green, and blue rectangles, exercises draw_points in point, line, and polygon modes, draws a positioned glyph run, checks canvas save/restore state, clip bounds, quick rejection, and clipped drawing, reads pixels back, checks representative BGRA N32 pixels, snapshots the surface, encodes the snapshot as PNG, verifies the encoded PNG signature, decodes those bytes back into an image, and decodes an N32 bitmap whose pixels still match the drawn scene and N32 channel layout.

    On Windows with a MinGW-compatible Skia build, use the acceptance wrapper to temporarily inject the native link flags, run the smoke test, save logs, and verify the temporary package rewrites were restored afterwards:

    .\scripts\windows-accept-real-skia-smoke.ps1 -LogDir logs ` -SkiaInclude C:\path\to\skia ` -SkiaLibDir C:\path\to\skia\out\Static

    Pass -ExtraCcFlags or -ExtraLinkFlags if your Skia build needs additional defines or dependent libraries. The helper checks that the Skia headers and a MinGW-compatible libskia.a or skia.lib are present before rewriting package configuration. The Windows Real Skia Smoke workflow exposes the same helper as a manual job for runners that already have such a Skia build available.

    On Linux, use the acceptance wrapper. With an existing Skia build visible to the system compiler, pass its include and library paths:

    bash scripts/linux-accept-real-skia-smoke.sh --log-dir logs \ --skia-provider existing \ --skia-include /path/to/skia \ --skia-lib-dir /path/to/skia/out/Static

    Pass --extra-cc-flags or --extra-link-flags for Skia builds that need additional defines, rpaths, or dependent libraries. Add --dry-run-config to print the selected mode and effective build/smoke arguments without fetching or building Skia or rewriting native/moon.pkg; in source-build mode it prints the resolved checkout/build paths and GN args, and with existing Skia paths it also checks for the Skia header and library files and prints the exact native flags that would be injected. When libskia.so is used, the Linux smoke helper adds the supplied library directory to LD_LIBRARY_PATH before running the smoke executable. Pass --smoke-log logs/linux-native-smoke-output.log to keep the native smoke executable's stdout/stderr separate from the wrapper log.

    On macOS with an existing Skia build, use the acceptance wrapper:

    bash scripts/macos-accept-real-skia-smoke.sh --log-dir logs \ --skia-provider existing \ --skia-include /path/to/skia \ --skia-lib-dir /path/to/skia/out/Static

    The macOS helper adds common CoreFoundation/CoreGraphics/CoreText/ImageIO frameworks by default; pass --extra-link-flags for additional Skia build dependencies. Use --link-mode dynamic|static or MOUI_SKIA_LINK_MODE=dynamic|static when you need to force libskia.dylib or libskia.a; auto chooses the mode based on available library files.

    The package prebuild hook now enables native real-Skia configuration by default for native builds. Set MOUI_SKIA_ENABLE_PREBUILD_SKIA=0 or MOUI_SKIA_DISABLE_PREBUILD_SKIA=1 when you need the fallback-unavailable compile path. Environment values for MOUI_SKIA_SKIA_INCLUDE, MOUI_SKIA_SKIA_LIB_DIR, MOUI_SKIA_SKIA_LIB, MOUI_SKIA_EXTRA_CC_FLAGS, MOUI_SKIA_EXTRA_LINK_FLAGS, and MOUI_SKIA_LINK_MODE take precedence over the release provider defaults. For cross-builds, set MOUI_SKIA_PLATFORM (macos, linux, windows, android, ios, iosSim, harmonyos, tvos, tvosSim, or wasm), MOUI_SKIA_ARCH (arm64, x64, or riscv64), and optionally MOUI_SKIA_CONFIG=Release|Debug. Android builds should set MOUI_SKIA_PLATFORM=android explicitly so the prebuild uses the locked Android artifact rather than the current desktop host platform. HarmonyOS GPU cross-builds must resolve to static; dynamic is supported only for explicit skia-raster.

    To build a small CPU-only Skia from source for the macOS smoke test, run:

    bash scripts/macos-accept-real-skia-smoke.sh --log-dir logs \ --skia-provider source \ --work-dir .skia-cache/macos

    The macOS Real Skia Smoke workflow exposes the same path as a manual GitHub Actions job.

    To build a small CPU-only Skia from source and run the Linux smoke test in one locally with acceptance checks, run:

    bash scripts/install-linux-smoke-deps.sh bash scripts/linux-accept-real-skia-smoke.sh --work-dir .skia-cache/linux

    On an already prepared Ubuntu runner, bash scripts/install-linux-smoke-deps.sh --check verifies the same apt package set that the workflow installs before spending time on native smoke work. This includes libwayland-dev, libwayland-bin, and wayland-protocols, which wzzc-dev/window needs while preparing the native smoke dependency graph and generating the xdg-shell client header. The Linux source-build defaults install clang plus fontconfig/FreeType/HarfBuzz development headers and pass cc="clang" / cxx="clang++" to Skia GN so the smoke build does not depend on the runner's default C++ compiler.

    When --skia-rev is omitted, the Linux source-build helpers read skia-revision.txt. Keep that file on a known-good Skia commit after the first successful real runner, or override it with --skia-rev while testing a new Skia revision. The acceptance summary log records the resolved skia_commit; use the guarded pin helpers below to write that value after a passing source-built run. Do not write release-provider commits into skia-revision.txt; they are tracked in skia-provider-lock.json.

    For the first source-built Linux acceptance, the guarded pinning wrapper runs the smoke, verifies the artifact bundle with a required full commit hash, pins skia-revision.txt, and verifies the pin:

    bash scripts/linux-accept-and-pin-skia.sh --work-dir .skia-cache/linux

    It rejects dry runs and existing-build Skia paths so only a real source-built Linux acceptance can establish the initial repository pin. It checks Ubuntu smoke dependencies before starting the expensive build; pass --install-deps to install them first, or --skip-deps-check for a runner managed elsewhere.

    Without --skia-include / --skia-lib-dir, the acceptance wrapper checks out and builds Skia through scripts/linux-real-skia-smoke.sh, captures wrapper and native executable logs, verifies native/moon.pkg was restored, and checks that the executable prints moui_skia native smoke test passed, proving the real smoke reached its final assertion. The Linux Real Skia Smoke workflow uses the same acceptance wrapper for real runs; its optional inputs can either build Skia from skia_rev or reuse an existing skia_include / skia_lib_dir pair with extra compile/link flags. It also runs weekly as an expensive real-backend canary. The workflow runs a dry-run preflight before installing build dependencies or compiling Skia, then uploads the preflight log, logs/linux-skia-build.log for source-built runs, wrapper log, and dedicated native executable log, plus the acceptance summary log, as a linux-real-skia-smoke-log artifact on success or failure. On real runs, it also greps logs/linux-native-smoke-output.log for moui_skia native smoke test passed and records the marker check in the workflow summary. The same artifact check can be rerun manually with scripts/verify-native-smoke-log.sh logs/linux-native-smoke-output.log. The summary records the selected mode, dry-run setting, artifact name, key Skia inputs, expected log paths, the marker check, plus whether the temporary package rewrites were restored after the run. Set the workflow's dry_run_config input to print the resolved build/smoke arguments without installing MoonBit/build dependencies, building Skia, restoring the Skia cache, or rewriting package files; with existing Skia paths it also checks for the Skia header and library files. The workflow only restores the Skia source-build cache when it is building Skia from source; extra_gn_args is ignored for existing builds.

    ///|
    test {
    let point = @moui_skia.Point::new(3, 4)
    let rect = @moui_skia.Rect::from_point_and_size(
    @moui_skia.Point::new(2, 3),
    @moui_skia.Size::new(4, 5),
    )
    let sorted = @moui_skia.Rect::new(5, 4, 1, 2).sorted()
    let fractional = @moui_skia.Rect::new(1.2, -2.8, 5.7, 3.1)
    let wide = @moui_skia.IRect::new(-2000000000, 0, 2000000000, 1)

    assert_true(point.is_finite())
    assert_eq(point.length_squared(), 25.0)
    assert_eq(point.dot(@moui_skia.Point::new(-2, 5)), 14.0)
    assert_eq(point.cross(@moui_skia.Point::new(-2, 5)), 23.0)
    assert_true(point.with_length(10) == Some(@moui_skia.Point::new(6, 8)))
    assert_true(point.rotate_cw() == @moui_skia.Point::new(4, -3))
    assert_true(rect == @moui_skia.Rect::from_ltrb(2, 3, 6, 8))
    assert_eq(rect.left(), 2.0)
    assert_eq(rect.bottom(), 8.0)
    assert_true(rect.tl() == @moui_skia.Point::new(2, 3))
    assert_true(rect.intersects(@moui_skia.Rect::from_xywh(5, 7, 3, 3)))
    assert_true(
    @moui_skia.Rect::from_points([point, @moui_skia.Point::new(8, -1)]) ==
    Some(@moui_skia.Rect::new(3, -1, 8, 4)),
    )
    assert_true(
    rect.to_quad() ==
    [
    @moui_skia.Point::new(2, 3),
    @moui_skia.Point::new(6, 3),
    @moui_skia.Point::new(6, 8),
    @moui_skia.Point::new(2, 8),
    ],
    )
    assert_true(
    rect.with_offset_to(@moui_skia.Point::new(10, -1)) ==
    @moui_skia.Rect::from_xywh(10, -1, 4, 5),
    )
    assert_true(sorted.is_sorted())
    assert_true(sorted.center() == @moui_skia.Point::new(3, 3))
    assert_eq(wide.width_64(), 4000000000L)
    assert_true(!wide.is_empty_64())
    assert_true(fractional.round_in() == @moui_skia.IRect::new(2, -2, 5, 3))
    assert_true(fractional.round_out() == @moui_skia.IRect::new(1, -3, 6, 4))
    }

    ///|
    test {
    let info = @moui_skia.ImageInfo::n32_premul(@moui_skia.ISize::new(1, 1))
    let pixmap = @moui_skia.Pixmap::new(info, 4, b"\xff\x00\x00\xff")

    assert_true(pixmap is Some(_))
    assert_eq(info.shift_per_pixel(), 2)
    assert_eq(info.compute_min_byte_size64(), 4L)
    }

    ///|
    test {
    let paint = @moui_skia.Paint::new(
    color=@moui_skia.Color::from_rgb(0xff, 0, 0),
    anti_alias=true,
    )
    .set_stroke(true)
    .set_stroke_width(4)
    let path = @moui_skia.Path::new().add_rect(
    @moui_skia.Rect::from_xywh(0, 0, 8, 8),
    )

    assert_true(paint.style == Stroke)
    assert_true(paint.color == @moui_skia.Color::red())
    assert_true(
    path.stroke_bounds(paint) == Some(@moui_skia.Rect::new(-2, -2, 10, 10)),
    )
    }

    ///|
    test {
    let sampling = @moui_skia.SamplingOptions::new(filter=Linear, mipmap=Linear)

    assert_eq(sampling.filter_ordinal(), 1)
    assert_eq(sampling.mipmap_ordinal(), 2)
    assert_true(!sampling.uses_cubic())
    }

    ///|
    test {
    let matrix = @moui_skia.Matrix::translate(10, 20).concat(
    @moui_skia.Matrix::scale(2, 3),
    )
    let rect = matrix.map_rect(@moui_skia.Rect::from_xywh(0, 0, 4, 5))
    let points = @moui_skia.Matrix::translate(1, 2).map_points([
    @moui_skia.Point::new(0, 0),
    @moui_skia.Point::new(3, 4),
    ])

    assert_true(matrix.is_invertible())
    assert_true(rect == @moui_skia.Rect::from_xywh(10, 20, 8, 15))
    assert_true(
    points == [@moui_skia.Point::new(1, 2), @moui_skia.Point::new(4, 6)],
    )
    }

    ///|
    test {
    let path = @moui_skia.Path::new(fill_type=EvenOdd).add_circle(
    @moui_skia.Point::new(5, 5),
    5,
    direction=CCW,
    )

    let shifted = path.offset(10, 20)

    assert_eq(path.verb_count(), 6)
    assert_true(path.fill_type == EvenOdd)
    assert_true(
    shifted.bounds() == Some(@moui_skia.Rect::from_xywh(10, 20, 10, 10)),
    )
    }

    ///|
    test {
    let triangle = @moui_skia.Path::new().add_poly(
    [
    @moui_skia.Point::new(0, 0),
    @moui_skia.Point::new(10, 0),
    @moui_skia.Point::new(10, 10),
    ],
    close=true,
    )

    assert_true(triangle.is_last_contour_closed())
    assert_eq(triangle.count_points(), 3)
    assert_true(
    triangle.bounds() == Some(@moui_skia.Rect::from_xywh(0, 0, 10, 10)),
    )
    }

    ///|
    test {
    let base = @moui_skia.Path::new().add_rect(
    @moui_skia.Rect::from_xywh(0, 0, 2, 2),
    )
    let triangle = @moui_skia.Path::new().add_poly(
    [
    @moui_skia.Point::new(0, 0),
    @moui_skia.Point::new(10, 0),
    @moui_skia.Point::new(10, 10),
    ],
    close=true,
    )

    let combined = base.add_path(
    triangle,
    matrix=@moui_skia.Matrix::translate(10, 0),
    )
    let shifted = base.add_path_offset(triangle, @moui_skia.Point::new(10, 0))

    assert_eq(combined.count_verbs(), 9)
    assert_true(combined.bounds() == Some(@moui_skia.Rect::new(0, 0, 20, 10)))
    assert_true(shifted == combined)
    }

    ///|
    test {
    let rrect = @moui_skia.RRect::new(
    @moui_skia.Rect::from_xywh(0, 0, 10, 8),
    @moui_skia.Size::new(2, 2),
    @moui_skia.Size::new(3, 1),
    @moui_skia.Size::new(1, 2),
    @moui_skia.Size::empty(),
    )
    let path = @moui_skia.Path::new().add_rrect(rrect)

    assert_true(!rrect.is_rect())
    assert_true(
    rrect.with_offset_to(@moui_skia.Point::new(10, 20)).bounds() ==
    @moui_skia.Rect::from_xywh(10, 20, 10, 8),
    )
    assert_true(rrect.contains_rect(@moui_skia.Rect::from_xywh(3, 3, 4, 2)))
    assert_eq(path.verb_count(), 10)
    assert_true(path.bounds() == Some(rrect.bounds()))
    }

    Scalar

    type Scalar = Float

    Skia uses single-precision scalar values for most geometry.

    AddPathMode

    pub(all) enum AddPathMode {
    Append
    Extend
    } derive(Eq,
    Debug
    )

    How path appends connect the source path to the destination path.

    AddPathMode::default

    fn AddPathMode::default() -> AddPathMode

    AddPathMode::equal

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

    AddPathMode::not_equal

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

    AlphaType

    pub(all) enum AlphaType {
    Unknown
    Opaque
    Premul
    Unpremul
    } derive(Eq,
    Debug
    )

    Interpretation of alpha in pixel data.

    AlphaType::default

    fn AlphaType::default() -> AlphaType

    AlphaType::equal

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

    AlphaType::is_opaque

    fn AlphaType::is_opaque(self : AlphaType) -> Bool

    AlphaType::not_equal

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

    BlendMode

    pub(all) enum BlendMode {
    Clear
    Src
    Dst
    SrcOver
    DstOver
    SrcIn
    DstIn
    SrcOut
    DstOut
    SrcATop
    DstATop
    Xor
    Plus
    Modulate
    Screen
    Overlay
    Darken
    Lighten
    ColorDodge
    ColorBurn
    HardLight
    SoftLight
    Difference
    Exclusion
    Multiply
    Hue
    Saturation
    Color
    Luminosity
    } derive(Eq,
    Debug
    )

    Porter-Duff and extended blend modes mirrored from Skia.

    BlendMode::default

    fn BlendMode::default() -> BlendMode

    BlendMode::equal

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

    BlendMode::not_equal

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

    BlendMode::to_skia_ordinal

    fn BlendMode::to_skia_ordinal(self : BlendMode) -> Int

    ClipOp

    pub(all) enum ClipOp {
    Difference
    Intersect
    } derive(Eq,
    Debug
    )

    How a new clip geometry combines with the current canvas clip.
    impl Default for ClipOp

    ClipOp::default

    fn ClipOp::default() -> ClipOp

    ClipOp::equal

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

    ClipOp::not_equal

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

    ClipOp::to_repr

    ClipOp::to_skia_ordinal

    fn ClipOp::to_skia_ordinal(self : ClipOp) -> Int

    Color

    pub(all) struct Color(UInt) derive(Eq,
    Debug
    )

    Packed Skia ARGB color in 0xAARRGGBB order.
    impl Default for Color

    Color::a

    fn Color::a(self : Color) -> Byte

    Color::argb

    fn Color::argb(self : Color) -> UInt

    Color::b

    fn Color::b(self : Color) -> Byte

    Color::black

    fn Color::black() -> Color

    Color::blue

    fn Color::blue() -> Color

    Color::cyan

    fn Color::cyan() -> Color

    Color::dark_gray

    fn Color::dark_gray() -> Color

    Color::default

    fn Color::default() -> Color

    Color::equal

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

    Color::from_argb

    fn Color::from_argb(a : Byte, r : Byte, g : Byte, b : Byte) -> Color

    Color::from_rgb

    fn Color::from_rgb(r : Byte, g : Byte, b : Byte) -> Color

    Color::g

    fn Color::g(self : Color) -> Byte

    Color::gray

    fn Color::gray() -> Color

    Color::green

    fn Color::green() -> Color

    Color::light_gray

    fn Color::light_gray() -> Color

    Color::magenta

    fn Color::magenta() -> Color

    Color::new

    fn Color::new(argb : UInt) -> Color

    Color::not_equal

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

    Color::r

    fn Color::r(self : Color) -> Byte

    Color::red

    fn Color::red() -> Color

    Color::to_color4f

    fn Color::to_color4f(self : Color) -> Color4f

    Color::to_repr

    Color::transparent

    fn Color::transparent() -> Color

    Color::white

    fn Color::white() -> Color

    Color::with_alpha

    fn Color::with_alpha(self : Color, alpha : Byte) -> Color

    Color::yellow

    fn Color::yellow() -> Color

    Color4f

    pub(all) struct Color4f {
    r : Float
    g : Float
    b : Float
    a : Float
    } derive(Eq,
    Debug
    )

    Floating-point RGBA color in linear component order.
    impl Default for Color4f

    Color4f::default

    fn Color4f::default() -> Color4f

    Color4f::equal

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

    Color4f::from_color

    fn Color4f::from_color(color : Color) -> Color4f

    Color4f::from_opaque

    fn Color4f::from_opaque(r : Float, g : Float, b : Float) -> Color4f

    Color4f::new

    fn Color4f::new(r : Float, g : Float, b : Float, a : Float) -> Color4f

    Color4f::not_equal

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

    Color4f::scale

    fn Color4f::scale(self : Color4f, scale : Float) -> Color4f

    Color4f::to_repr

    Color4f::transparent

    fn Color4f::transparent() -> Color4f

    Color4f::with_alpha

    fn Color4f::with_alpha(self : Color4f, alpha : Float) -> Color4f

    ColorFilterDescriptor

    pub(all) enum ColorFilterDescriptor {
    ColorMatrixFilter(Array[Float])
    SaturationFilter(Float)
    BrightnessFilter(Float)
    ContrastFilter(Float)
    } derive(Eq,
    Debug
    )

    Portable color-filter recipes that mirror the native filter constructors.

    ColorFilterDescriptor::brightness

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

    ColorFilterDescriptor::contrast

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

    ColorFilterDescriptor::equal

    ColorFilterDescriptor::is_valid

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

    ColorFilterDescriptor::matrix

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

    ColorFilterDescriptor::not_equal

    ColorFilterDescriptor::resource_descriptor

    fn ColorFilterDescriptor::resource_descriptor(self : ColorFilterDescriptor, byte_size? : Int64) -> RendererResourceDescriptor

    ColorFilterDescriptor::resource_key

    ColorFilterDescriptor::saturation

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

    ColorInfo

    pub(all) struct ColorInfo {
    color_type : ColorType
    alpha_type : AlphaType
    } derive(Eq,
    Debug
    )

    Color storage metadata without a concrete color space handle.

    The native layer will attach real Skia ColorSpace handles; this value layer keeps the stable pieces needed by surfaces, pixmaps, and images.

    ColorInfo::bytes_per_pixel

    fn ColorInfo::bytes_per_pixel(self : ColorInfo) -> Int

    ColorInfo::default

    fn ColorInfo::default() -> ColorInfo

    ColorInfo::equal

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

    ColorInfo::is_opaque

    fn ColorInfo::is_opaque(self : ColorInfo) -> Bool

    ColorInfo::new

    fn ColorInfo::new(color_type? : ColorType, alpha_type? : AlphaType) -> ColorInfo

    ColorInfo::not_equal

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

    ColorInfo::shift_per_pixel

    fn ColorInfo::shift_per_pixel(self : ColorInfo) -> Int

    ColorInfo::with_alpha_type

    fn ColorInfo::with_alpha_type(self : ColorInfo, alpha_type : AlphaType) -> ColorInfo

    ColorInfo::with_color_type

    fn ColorInfo::with_color_type(self : ColorInfo, color_type : ColorType) -> ColorInfo

    ColorType

    pub(all) enum ColorType {
    Unknown
    Alpha8
    RGB565
    ARGB4444
    RGBA8888
    RGB888x
    BGRA8888
    RGBA1010102
    RGB101010x
    Gray8
    RGBAF16
    RGBAF32
    } derive(Eq,
    Debug
    )

    Pixel storage formats common in Skia surfaces and images.

    ColorType::bytes_per_pixel

    fn ColorType::bytes_per_pixel(self : ColorType) -> Int

    ColorType::default

    fn ColorType::default() -> ColorType

    ColorType::equal

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

    ColorType::is_always_opaque

    fn ColorType::is_always_opaque(self : ColorType) -> Bool

    ColorType::not_equal

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

    ColorType::shift_per_pixel

    fn ColorType::shift_per_pixel(self : ColorType) -> Int

    CubicResampler

    pub(all) struct CubicResampler {
    b : Float
    c : Float
    } derive(Eq,
    Debug
    )

    Cubic resampler coefficients for high-quality image scaling.

    CubicResampler::catmull_rom

    fn CubicResampler::catmull_rom() -> CubicResampler

    Catmull-Rom cubic resampler.

    CubicResampler::equal

    CubicResampler::mitchell

    fn CubicResampler::mitchell() -> CubicResampler

    Mitchell-Netravali cubic resampler.

    CubicResampler::new

    fn CubicResampler::new(b : Float, c : Float) -> CubicResampler

    CubicResampler::not_equal

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

    EncodedImageFormat

    pub(all) enum EncodedImageFormat {
    BMP
    GIF
    ICO
    JPEG
    PNG
    WBMP
    WEBP
    PKM
    KTX
    ASTC
    DNG
    HEIF
    AVIF
    JPEGXL
    } derive(Eq,
    Debug
    )

    Encoded image container formats accepted by Skia encoders.

    EncodedImageFormat::default

    EncodedImageFormat::equal

    EncodedImageFormat::from_skia_ordinal

    fn EncodedImageFormat::from_skia_ordinal(ordinal : Int) -> EncodedImageFormat?

    EncodedImageFormat::not_equal

    EncodedImageFormat::to_skia_ordinal

    fn EncodedImageFormat::to_skia_ordinal(self : EncodedImageFormat) -> Int

    FilterMode

    pub(all) enum FilterMode {
    Nearest
    Linear
    } derive(Eq,
    Debug
    )

    Pixel reconstruction filter used when images are sampled.

    FilterMode::default

    fn FilterMode::default() -> FilterMode

    FilterMode::equal

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

    FilterMode::not_equal

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

    FilterMode::to_skia_ordinal

    fn FilterMode::to_skia_ordinal(self : FilterMode) -> Int

    FontDescriptor

    pub(all) struct FontDescriptor {
    typeface_key : RendererResourceKey
    size : Float
    scale_x : Float
    skew_x : Float
    } derive(Eq,
    Debug
    )

    Value-layer description of a native font handle derived from a typeface.

    FontDescriptor::default

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

    FontDescriptor::equal

    FontDescriptor::from_typeface

    fn FontDescriptor::from_typeface(typeface_key : RendererResourceKey, size? : Float) -> FontDescriptor

    FontDescriptor::is_valid

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

    FontDescriptor::new

    fn FontDescriptor::new(typeface_key? : RendererResourceKey, size? : Float, scale_x? : Float, skew_x? : Float) -> FontDescriptor

    FontDescriptor::not_equal

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

    FontDescriptor::resource_descriptor

    fn FontDescriptor::resource_descriptor(self : FontDescriptor, byte_size? : Int64) -> RendererResourceDescriptor

    FontDescriptor::resource_key

    FontDescriptor::with_scale_x

    fn FontDescriptor::with_scale_x(self : FontDescriptor, scale_x : Float) -> FontDescriptor

    FontDescriptor::with_size

    fn FontDescriptor::with_size(self : FontDescriptor, size : Float) -> FontDescriptor

    FontDescriptor::with_skew_x

    fn FontDescriptor::with_skew_x(self : FontDescriptor, skew_x : Float) -> FontDescriptor

    FontDescriptor::with_typeface_key

    fn FontDescriptor::with_typeface_key(self : FontDescriptor, typeface_key : RendererResourceKey) -> FontDescriptor

    FontFallbackChain

    pub(all) struct FontFallbackChain {
    primary_family : Bytes
    fallback_families : Array[Bytes]
    } derive(Eq,
    Debug
    )

    Ordered family list used before asking a native font manager for fallback.

    FontFallbackChain::contains_family

    fn FontFallbackChain::contains_family(self : FontFallbackChain, family : Bytes) -> Bool

    FontFallbackChain::equal

    FontFallbackChain::family_at

    fn FontFallbackChain::family_at(self : FontFallbackChain, index : Int) -> Bytes?

    FontFallbackChain::is_empty

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

    FontFallbackChain::length

    fn FontFallbackChain::length(self : FontFallbackChain) -> Int

    FontFallbackChain::new

    fn FontFallbackChain::new(primary_family? : Bytes, fallback_families? : Array[Bytes]) -> FontFallbackChain

    FontFallbackChain::not_equal

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

    FontFallbackChain::with_family

    fn FontFallbackChain::with_family(self : FontFallbackChain, family : Bytes) -> FontFallbackChain

    FontFallbackMatchDescriptor

    pub(all) struct FontFallbackMatchDescriptor {
    request : FontFallbackRequest
    matched_family : Bytes
    fallback_index : Int
    synthetic : Bool
    } derive(Eq,
    Debug
    )

    Value-layer metadata for a native font fallback/typeface match result.

    FontFallbackMatchDescriptor::font_descriptor

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

    Font descriptor derived from a resolved fallback/typeface match.

    FontFallbackMatchDescriptor::is_valid

    FontFallbackMatchDescriptor::matched_in_request

    fn FontFallbackMatchDescriptor::matched_in_request(self : FontFallbackMatchDescriptor) -> Bool

    FontFallbackMatchDescriptor::new

    fn FontFallbackMatchDescriptor::new(request? : FontFallbackRequest, matched_family? : Bytes, fallback_index? : Int, synthetic? : Bool) -> FontFallbackMatchDescriptor

    FontFallbackMatchDescriptor::not_equal

    FontFallbackMatchDescriptor::resource_descriptor

    fn FontFallbackMatchDescriptor::resource_descriptor(self : FontFallbackMatchDescriptor, byte_size? : Int64) -> RendererResourceDescriptor

    Cache descriptor for resolved fallback/typeface match metadata.

    FontFallbackMatchDescriptor::resource_key

    Deterministic renderer cache key for a resolved native fallback match.

    FontFallbackMatchDescriptor::resource_plan

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

    Combined resource plan for retaining a fallback match and derived font.

    FontFallbackMatchDescriptor::source_family

    fn FontFallbackMatchDescriptor::source_family(self : FontFallbackMatchDescriptor) -> Bytes?

    FontFallbackRequest

    pub(all) struct FontFallbackRequest {
    families : FontFallbackChain
    bcp47 : Array[Bytes]
    character : Int
    style : FontStyleRequest
    } derive(Eq,
    Debug
    )

    Font fallback query for one character or run.

    FontFallbackRequest::equal

    FontFallbackRequest::font_descriptor

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

    Font descriptor derived from a native fallback/typeface match result.

    FontFallbackRequest::has_character

    fn FontFallbackRequest::has_character(self : FontFallbackRequest) -> Bool

    FontFallbackRequest::is_empty

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

    FontFallbackRequest::language_at

    fn FontFallbackRequest::language_at(self : FontFallbackRequest, index : Int) -> Bytes?

    FontFallbackRequest::language_count

    fn FontFallbackRequest::language_count(self : FontFallbackRequest) -> Int

    FontFallbackRequest::match_descriptor

    fn FontFallbackRequest::match_descriptor(self : FontFallbackRequest, matched_family : Bytes, fallback_index? : Int, synthetic? : Bool) -> FontFallbackMatchDescriptor

    FontFallbackRequest::new

    fn FontFallbackRequest::new(families? : FontFallbackChain, bcp47? : Array[Bytes], character? : Int, style? : FontStyleRequest) -> FontFallbackRequest

    FontFallbackRequest::not_equal

    FontFallbackRequest::resolution_descriptor

    fn FontFallbackRequest::resolution_descriptor(self : FontFallbackRequest, matched_family : Bytes, fallback_index? : Int, synthetic? : Bool) -> FontFallbackResolutionDescriptor

    FontFallbackRequest::resource_descriptor

    fn FontFallbackRequest::resource_descriptor(self : FontFallbackRequest, byte_size? : Int64) -> RendererResourceDescriptor

    Cache descriptor for a native font fallback/typeface match result.

    FontFallbackRequest::resource_key

    Deterministic renderer cache key for native font fallback/typeface matching.

    FontFallbackRequest::resource_plan

    fn FontFallbackRequest::resource_plan(self : FontFallbackRequest, size? : Float, scale_x? : Float, skew_x? : Float, fallback_byte_size? : Int64, font_byte_size? : Int64) -> RendererResourcePlan

    Combined resource plan for matching a fallback typeface and creating a font.

    FontFallbackRequest::with_character

    fn FontFallbackRequest::with_character(self : FontFallbackRequest, character : Int) -> FontFallbackRequest

    FontFallbackRequest::with_style

    FontFallbackResolutionDescriptor

    pub(all) struct FontFallbackResolutionDescriptor {
    request : FontFallbackRequest
    resolved_match : FontFallbackMatchDescriptor
    } derive(Eq,
    Debug
    )

    Value-layer metadata for a completed font fallback resolution.

    FontFallbackResolutionDescriptor::font_descriptor

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

    FontFallbackResolutionDescriptor::is_valid

    FontFallbackResolutionDescriptor::matched_in_request

    FontFallbackResolutionDescriptor::new

    FontFallbackResolutionDescriptor::not_equal

    FontFallbackResolutionDescriptor::resource_descriptor

    FontFallbackResolutionDescriptor::resource_key

    FontFallbackResolutionDescriptor::resource_plan

    fn FontFallbackResolutionDescriptor::resource_plan(self : FontFallbackResolutionDescriptor, 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

    FontFallbackResolutionDescriptor::source_family

    FontStyleRequest

    pub(all) struct FontStyleRequest {
    weight : Int
    width : Int
    slant : Int
    } derive(Eq,
    Debug
    )

    Skia-style font style request shared by native typeface matching and fallback.

    FontStyleRequest::bold

    FontStyleRequest::default

    FontStyleRequest::equal

    FontStyleRequest::is_bold

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

    FontStyleRequest::is_italic

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

    FontStyleRequest::italic

    FontStyleRequest::new

    fn FontStyleRequest::new(weight? : Int, width? : Int, slant? : Int) -> FontStyleRequest

    FontStyleRequest::normal

    FontStyleRequest::not_equal

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

    GpuContextBackend

    pub(all) enum GpuContextBackend {
    MockGpuContext
    MetalGpuContext
    VulkanGpuContext
    Direct3D12GpuContext
    OpenGLGpuContext
    } derive(Eq,
    Debug
    )

    Future GPU context families that can back a GPU surface target.

    GpuContextBackend::default

    GpuContextBackend::equal

    GpuContextBackend::is_mock

    fn GpuContextBackend::is_mock(self : GpuContextBackend) -> Bool

    GpuContextBackend::is_native_window_backend

    fn GpuContextBackend::is_native_window_backend(self : GpuContextBackend) -> Bool

    GpuContextBackend::not_equal

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

    GpuContextDescriptor

    pub(all) struct GpuContextDescriptor {
    backend : GpuContextBackend
    id : Bytes
    adapter_id : Bytes
    device_id : Bytes
    queue_family_index : Int
    protected_context : Bool
    } derive(Eq,
    Debug
    )

    Stable identity for a GPU context or device queue a future native backend can use when creating GPU-backed surfaces.

    GpuContextDescriptor::direct3d12

    fn GpuContextDescriptor::direct3d12(id : Bytes, adapter_id? : Bytes, device_id? : Bytes) -> GpuContextDescriptor

    GpuContextDescriptor::equal

    GpuContextDescriptor::is_anonymous

    fn GpuContextDescriptor::is_anonymous(self : GpuContextDescriptor) -> Bool

    GpuContextDescriptor::metal

    fn GpuContextDescriptor::metal(id : Bytes, adapter_id? : Bytes, device_id? : Bytes) -> GpuContextDescriptor

    GpuContextDescriptor::mock

    GpuContextDescriptor::new

    fn GpuContextDescriptor::new(backend? : GpuContextBackend, id? : Bytes, adapter_id? : Bytes, device_id? : Bytes, queue_family_index? : Int, protected_context? : Bool) -> GpuContextDescriptor

    GpuContextDescriptor::not_equal

    GpuContextDescriptor::opengl

    fn GpuContextDescriptor::opengl(id : Bytes, adapter_id? : Bytes, device_id? : Bytes) -> GpuContextDescriptor

    GpuContextDescriptor::resource_descriptor

    fn GpuContextDescriptor::resource_descriptor(self : GpuContextDescriptor, byte_size? : Int64) -> RendererResourceDescriptor

    GpuContextDescriptor::resource_key

    GpuContextDescriptor::vulkan

    fn GpuContextDescriptor::vulkan(id : Bytes, adapter_id? : Bytes, device_id? : Bytes, queue_family_index? : Int) -> GpuContextDescriptor

    GpuContextDescriptor::with_protected_context

    fn GpuContextDescriptor::with_protected_context(self : GpuContextDescriptor, protected_context : Bool) -> GpuContextDescriptor

    IPoint

    pub(all) struct IPoint {
    x : Int
    y : Int
    } derive(Eq,
    Debug
    )

    Integer point or vector.
    impl Default for IPoint

    IPoint::default

    fn IPoint::default() -> IPoint

    IPoint::equal

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

    IPoint::equals

    fn IPoint::equals(self : IPoint, x : Int, y : Int) -> Bool

    IPoint::is_zero

    fn IPoint::is_zero(self : IPoint) -> Bool

    IPoint::new

    fn IPoint::new(x : Int, y : Int) -> IPoint

    IPoint::not_equal

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

    IPoint::offset

    fn IPoint::offset(self : IPoint, dx : Int, dy : Int) -> IPoint

    IPoint::to_point

    fn IPoint::to_point(self : IPoint) -> Point

    IPoint::to_repr

    IPoint::zero

    fn IPoint::zero() -> IPoint

    IRect

    pub(all) struct IRect {
    left : Int
    top : Int
    right : Int
    bottom : Int
    } derive(Eq,
    Debug
    )

    Integer rectangle stored as left/top/right/bottom bounds.
    impl Default for IRect

    IRect::bottom

    fn IRect::bottom(self : IRect) -> Int

    IRect::contains_point

    fn IRect::contains_point(self : IRect, point : IPoint) -> Bool

    IRect::contains_rect

    fn IRect::contains_rect(self : IRect, other : IRect) -> Bool

    IRect::default

    fn IRect::default() -> IRect

    IRect::empty

    fn IRect::empty() -> IRect

    IRect::equal

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

    IRect::from_ltrb

    fn IRect::from_ltrb(left : Int, top : Int, right : Int, bottom : Int) -> IRect

    IRect::from_point_and_size

    fn IRect::from_point_and_size(point : IPoint, size : ISize) -> IRect

    IRect::from_size

    fn IRect::from_size(size : ISize) -> IRect

    IRect::from_wh

    fn IRect::from_wh(width : Int, height : Int) -> IRect

    IRect::from_xywh

    fn IRect::from_xywh(x : Int, y : Int, width : Int, height : Int) -> IRect

    IRect::height

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

    IRect::height_64

    fn IRect::height_64(self : IRect) -> Int64

    IRect::inset

    fn IRect::inset(self : IRect, dx : Int, dy : Int) -> IRect

    IRect::intersect

    fn IRect::intersect(self : IRect, other : IRect) -> IRect?

    IRect::intersects

    fn IRect::intersects(self : IRect, other : IRect) -> Bool

    IRect::is_empty

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

    IRect::is_empty_64

    fn IRect::is_empty_64(self : IRect) -> Bool

    IRect::is_sorted

    fn IRect::is_sorted(self : IRect) -> Bool

    IRect::join

    fn IRect::join(self : IRect, other : IRect) -> IRect

    IRect::left

    fn IRect::left(self : IRect) -> Int

    IRect::new

    fn IRect::new(left : Int, top : Int, right : Int, bottom : Int) -> IRect

    IRect::not_equal

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

    IRect::offset

    fn IRect::offset(self : IRect, dx : Int, dy : Int) -> IRect

    IRect::outset

    fn IRect::outset(self : IRect, dx : Int, dy : Int) -> IRect

    IRect::right

    fn IRect::right(self : IRect) -> Int

    IRect::size

    fn IRect::size(self : IRect) -> ISize

    IRect::sorted

    fn IRect::sorted(self : IRect) -> IRect

    IRect::to_rect

    fn IRect::to_rect(self : IRect) -> Rect

    IRect::to_repr

    IRect::top

    fn IRect::top(self : IRect) -> Int

    IRect::width

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

    IRect::width_64

    fn IRect::width_64(self : IRect) -> Int64

    IRect::with_adjustment

    fn IRect::with_adjustment(self : IRect, delta_left : Int, delta_top : Int, delta_right : Int, delta_bottom : Int) -> IRect

    IRect::with_inset

    fn IRect::with_inset(self : IRect, inset : ISize) -> IRect

    IRect::with_offset

    fn IRect::with_offset(self : IRect, offset : IPoint) -> IRect

    IRect::with_offset_to

    fn IRect::with_offset_to(self : IRect, point : IPoint) -> IRect

    IRect::with_outset

    fn IRect::with_outset(self : IRect, outset : ISize) -> IRect

    IRect::x

    fn IRect::x(self : IRect) -> Int

    IRect::y

    fn IRect::y(self : IRect) -> Int

    ISize

    pub(all) struct ISize {
    width : Int
    height : Int
    } derive(Eq,
    Debug
    )

    Integer width and height.
    impl Default for ISize

    ISize::area

    fn ISize::area(self : ISize) -> Int64

    ISize::default

    fn ISize::default() -> ISize

    ISize::empty

    fn ISize::empty() -> ISize

    ISize::equal

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

    ISize::is_empty

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

    ISize::is_zero

    fn ISize::is_zero(self : ISize) -> Bool

    ISize::new

    fn ISize::new(width : Int, height : Int) -> ISize

    ISize::not_equal

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

    ISize::to_repr

    ISize::to_size

    fn ISize::to_size(self : ISize) -> Size

    ImageDescriptor

    pub(all) enum ImageDescriptor {
    EncodedImage(Bytes, EncodedImageFormat?, ISize?)
    } derive(Eq,
    Debug
    )

    Portable image recipes that can be planned before native Skia images are decoded or uploaded.

    ImageDescriptor::byte_size

    fn ImageDescriptor::byte_size(self : ImageDescriptor) -> Int64

    ImageDescriptor::dimensions

    fn ImageDescriptor::dimensions(self : ImageDescriptor) -> ISize?

    ImageDescriptor::encoded

    fn ImageDescriptor::encoded(bytes : Bytes, format? : EncodedImageFormat?, dimensions? : ISize?) -> ImageDescriptor?

    ImageDescriptor::encoded_bytes

    fn ImageDescriptor::encoded_bytes(self : ImageDescriptor) -> Bytes

    ImageDescriptor::equal

    ImageDescriptor::not_equal

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

    ImageDescriptor::resource_descriptor

    fn ImageDescriptor::resource_descriptor(self : ImageDescriptor, byte_size? : Int64) -> RendererResourceDescriptor

    ImageDescriptor::resource_key

    ImageFilterDescriptor

    pub(all) enum ImageFilterDescriptor {
    BlurImageFilter(Float, Float)
    } derive(Eq,
    Debug
    )

    Portable image-filter recipes that can be mapped to native Skia filters.

    ImageFilterDescriptor::blur

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

    ImageFilterDescriptor::equal

    ImageFilterDescriptor::is_valid

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

    ImageFilterDescriptor::not_equal

    ImageFilterDescriptor::resource_descriptor

    fn ImageFilterDescriptor::resource_descriptor(self : ImageFilterDescriptor, byte_size? : Int64) -> RendererResourceDescriptor

    ImageFilterDescriptor::resource_key

    ImageInfo

    pub(all) struct ImageInfo {
    dimensions : ISize
    color_info : ColorInfo
    } derive(Eq,
    Debug
    )

    Dimensions plus color metadata for images, bitmaps, pixmaps, and surfaces.

    ImageInfo::a8

    fn ImageInfo::a8(dimensions : ISize) -> ImageInfo

    ImageInfo::alpha_type

    fn ImageInfo::alpha_type(self : ImageInfo) -> AlphaType

    ImageInfo::bounds

    fn ImageInfo::bounds(self : ImageInfo) -> IRect

    ImageInfo::bytes_per_pixel

    fn ImageInfo::bytes_per_pixel(self : ImageInfo) -> Int

    ImageInfo::color_type

    fn ImageInfo::color_type(self : ImageInfo) -> ColorType

    ImageInfo::compute_byte_size

    fn ImageInfo::compute_byte_size(self : ImageInfo, row_bytes : Int) -> Int

    ImageInfo::compute_byte_size64

    fn ImageInfo::compute_byte_size64(self : ImageInfo, row_bytes : Int) -> Int64

    ImageInfo::compute_min_byte_size

    fn ImageInfo::compute_min_byte_size(self : ImageInfo) -> Int

    ImageInfo::compute_min_byte_size64

    fn ImageInfo::compute_min_byte_size64(self : ImageInfo) -> Int64

    ImageInfo::compute_offset

    fn ImageInfo::compute_offset(self : ImageInfo, point : IPoint, row_bytes : Int) -> Int

    ImageInfo::default

    fn ImageInfo::default() -> ImageInfo

    ImageInfo::equal

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

    ImageInfo::from_color_info

    fn ImageInfo::from_color_info(dimensions : ISize, color_info : ColorInfo) -> ImageInfo

    ImageInfo::height

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

    ImageInfo::is_empty

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

    ImageInfo::is_opaque

    fn ImageInfo::is_opaque(self : ImageInfo) -> Bool

    ImageInfo::min_row_bytes

    fn ImageInfo::min_row_bytes(self : ImageInfo) -> Int

    ImageInfo::min_row_bytes64

    fn ImageInfo::min_row_bytes64(self : ImageInfo) -> Int64

    ImageInfo::n32_premul

    fn ImageInfo::n32_premul(dimensions : ISize) -> ImageInfo

    ImageInfo::new

    fn ImageInfo::new(dimensions : ISize, color_type? : ColorType, alpha_type? : AlphaType) -> ImageInfo

    ImageInfo::not_equal

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

    ImageInfo::shift_per_pixel

    fn ImageInfo::shift_per_pixel(self : ImageInfo) -> Int

    ImageInfo::unknown

    fn ImageInfo::unknown(dimensions? : ISize) -> ImageInfo

    ImageInfo::valid_pixels

    fn ImageInfo::valid_pixels(self : ImageInfo, row_bytes : Int) -> Bool

    ImageInfo::valid_row_bytes

    fn ImageInfo::valid_row_bytes(self : ImageInfo, row_bytes : Int) -> Bool

    ImageInfo::width

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

    ImageInfo::with_alpha_type

    fn ImageInfo::with_alpha_type(self : ImageInfo, alpha_type : AlphaType) -> ImageInfo

    ImageInfo::with_color_type

    fn ImageInfo::with_color_type(self : ImageInfo, color_type : ColorType) -> ImageInfo

    ImageInfo::with_dimensions

    fn ImageInfo::with_dimensions(self : ImageInfo, dimensions : ISize) -> ImageInfo

    MaskFilterDescriptor

    pub(all) enum MaskFilterDescriptor {
    BlurMaskFilter(Float)
    } derive(Eq,
    Debug
    )

    Portable mask-filter recipes that can be mapped to native Skia filters.

    MaskFilterDescriptor::blur

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

    MaskFilterDescriptor::equal

    MaskFilterDescriptor::is_valid

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

    MaskFilterDescriptor::not_equal

    MaskFilterDescriptor::resource_descriptor

    fn MaskFilterDescriptor::resource_descriptor(self : MaskFilterDescriptor, byte_size? : Int64) -> RendererResourceDescriptor

    MaskFilterDescriptor::resource_key

    Matrix

    pub(all) struct Matrix {
    scale_x : Float
    skew_x : Float
    trans_x : Float
    skew_y : Float
    scale_y : Float
    trans_y : Float
    persp_0 : Float
    persp_1 : Float
    persp_2 : Float
    } derive(Eq,
    Debug
    )

    Row-major 3x3 transform matrix matching Skia's public member layout.
    impl Default for Matrix

    Matrix::concat

    fn Matrix::concat(self : Matrix, other : Matrix) -> Matrix

    Matrix::default

    fn Matrix::default() -> Matrix

    Matrix::determinant

    fn Matrix::determinant(self : Matrix) -> Float

    Matrix::equal

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

    Matrix::from_affine

    fn Matrix::from_affine(values : Array[Float]) -> Matrix?

    Matrix::get

    fn Matrix::get(self : Matrix, field : MatrixMember) -> Float

    Matrix::has_perspective

    fn Matrix::has_perspective(self : Matrix) -> Bool

    Matrix::identity

    fn Matrix::identity() -> Matrix

    Matrix::invert

    fn Matrix::invert(self : Matrix) -> Matrix?

    Matrix::is_finite

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

    Matrix::is_identity

    fn Matrix::is_identity(self : Matrix) -> Bool

    Matrix::is_invertible

    fn Matrix::is_invertible(self : Matrix) -> Bool

    Matrix::is_scale_translate

    fn Matrix::is_scale_translate(self : Matrix) -> Bool

    Matrix::is_translate

    fn Matrix::is_translate(self : Matrix) -> Bool

    Matrix::map_origin

    fn Matrix::map_origin(self : Matrix) -> Point

    Matrix::map_point

    fn Matrix::map_point(self : Matrix, point : Point) -> Point

    Matrix::map_point_affine

    fn Matrix::map_point_affine(self : Matrix, point : Point) -> Point?

    Matrix::map_points

    fn Matrix::map_points(self : Matrix, points : Array[Point]) -> Array[Point]

    Matrix::map_radius

    fn Matrix::map_radius(self : Matrix, radius : Float) -> Float?

    Matrix::map_rect

    fn Matrix::map_rect(self : Matrix, rect : Rect) -> Rect

    Matrix::map_rect_scale_translate

    fn Matrix::map_rect_scale_translate(self : Matrix, rect : Rect) -> Rect?

    Matrix::map_rect_to_quad

    fn Matrix::map_rect_to_quad(self : Matrix, rect : Rect) -> Array[Point]

    Matrix::map_vector

    fn Matrix::map_vector(self : Matrix, vector : Point) -> Point

    Matrix::map_vectors

    fn Matrix::map_vectors(self : Matrix, vectors : Array[Point]) -> Array[Point]

    Matrix::map_xy

    fn Matrix::map_xy(self : Matrix, x : Float, y : Float) -> Point

    Matrix::new_all

    fn Matrix::new_all(scale_x : Float, skew_x : Float, trans_x : Float, skew_y : Float, scale_y : Float, trans_y : Float, persp_0 : Float, persp_1 : Float, persp_2 : Float) -> Matrix

    Matrix::not_equal

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

    Matrix::persp_x

    fn Matrix::persp_x(self : Matrix) -> Float

    Matrix::persp_y

    fn Matrix::persp_y(self : Matrix) -> Float

    Matrix::post_concat

    fn Matrix::post_concat(self : Matrix, other : Matrix) -> Matrix

    Matrix::post_rotate_degrees

    fn Matrix::post_rotate_degrees(self : Matrix, degrees : Float) -> Matrix

    Matrix::post_scale

    fn Matrix::post_scale(self : Matrix, sx : Float, sy : Float) -> Matrix

    Matrix::post_skew

    fn Matrix::post_skew(self : Matrix, kx : Float, ky : Float) -> Matrix

    Matrix::post_translate

    fn Matrix::post_translate(self : Matrix, dx : Float, dy : Float) -> Matrix

    Matrix::pre_concat

    fn Matrix::pre_concat(self : Matrix, other : Matrix) -> Matrix

    Matrix::pre_rotate_degrees

    fn Matrix::pre_rotate_degrees(self : Matrix, degrees : Float) -> Matrix

    Matrix::pre_scale

    fn Matrix::pre_scale(self : Matrix, sx : Float, sy : Float) -> Matrix

    Matrix::pre_skew

    fn Matrix::pre_skew(self : Matrix, kx : Float, ky : Float) -> Matrix

    Matrix::pre_translate

    fn Matrix::pre_translate(self : Matrix, dx : Float, dy : Float) -> Matrix

    Matrix::rotate_degrees

    fn Matrix::rotate_degrees(degrees : Float) -> Matrix

    Matrix::scale

    fn Matrix::scale(sx : Float, sy : Float) -> Matrix

    Matrix::scale_translate

    fn Matrix::scale_translate(sx : Float, sy : Float, tx : Float, ty : Float) -> Matrix

    Matrix::scale_x

    fn Matrix::scale_x(self : Matrix) -> Float

    Matrix::scale_y

    fn Matrix::scale_y(self : Matrix) -> Float

    Matrix::skew

    fn Matrix::skew(kx : Float, ky : Float) -> Matrix

    Matrix::skew_x

    fn Matrix::skew_x(self : Matrix) -> Float

    Matrix::skew_y

    fn Matrix::skew_y(self : Matrix) -> Float

    Matrix::to_affine

    fn Matrix::to_affine(self : Matrix) -> Array[Float]?

    Matrix::to_repr

    Matrix::translate

    fn Matrix::translate(dx : Float, dy : Float) -> Matrix

    Matrix::translate_x

    fn Matrix::translate_x(self : Matrix) -> Float

    Matrix::translate_y

    fn Matrix::translate_y(self : Matrix) -> Float

    Matrix::values

    fn Matrix::values(self : Matrix) -> Array[Float]

    MatrixMember

    pub(all) enum MatrixMember {
    ScaleX
    SkewX
    TransX
    SkewY
    ScaleY
    TransY
    Persp0
    Persp1
    Persp2
    } derive(Eq,
    Debug
    )

    Member positions in a 3x3 Skia matrix.

    MatrixMember::equal

    MatrixMember::not_equal

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

    MeasuredTextRunDescriptor

    pub(all) struct MeasuredTextRunDescriptor {
    measurement : TextMeasurementDescriptor
    advance : Float
    bounds : Rect?
    } derive(Eq,
    Debug
    )

    Value-layer metadata for a native text measurement result.

    MeasuredTextRunDescriptor::equal

    MeasuredTextRunDescriptor::has_bounds

    MeasuredTextRunDescriptor::is_valid

    MeasuredTextRunDescriptor::new

    fn MeasuredTextRunDescriptor::new(measurement? : TextMeasurementDescriptor, advance? : Float, bounds? : Rect?) -> MeasuredTextRunDescriptor

    MeasuredTextRunDescriptor::not_equal

    MeasuredTextRunDescriptor::resource_descriptor

    fn MeasuredTextRunDescriptor::resource_descriptor(self : MeasuredTextRunDescriptor, text : Bytes, byte_size? : Int64) -> RendererResourceDescriptor

    MeasuredTextRunDescriptor::resource_key

    MeasuredTextRunDescriptor::resource_plan

    fn MeasuredTextRunDescriptor::resource_plan(self : MeasuredTextRunDescriptor, text : Bytes, measured_byte_size? : Int64, measurement_byte_size? : Int64, text_byte_size? : Int64, font_byte_size? : Int64, fallback_byte_size? : Int64) -> RendererResourcePlan

    MipmapMode

    pub(all) enum MipmapMode {
    None
    Nearest
    Linear
    } derive(Eq,
    Debug
    )

    Mipmap sampling mode used together with FilterMode.

    MipmapMode::default

    fn MipmapMode::default() -> MipmapMode

    MipmapMode::equal

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

    MipmapMode::not_equal

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

    MipmapMode::to_skia_ordinal

    fn MipmapMode::to_skia_ordinal(self : MipmapMode) -> Int

    Paint

    pub(all) struct Paint {
    color : Color
    anti_alias : Bool
    dither : Bool
    style : PaintStyle
    stroke_width : Float
    stroke_miter : Float
    stroke_cap : StrokeCap
    stroke_join : StrokeJoin
    blend_mode : BlendMode
    } derive(Eq,
    Debug
    )

    Value-layer paint state modeled after skia_safe::Paint.

    Native Skia paints will use a separate handle type once the C++ FFI layer is wired to real Skia binaries.
    impl Default for Paint

    Paint::alpha

    fn Paint::alpha(self : Paint) -> Byte

    Paint::blend_mode_ordinal

    fn Paint::blend_mode_ordinal(self : Paint) -> Int

    Paint::color_argb

    fn Paint::color_argb(self : Paint) -> UInt

    Paint::default

    fn Paint::default() -> Paint

    Paint::equal

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

    Paint::new

    fn Paint::new(color? : Color, anti_alias? : Bool, dither? : Bool, style? : PaintStyle, stroke_width? : Float, stroke_miter? : Float, stroke_cap? : StrokeCap, stroke_join? : StrokeJoin, blend_mode? : BlendMode) -> Paint

    Paint::not_equal

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

    Paint::reset

    fn Paint::reset(self : Paint) -> Paint

    Paint::set_alpha

    fn Paint::set_alpha(self : Paint, alpha : Byte) -> Paint

    Paint::set_anti_alias

    fn Paint::set_anti_alias(self : Paint, anti_alias : Bool) -> Paint

    Paint::set_argb

    fn Paint::set_argb(self : Paint, a : Byte, r : Byte, g : Byte, b : Byte) -> Paint

    Paint::set_blend_mode

    fn Paint::set_blend_mode(self : Paint, blend_mode : BlendMode) -> Paint

    Paint::set_color

    fn Paint::set_color(self : Paint, color : Color) -> Paint

    Paint::set_dither

    fn Paint::set_dither(self : Paint, dither : Bool) -> Paint

    Paint::set_stroke

    fn Paint::set_stroke(self : Paint, stroke : Bool) -> Paint

    Paint::set_stroke_cap

    fn Paint::set_stroke_cap(self : Paint, stroke_cap : StrokeCap) -> Paint

    Paint::set_stroke_join

    fn Paint::set_stroke_join(self : Paint, stroke_join : StrokeJoin) -> Paint

    Paint::set_stroke_miter

    fn Paint::set_stroke_miter(self : Paint, stroke_miter : Float) -> Paint

    Paint::set_stroke_width

    fn Paint::set_stroke_width(self : Paint, stroke_width : Float) -> Paint

    Paint::set_style

    fn Paint::set_style(self : Paint, style : PaintStyle) -> Paint

    Paint::stroke_cap_ordinal

    fn Paint::stroke_cap_ordinal(self : Paint) -> Int

    Paint::stroke_join_ordinal

    fn Paint::stroke_join_ordinal(self : Paint) -> Int

    Paint::style_ordinal

    fn Paint::style_ordinal(self : Paint) -> Int

    Paint::to_repr

    PaintStyle

    pub(all) enum PaintStyle {
    Fill
    Stroke
    StrokeAndFill
    } derive(Eq,
    Debug
    )

    How paint geometry is rasterized.

    PaintStyle::default

    fn PaintStyle::default() -> PaintStyle

    PaintStyle::equal

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

    PaintStyle::not_equal

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

    PaintStyle::to_skia_ordinal

    fn PaintStyle::to_skia_ordinal(self : PaintStyle) -> Int

    Path

    pub(all) struct Path {
    fill_type : PathFillType
    verbs : Array[PathVerb]
    current_point : Point?
    } derive(Eq,
    Debug
    )

    Cross-platform path value.

    The native package owns real SkPath handles. This value layer keeps a portable path command stream that can be built, inspected, and tested on all MoonBit targets before being converted at a native boundary.
    impl Default for Path

    Path::add_circle

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

    Path::add_oval

    fn Path::add_oval(self : Path, oval : Rect, direction? : PathDirection) -> Path

    Path::add_path

    fn Path::add_path(self : Path, path : Path, matrix? : Matrix, mode? : AddPathMode) -> Path

    Path::add_path_matrix

    fn Path::add_path_matrix(self : Path, path : Path, matrix : Matrix, mode? : AddPathMode) -> Path

    Path::add_path_offset

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

    Path::add_poly

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

    Path::add_rect

    fn Path::add_rect(self : Path, rect : Rect, direction? : PathDirection) -> Path

    Path::add_round_rect

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

    Path::add_rrect

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

    Path::bounds

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

    Path::close

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

    Path::compute_tight_bounds

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

    Computes a tighter geometric bound for quadratic, conic, and cubic curves.

    bounds records the path's control-point bounds, matching Skia's cached path bounds. This method mirrors Skia's computeTightBounds distinction by adding only curve extrema that affect the actual drawn curve.

    Path::conic_to

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

    Path::contains

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

    Returns whether point is inside the portable path approximation.

    This value-layer implementation treats line segments exactly and uses curve endpoints for curved verbs. The native package delegates Path::contains to Skia for full curve-aware containment when Skia is linked.

    Path::count_points

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

    Path::count_verbs

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

    Path::cubic_to

    fn Path::cubic_to(self : Path, control0 : Point, control1 : Point, end : Point) -> Path

    Path::default

    fn Path::default() -> Path

    Path::equal

    fn Path::equal(Path, 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

    fn Path::is_line(self : Path) -> PathLine?

    Path::is_oval

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

    Path::is_rect

    fn Path::is_rect(self : Path) -> PathRect?

    Path::last_point

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

    Path::line_to

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

    Path::move_to

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

    Path::new

    fn Path::new(fill_type? : PathFillType) -> Path

    Path::not_equal

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

    Path::offset

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

    Path::quad_to

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

    Path::reset

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

    Path::resource_descriptor

    fn Path::resource_descriptor(self : Path, byte_size? : Int64) -> RendererResourceDescriptor

    Path::resource_key

    fn Path::resource_key(self : Path) -> RendererResourceKey

    Path::rewind

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

    Path::segment_masks

    fn Path::segment_masks(self : Path) -> PathSegmentMask

    Path::stroke_bounds

    fn Path::stroke_bounds(self : Path, paint : Paint) -> Rect?

    Path::to_repr

    Path::transform

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

    Path::verb_count

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

    Path::with_fill_type

    fn Path::with_fill_type(self : Path, fill_type : PathFillType) -> Path

    Path::with_offset

    fn Path::with_offset(self : Path, offset : Point) -> Path

    PathDirection

    pub(all) enum PathDirection {
    CW
    CCW
    } derive(Eq,
    Debug
    )

    Direction used when adding closed contours.

    PathDirection::default

    fn PathDirection::default() -> PathDirection

    PathDirection::equal

    PathDirection::not_equal

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

    PathDirection::to_skia_ordinal

    fn PathDirection::to_skia_ordinal(self : PathDirection) -> Int

    PathFillType

    pub(all) enum PathFillType {
    Winding
    EvenOdd
    InverseWinding
    InverseEvenOdd
    } derive(Eq,
    Debug
    )

    Fill rule used when rasterizing a path.

    PathFillType::default

    fn PathFillType::default() -> PathFillType

    PathFillType::equal

    PathFillType::is_inverse

    fn PathFillType::is_inverse(self : PathFillType) -> Bool

    PathFillType::not_equal

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

    PathFillType::to_skia_ordinal

    fn PathFillType::to_skia_ordinal(self : PathFillType) -> Int

    PathLine

    pub(all) struct PathLine {
    start : Point
    end : Point
    } derive(Eq,
    Debug
    )

    A single line segment recognized from a path.

    PathLine::equal

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

    PathLine::new

    fn PathLine::new(start : Point, end : Point) -> PathLine

    PathLine::not_equal

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

    PathLine::to_repr

    PathRect

    pub(all) struct PathRect {
    rect : Rect
    is_closed : Bool
    direction : PathDirection
    } derive(Eq,
    Debug
    )

    Rectangle recognized from a path, plus Skia's closed and direction metadata.

    PathRect::equal

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

    PathRect::new

    fn PathRect::new(rect : Rect, is_closed : Bool, direction : PathDirection) -> PathRect

    PathRect::not_equal

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

    PathRect::to_repr

    PathSegmentMask

    pub(all) struct PathSegmentMask(Int) derive(Eq,
    Debug
    )

    Bitmask of path segment kinds, matching Skia's public segment-mask values.

    PathSegmentMask::bits

    fn PathSegmentMask::bits(self : PathSegmentMask) -> Int

    PathSegmentMask::conic

    PathSegmentMask::contains

    fn PathSegmentMask::contains(self : PathSegmentMask, other : PathSegmentMask) -> Bool

    PathSegmentMask::cubic

    PathSegmentMask::empty

    PathSegmentMask::equal

    PathSegmentMask::line

    PathSegmentMask::new

    fn PathSegmentMask::new(value : Int) -> PathSegmentMask

    PathSegmentMask::not_equal

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

    PathSegmentMask::quad

    PathVerb

    pub(all) enum PathVerb {
    MoveTo(Point)
    LineTo(Point)
    QuadTo(Point, Point)
    ConicTo(Point, Point, Float)
    CubicTo(Point, Point, Point)
    Close
    } derive(Eq,
    Debug
    )

    Cross-platform path verb data modeled after Skia path commands.

    PathVerb::equal

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

    PathVerb::not_equal

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

    PathVerb::to_repr

    Pixmap

    pub(all) struct Pixmap {
    image_info : ImageInfo
    row_bytes : Int
    pixels : Bytes
    } derive(Eq,
    Debug
    )

    Immutable pixel snapshot plus layout metadata.

    This mirrors the lightweight role of Skia's SkPixmap, but owns the copied bytes on the MoonBit side so it is safe across backend boundaries.

    Pixmap::alpha_type

    fn Pixmap::alpha_type(self : Pixmap) -> AlphaType

    Pixmap::bounds

    fn Pixmap::bounds(self : Pixmap) -> IRect

    Pixmap::byte_size

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

    Pixmap::byte_size64

    fn Pixmap::byte_size64(self : Pixmap) -> Int64

    Pixmap::bytes_per_pixel

    fn Pixmap::bytes_per_pixel(self : Pixmap) -> Int

    Pixmap::color_type

    fn Pixmap::color_type(self : Pixmap) -> ColorType

    Pixmap::contains

    fn Pixmap::contains(self : Pixmap, point : IPoint) -> Bool

    Pixmap::dimensions

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

    Pixmap::equal

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

    Pixmap::height

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

    Pixmap::is_empty

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

    Pixmap::matches_sample

    fn Pixmap::matches_sample(self : Pixmap, point : IPoint, sample : Bytes) -> Bool

    Check that one pixel has exactly the expected stored channel bytes.

    Pixmap::new

    fn Pixmap::new(image_info : ImageInfo, row_bytes : Int, pixels : Bytes) -> Pixmap?

    Pixmap::not_equal

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

    Pixmap::offset

    fn Pixmap::offset(self : Pixmap, point : IPoint) -> Int?

    Pixmap::row_bytes

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

    Pixmap::sample

    fn Pixmap::sample(self : Pixmap, point : IPoint) -> Bytes?

    Copy the stored channel bytes for one pixel.

    Pixmap::shift_per_pixel

    fn Pixmap::shift_per_pixel(self : Pixmap) -> Int

    Pixmap::to_repr

    Pixmap::width

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

    Point

    pub(all) struct Point {
    x : Float
    y : Float
    } derive(Eq,
    Debug
    )

    Floating-point point or vector.
    impl Default for Point

    Point::cross

    fn Point::cross(self : Point, other : Point) -> Float

    Point::default

    fn Point::default() -> Point

    Point::distance_to

    fn Point::distance_to(self : Point, other : Point) -> Float

    Point::distance_to_origin

    fn Point::distance_to_origin(self : Point) -> Float

    Point::distance_to_origin_squared

    fn Point::distance_to_origin_squared(self : Point) -> Float

    Point::distance_to_squared

    fn Point::distance_to_squared(self : Point, other : Point) -> Float

    Point::dot

    fn Point::dot(self : Point, other : Point) -> Float

    Point::equal

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

    Point::equals

    fn Point::equals(self : Point, x : Float, y : Float) -> Bool

    Point::is_finite

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

    Point::is_zero

    fn Point::is_zero(self : Point) -> Bool

    Point::length

    fn Point::length(self : Point) -> Float

    Point::length_squared

    fn Point::length_squared(self : Point) -> Float

    Point::new

    fn Point::new(x : Float, y : Float) -> Point

    Point::normalized

    fn Point::normalized(self : Point) -> Point?

    Point::not_equal

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

    Point::offset

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

    Point::rotate_ccw

    fn Point::rotate_ccw(self : Point) -> Point

    Point::rotate_cw

    fn Point::rotate_cw(self : Point) -> Point

    Point::scale

    fn Point::scale(self : Point, scale : Float) -> Point

    Point::to_ipoint_round

    fn Point::to_ipoint_round(self : Point) -> IPoint

    Point::to_repr

    Point::with_length

    fn Point::with_length(self : Point, length : Float) -> Point?

    Point::zero

    fn Point::zero() -> Point

    PointMode

    pub(all) enum PointMode {
    Points
    Lines
    Polygon
    } derive(Eq,
    Debug
    )

    How Canvas::draw_points interprets a point array.

    PointMode::default

    fn PointMode::default() -> PointMode

    PointMode::equal

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

    PointMode::not_equal

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

    PointMode::to_skia_ordinal

    fn PointMode::to_skia_ordinal(self : PointMode) -> Int

    RRect

    pub(all) struct RRect {
    rect : Rect
    upper_left : Size
    upper_right : Size
    lower_right : Size
    lower_left : Size
    } derive(Eq,
    Debug
    )

    Rounded rectangle bounds plus per-corner x/y radii.

    Corners are stored in Skia order: upper-left, upper-right, lower-right, lower-left.
    impl Default for RRect

    RRect::bounds

    fn RRect::bounds(self : RRect) -> Rect

    RRect::contains_rect

    fn RRect::contains_rect(self : RRect, rect : Rect) -> Bool

    RRect::default

    fn RRect::default() -> RRect

    RRect::empty

    fn RRect::empty() -> RRect

    RRect::equal

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

    RRect::from_oval

    fn RRect::from_oval(oval : Rect) -> RRect

    RRect::from_rect

    fn RRect::from_rect(rect : Rect) -> RRect

    RRect::from_rect_xy

    fn RRect::from_rect_xy(rect : Rect, rx : Float, ry : Float) -> RRect

    RRect::height

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

    RRect::is_empty

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

    RRect::is_oval

    fn RRect::is_oval(self : RRect) -> Bool

    RRect::is_rect

    fn RRect::is_rect(self : RRect) -> Bool

    RRect::is_simple

    fn RRect::is_simple(self : RRect) -> Bool

    RRect::new

    fn RRect::new(rect : Rect, upper_left : Size, upper_right : Size, lower_right : Size, lower_left : Size) -> RRect

    RRect::not_equal

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

    RRect::offset

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

    RRect::to_repr

    RRect::width

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

    RRect::with_inset

    fn RRect::with_inset(self : RRect, inset : Size) -> RRect

    RRect::with_offset

    fn RRect::with_offset(self : RRect, delta : Point) -> RRect

    RRect::with_offset_to

    fn RRect::with_offset_to(self : RRect, point : Point) -> RRect

    RRect::with_outset

    fn RRect::with_outset(self : RRect, outset : Size) -> RRect

    Rect

    pub(all) struct Rect {
    left : Float
    top : Float
    right : Float
    bottom : Float
    } derive(Eq,
    Debug
    )

    Floating-point rectangle stored as left/top/right/bottom bounds.
    impl Default for Rect

    Rect::bl

    fn Rect::bl(self : Rect) -> Point

    Rect::bottom

    fn Rect::bottom(self : Rect) -> Float

    Rect::bottom_left

    fn Rect::bottom_left(self : Rect) -> Point

    Rect::bottom_right

    fn Rect::bottom_right(self : Rect) -> Point

    Rect::br

    fn Rect::br(self : Rect) -> Point

    Rect::center

    fn Rect::center(self : Rect) -> Point

    Rect::center_x

    fn Rect::center_x(self : Rect) -> Float

    Rect::center_y

    fn Rect::center_y(self : Rect) -> Float

    Rect::contains_point

    fn Rect::contains_point(self : Rect, point : Point) -> Bool

    Rect::contains_rect

    fn Rect::contains_rect(self : Rect, other : Rect) -> Bool

    Rect::default

    fn Rect::default() -> Rect

    Rect::empty

    fn Rect::empty() -> Rect

    Rect::equal

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

    Rect::from_irect

    fn Rect::from_irect(rect : IRect) -> Rect

    Rect::from_isize

    fn Rect::from_isize(size : ISize) -> Rect

    Rect::from_iwh

    fn Rect::from_iwh(width : Int, height : Int) -> Rect

    Rect::from_ltrb

    fn Rect::from_ltrb(left : Float, top : Float, right : Float, bottom : Float) -> Rect

    Rect::from_point_and_size

    fn Rect::from_point_and_size(point : Point, size : Size) -> Rect

    Rect::from_points

    fn Rect::from_points(points : Array[Point]) -> Rect?

    Rect::from_points_or_empty

    fn Rect::from_points_or_empty(points : Array[Point]) -> Rect

    Rect::from_size

    fn Rect::from_size(size : Size) -> Rect

    Rect::from_wh

    fn Rect::from_wh(width : Float, height : Float) -> Rect

    Rect::from_xywh

    fn Rect::from_xywh(x : Float, y : Float, width : Float, height : Float) -> Rect

    Rect::height

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

    Rect::inset

    fn Rect::inset(self : Rect, dx : Float, dy : Float) -> Rect

    Rect::intersect

    fn Rect::intersect(self : Rect, other : Rect) -> Rect?

    Rect::intersects

    fn Rect::intersects(self : Rect, other : Rect) -> Bool

    Rect::is_empty

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

    Rect::is_finite

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

    Rect::is_sorted

    fn Rect::is_sorted(self : Rect) -> Bool

    Rect::join

    fn Rect::join(self : Rect, other : Rect) -> Rect

    Rect::left

    fn Rect::left(self : Rect) -> Float

    Rect::new

    fn Rect::new(left : Float, top : Float, right : Float, bottom : Float) -> Rect

    Rect::not_equal

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

    Rect::offset

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

    Rect::outset

    fn Rect::outset(self : Rect, dx : Float, dy : Float) -> Rect

    Rect::right

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

    Rect::round

    fn Rect::round(self : Rect) -> IRect

    Rect::round_in

    fn Rect::round_in(self : Rect) -> IRect

    Rect::round_out

    fn Rect::round_out(self : Rect) -> IRect

    Rect::size

    fn Rect::size(self : Rect) -> Size

    Rect::sorted

    fn Rect::sorted(self : Rect) -> Rect

    Rect::tl

    fn Rect::tl(self : Rect) -> Point

    Rect::to_irect_round

    fn Rect::to_irect_round(self : Rect) -> IRect

    Rect::to_quad

    fn Rect::to_quad(self : Rect, direction? : PathDirection) -> Array[Point]

    Rect::to_repr

    Rect::top

    fn Rect::top(self : Rect) -> Float

    Rect::top_left

    fn Rect::top_left(self : Rect) -> Point

    Rect::top_right

    fn Rect::top_right(self : Rect) -> Point

    Rect::tr

    fn Rect::tr(self : Rect) -> Point

    Rect::width

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

    Rect::with_inset

    fn Rect::with_inset(self : Rect, inset : Size) -> Rect

    Rect::with_offset

    fn Rect::with_offset(self : Rect, offset : Point) -> Rect

    Rect::with_offset_to

    fn Rect::with_offset_to(self : Rect, point : Point) -> Rect

    Rect::with_outset

    fn Rect::with_outset(self : Rect, outset : Size) -> Rect

    Rect::x

    fn Rect::x(self : Rect) -> Float

    Rect::y

    fn Rect::y(self : Rect) -> Float

    RenderCommand

    pub(all) enum RenderCommand {
    SaveCanvas
    RestoreCanvas
    SaveCanvasLayer(Rect?, Paint, ColorFilterDescriptor?, ImageFilterDescriptor?, MaskFilterDescriptor?)
    TranslateCanvas(Point)
    ScaleCanvas(Size)
    RotateCanvas(Float)
    SkewCanvas(Point)
    ConcatCanvas(Matrix)
    ResetCanvasMatrix
    ClearCanvas(Color)
    ClipCanvasRect(Rect, ClipOp)
    ClipCanvasRRect(RRect, ClipOp)
    ClipCanvasPath(Path, ClipOp)
    DrawCanvasColor(Color, BlendMode)
    DrawCanvasPaint(Paint)
    DrawCanvasPaintShader(ShaderDescriptor, Paint)
    DrawCanvasPoint(Point, Paint)
    DrawCanvasLine(Point, Point, Paint)
    DrawCanvasPoints(Array[Point], PointMode, Paint)
    DrawCanvasRect(Rect, Paint)
    DrawCanvasOval(Rect, Paint)
    DrawCanvasCircle(Point, Float, Paint)
    DrawCanvasArc(Rect, Float, Float, Bool, Paint)
    DrawCanvasRoundRect(Rect, Float, Float, Paint)
    DrawCanvasRRect(RRect, Paint)
    DrawCanvasDRRect(RRect, RRect, Paint)
    DrawCanvasRectShader(Rect, ShaderDescriptor, Paint)
    DrawCanvasRoundRectShader(Rect, Float, Float, ShaderDescriptor, Paint)
    DrawCanvasPath(Path, Paint)
    DrawCanvasPathShader(Path, ShaderDescriptor, Paint)
    DrawCanvasImage(ImageDescriptor, Point)
    DrawCanvasImageRect(ImageDescriptor, Rect, Rect, Paint, SamplingOptions)
    DrawCanvasTextUtf8(Bytes, Point, Paint)
    DrawCanvasTextRunUtf8(Bytes, TextRunDescriptor, RendererResourceKey, Point, Paint)
    DrawCanvasShapedGlyphRunUtf8(Bytes, ShapedGlyphRunDescriptor, Point, Paint)
    DeclareRenderResource(RendererResourceDescriptor)
    PresentSurface
    } derive(Eq,
    Debug
    )

    Portable render command recorded before a concrete backend turns it into native Canvas calls.

    RenderCommand::clear

    fn RenderCommand::clear(color : Color) -> RenderCommand

    RenderCommand::clip_path

    fn RenderCommand::clip_path(path : Path, op? : ClipOp) -> RenderCommand

    RenderCommand::clip_rect

    fn RenderCommand::clip_rect(rect : Rect, op? : ClipOp) -> RenderCommand

    RenderCommand::clip_rrect

    fn RenderCommand::clip_rrect(rrect : RRect, op? : ClipOp) -> RenderCommand

    RenderCommand::concat

    fn RenderCommand::concat(matrix : Matrix) -> RenderCommand

    RenderCommand::declare_resource

    fn RenderCommand::declare_resource(descriptor : RendererResourceDescriptor) -> RenderCommand

    RenderCommand::draw_arc

    fn RenderCommand::draw_arc(oval : Rect, start_angle : Float, sweep_angle : Float, use_center : Bool, paint? : Paint) -> RenderCommand

    RenderCommand::draw_circle

    fn RenderCommand::draw_circle(center : Point, radius : Float, paint? : Paint) -> RenderCommand

    RenderCommand::draw_color

    fn RenderCommand::draw_color(color : Color, blend_mode? : BlendMode) -> RenderCommand

    RenderCommand::draw_drrect

    fn RenderCommand::draw_drrect(outer : RRect, inner : RRect, paint? : Paint) -> RenderCommand

    RenderCommand::draw_image

    fn RenderCommand::draw_image(image : ImageDescriptor, top_left : Point) -> RenderCommand

    RenderCommand::draw_image_rect

    fn RenderCommand::draw_image_rect(image : ImageDescriptor, src : Rect, dst : Rect, paint? : Paint, sampling? : SamplingOptions) -> RenderCommand

    RenderCommand::draw_line

    fn RenderCommand::draw_line(start : Point, end : Point, paint? : Paint) -> RenderCommand

    RenderCommand::draw_oval

    fn RenderCommand::draw_oval(oval : Rect, paint? : Paint) -> RenderCommand

    RenderCommand::draw_paint

    fn RenderCommand::draw_paint(paint : Paint) -> RenderCommand

    RenderCommand::draw_paint_shader

    fn RenderCommand::draw_paint_shader(shader : ShaderDescriptor, paint? : Paint) -> RenderCommand

    RenderCommand::draw_path

    fn RenderCommand::draw_path(path : Path, paint? : Paint) -> RenderCommand

    RenderCommand::draw_path_shader

    fn RenderCommand::draw_path_shader(path : Path, shader : ShaderDescriptor, paint? : Paint) -> RenderCommand

    RenderCommand::draw_point

    fn RenderCommand::draw_point(point : Point, paint? : Paint) -> RenderCommand

    RenderCommand::draw_points

    fn RenderCommand::draw_points(points : Array[Point], paint? : Paint, mode? : PointMode) -> RenderCommand

    RenderCommand::draw_rect

    fn RenderCommand::draw_rect(rect : Rect, paint? : Paint) -> RenderCommand

    RenderCommand::draw_rect_shader

    fn RenderCommand::draw_rect_shader(rect : Rect, shader : ShaderDescriptor, paint? : Paint) -> RenderCommand

    RenderCommand::draw_round_rect

    fn RenderCommand::draw_round_rect(rect : Rect, rx : Float, ry : Float, paint? : Paint) -> RenderCommand

    RenderCommand::draw_round_rect_shader

    fn RenderCommand::draw_round_rect_shader(rect : Rect, rx : Float, ry : Float, shader : ShaderDescriptor, paint? : Paint) -> RenderCommand

    RenderCommand::draw_rrect

    fn RenderCommand::draw_rrect(rrect : RRect, paint? : Paint) -> RenderCommand

    RenderCommand::draw_shaped_glyph_run_utf8

    fn RenderCommand::draw_shaped_glyph_run_utf8(text : Bytes, glyph_run : ShapedGlyphRunDescriptor, origin : Point, paint? : Paint) -> RenderCommand

    RenderCommand::draw_text_run_utf8

    fn RenderCommand::draw_text_run_utf8(text : Bytes, origin : Point, descriptor? : TextRunDescriptor?, font_key? : RendererResourceKey, paint? : Paint) -> RenderCommand

    RenderCommand::draw_text_utf8

    fn RenderCommand::draw_text_utf8(text : Bytes, origin : Point, paint? : Paint) -> RenderCommand

    RenderCommand::equal

    RenderCommand::filter_resource_count

    fn RenderCommand::filter_resource_count(self : RenderCommand) -> Int

    RenderCommand::is_clear

    fn RenderCommand::is_clear(self : RenderCommand) -> Bool

    RenderCommand::is_clip

    fn RenderCommand::is_clip(self : RenderCommand) -> Bool

    RenderCommand::is_draw

    fn RenderCommand::is_draw(self : RenderCommand) -> Bool

    RenderCommand::is_present

    fn RenderCommand::is_present(self : RenderCommand) -> Bool

    RenderCommand::is_resource_declaration

    fn RenderCommand::is_resource_declaration(self : RenderCommand) -> Bool

    RenderCommand::is_state

    fn RenderCommand::is_state(self : RenderCommand) -> Bool

    RenderCommand::is_text

    fn RenderCommand::is_text(self : RenderCommand) -> Bool

    RenderCommand::is_transform

    fn RenderCommand::is_transform(self : RenderCommand) -> Bool

    RenderCommand::not_equal

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

    RenderCommand::reset_matrix

    fn RenderCommand::reset_matrix() -> RenderCommand

    RenderCommand::resource_count_for_kind

    fn RenderCommand::resource_count_for_kind(self : RenderCommand, kind : RendererResourceKind) -> Int

    RenderCommand::resource_descriptor

    fn RenderCommand::resource_descriptor(self : RenderCommand) -> RendererResourceDescriptor?

    RenderCommand::resource_descriptors

    fn RenderCommand::resource_descriptors(self : RenderCommand) -> Array[RendererResourceDescriptor]

    RenderCommand::rotate

    fn RenderCommand::rotate(degrees : Float) -> RenderCommand

    RenderCommand::save_layer

    fn RenderCommand::save_layer(bounds? : Rect?, paint? : Paint, color_filter? : ColorFilterDescriptor?, image_filter? : ImageFilterDescriptor?, mask_filter? : MaskFilterDescriptor?) -> RenderCommand

    RenderCommand::scale

    fn RenderCommand::scale(scale : Size) -> RenderCommand

    RenderCommand::skew

    fn RenderCommand::skew(skew : Point) -> RenderCommand

    RenderCommand::text_resource_count

    fn RenderCommand::text_resource_count(self : RenderCommand) -> Int

    RenderCommand::text_run_resource_key

    fn RenderCommand::text_run_resource_key(self : RenderCommand) -> RendererResourceKey?

    RenderCommand::translate

    fn RenderCommand::translate(delta : Point) -> RenderCommand

    RenderCommandList

    pub(all) struct RenderCommandList {
    pass : RenderPassDescriptor
    commands : Array[RenderCommand]
    } derive(Eq,
    Debug
    )

    Command stream for one render pass. This is the value-layer boundary a GUI renderer can build and inspect before handing commands to native Skia.

    RenderCommandList::append

    RenderCommandList::clear

    RenderCommandList::clip_path

    fn RenderCommandList::clip_path(self : RenderCommandList, path : Path, op? : ClipOp) -> RenderCommandList

    RenderCommandList::clip_rect

    fn RenderCommandList::clip_rect(self : RenderCommandList, rect : Rect, op? : ClipOp) -> RenderCommandList

    RenderCommandList::clip_rrect

    fn RenderCommandList::clip_rrect(self : RenderCommandList, rrect : RRect, op? : ClipOp) -> RenderCommandList

    RenderCommandList::concat

    RenderCommandList::declare_resource

    RenderCommandList::declare_resources

    RenderCommandList::draw_arc

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

    RenderCommandList::draw_circle

    fn RenderCommandList::draw_circle(self : RenderCommandList, center : Point, radius : Float, paint? : Paint) -> RenderCommandList

    RenderCommandList::draw_color

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

    RenderCommandList::draw_drrect

    fn RenderCommandList::draw_drrect(self : RenderCommandList, outer : RRect, inner : RRect, paint? : Paint) -> RenderCommandList

    RenderCommandList::draw_image

    fn RenderCommandList::draw_image(self : RenderCommandList, image : ImageDescriptor, top_left : Point) -> RenderCommandList

    RenderCommandList::draw_image_rect

    fn RenderCommandList::draw_image_rect(self : RenderCommandList, image : ImageDescriptor, src : Rect, dst : Rect, paint? : Paint, sampling? : SamplingOptions) -> RenderCommandList

    RenderCommandList::draw_line

    fn RenderCommandList::draw_line(self : RenderCommandList, start : Point, end : Point, paint? : Paint) -> RenderCommandList

    RenderCommandList::draw_oval

    fn RenderCommandList::draw_oval(self : RenderCommandList, oval : Rect, paint? : Paint) -> RenderCommandList

    RenderCommandList::draw_paint

    fn RenderCommandList::draw_paint(self : RenderCommandList, paint? : Paint) -> RenderCommandList

    RenderCommandList::draw_paint_shader

    fn RenderCommandList::draw_paint_shader(self : RenderCommandList, shader : ShaderDescriptor, paint? : Paint) -> RenderCommandList

    RenderCommandList::draw_path

    fn RenderCommandList::draw_path(self : RenderCommandList, path : Path, paint? : Paint) -> RenderCommandList

    RenderCommandList::draw_path_shader

    fn RenderCommandList::draw_path_shader(self : RenderCommandList, path : Path, shader : ShaderDescriptor, paint? : Paint) -> RenderCommandList

    RenderCommandList::draw_point

    fn RenderCommandList::draw_point(self : RenderCommandList, point : Point, paint? : Paint) -> RenderCommandList

    RenderCommandList::draw_points

    fn RenderCommandList::draw_points(self : RenderCommandList, points : Array[Point], paint? : Paint, mode? : PointMode) -> RenderCommandList

    RenderCommandList::draw_rect

    fn RenderCommandList::draw_rect(self : RenderCommandList, rect : Rect, paint? : Paint) -> RenderCommandList

    RenderCommandList::draw_rect_shader

    fn RenderCommandList::draw_rect_shader(self : RenderCommandList, rect : Rect, shader : ShaderDescriptor, paint? : Paint) -> RenderCommandList

    RenderCommandList::draw_round_rect

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

    RenderCommandList::draw_round_rect_shader

    fn RenderCommandList::draw_round_rect_shader(self : RenderCommandList, rect : Rect, rx : Float, ry : Float, shader : ShaderDescriptor, paint? : Paint) -> RenderCommandList

    RenderCommandList::draw_rrect

    fn RenderCommandList::draw_rrect(self : RenderCommandList, rrect : RRect, paint? : Paint) -> RenderCommandList

    RenderCommandList::draw_shaped_glyph_run_utf8

    fn RenderCommandList::draw_shaped_glyph_run_utf8(self : RenderCommandList, text : Bytes, glyph_run : ShapedGlyphRunDescriptor, origin : Point, paint? : Paint) -> RenderCommandList

    RenderCommandList::draw_text_run_utf8

    fn RenderCommandList::draw_text_run_utf8(self : RenderCommandList, text : Bytes, origin : Point, descriptor? : TextRunDescriptor?, font_key? : RendererResourceKey, paint? : Paint) -> RenderCommandList

    RenderCommandList::draw_text_utf8

    fn RenderCommandList::draw_text_utf8(self : RenderCommandList, text : Bytes, origin : Point, paint? : Paint) -> RenderCommandList

    RenderCommandList::equal

    RenderCommandList::finish

    RenderCommandList::for_target

    fn RenderCommandList::for_target(target : SurfaceTargetDescriptor, bounds? : IRect?, load_op? : RenderPassLoadOp, clear_color? : Color?, store_op? : RenderPassStoreOp?) -> RenderCommandList

    RenderCommandList::frame_descriptor

    RenderCommandList::has_present

    fn RenderCommandList::has_present(self : RenderCommandList) -> Bool

    RenderCommandList::is_empty

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

    RenderCommandList::is_state_balanced

    fn RenderCommandList::is_state_balanced(self : RenderCommandList) -> Bool

    RenderCommandList::length

    fn RenderCommandList::length(self : RenderCommandList) -> Int

    RenderCommandList::new

    RenderCommandList::not_equal

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

    RenderCommandList::present

    RenderCommandList::reset_matrix

    RenderCommandList::resource_descriptors

    RenderCommandList::resource_plan

    RenderCommandList::restore

    RenderCommandList::rotate

    fn RenderCommandList::rotate(self : RenderCommandList, degrees : Float) -> RenderCommandList

    RenderCommandList::save

    RenderCommandList::save_layer

    fn RenderCommandList::save_layer(self : RenderCommandList, bounds? : Rect?, paint? : Paint, color_filter? : ColorFilterDescriptor?, image_filter? : ImageFilterDescriptor?, mask_filter? : MaskFilterDescriptor?) -> RenderCommandList

    RenderCommandList::scale

    RenderCommandList::skew

    RenderCommandList::stats

    RenderCommandList::text_run_resource_keys

    fn RenderCommandList::text_run_resource_keys(self : RenderCommandList) -> Array[RendererResourceKey]

    RenderCommandList::touched_bounds

    fn RenderCommandList::touched_bounds(self : RenderCommandList) -> Rect?

    RenderCommandList::translate

    RenderCommandStats

    pub(all) struct RenderCommandStats {
    command_count : Int
    draw_count : Int
    state_count : Int
    transform_count : Int
    clip_count : Int
    clear_count : Int
    present_count : Int
    text_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
    max_save_depth : Int
    final_save_depth : Int
    unbalanced_restore_count : Int
    } derive(Eq,
    Debug
    )

    RenderCommandStats::empty

    RenderCommandStats::equal

    RenderCommandStats::is_state_balanced

    fn RenderCommandStats::is_state_balanced(self : RenderCommandStats) -> Bool

    RenderCommandStats::not_equal

    RenderFrameDescriptor

    pub(all) struct RenderFrameDescriptor {
    target : SurfaceTargetDescriptor
    command_list : RenderCommandList
    resource_plan : RendererResourcePlan
    stats : RenderCommandStats
    touched_bounds : Rect?
    } derive(Eq,
    Debug
    )

    Frame-level value boundary for a target plus its finalized render commands.

    RenderFrameDescriptor::cache_resources

    RenderFrameDescriptor::cacheable_resource_plan

    RenderFrameDescriptor::cached_cacheable_resource_plan

    RenderFrameDescriptor::empty

    RenderFrameDescriptor::equal

    RenderFrameDescriptor::finalization_descriptor

    fn RenderFrameDescriptor::finalization_descriptor(self : RenderFrameDescriptor, frame_index? : Int) -> RenderFrameFinalizationDescriptor

    RenderFrameDescriptor::finalization_resource_plan

    fn RenderFrameDescriptor::finalization_resource_plan(self : RenderFrameDescriptor, frame_index? : Int) -> RendererResourcePlan

    RenderFrameDescriptor::has_gpu_context

    fn RenderFrameDescriptor::has_gpu_context(self : RenderFrameDescriptor) -> Bool

    RenderFrameDescriptor::has_present

    fn RenderFrameDescriptor::has_present(self : RenderFrameDescriptor) -> Bool

    RenderFrameDescriptor::is_ready

    fn RenderFrameDescriptor::is_ready(self : RenderFrameDescriptor) -> Bool

    RenderFrameDescriptor::is_target_consistent

    fn RenderFrameDescriptor::is_target_consistent(self : RenderFrameDescriptor) -> Bool

    RenderFrameDescriptor::missing_cacheable_resource_plan

    RenderFrameDescriptor::needs_present

    fn RenderFrameDescriptor::needs_present(self : RenderFrameDescriptor) -> Bool

    RenderFrameDescriptor::new

    RenderFrameDescriptor::not_equal

    RenderFrameDescriptor::present_descriptor

    fn RenderFrameDescriptor::present_descriptor(self : RenderFrameDescriptor, frame_index? : Int, buffer_index? : Int) -> SurfacePresentDescriptor?

    RenderFrameDescriptor::present_resource_plan

    fn RenderFrameDescriptor::present_resource_plan(self : RenderFrameDescriptor, frame_index? : Int, buffer_index? : Int) -> RendererResourcePlan

    RenderFrameDescriptor::requires_gpu_context

    fn RenderFrameDescriptor::requires_gpu_context(self : RenderFrameDescriptor) -> Bool

    RenderFrameDescriptor::submission_descriptor

    fn RenderFrameDescriptor::submission_descriptor(self : RenderFrameDescriptor, frame_index? : Int, buffer_index? : Int) -> RenderFrameSubmissionDescriptor

    RenderFrameDescriptor::uncacheable_resource_plan

    fn RenderFrameDescriptor::uncacheable_resource_plan(self : RenderFrameDescriptor) -> RendererResourcePlan

    RenderFrameDescriptor::validation_status

    RenderFrameFinalizationDescriptor

    pub(all) struct RenderFrameFinalizationDescriptor {
    frame : RenderFrameDescriptor
    frame_index : Int
    validation_status : RenderFrameValidationStatus
    finalization : SurfaceFinalizationDescriptor?
    resource_plan : RendererResourcePlan
    } derive(Eq,
    Debug
    )

    Auditable backend finalization boundary for a finalized frame before flush/submit is performed on its target surface.

    RenderFrameFinalizationDescriptor::cache_resources

    RenderFrameFinalizationDescriptor::cacheable_resource_plan

    RenderFrameFinalizationDescriptor::cached_cacheable_resource_plan

    RenderFrameFinalizationDescriptor::gpu_backed_resource_plan

    RenderFrameFinalizationDescriptor::has_finalization

    RenderFrameFinalizationDescriptor::is_ready

    RenderFrameFinalizationDescriptor::missing_cacheable_resource_plan

    RenderFrameFinalizationDescriptor::new

    RenderFrameFinalizationDescriptor::not_equal

    RenderFrameFinalizationDescriptor::requires_gpu_context

    RenderFrameFinalizationDescriptor::uncacheable_resource_plan

    RenderFrameSubmissionDescriptor

    pub(all) struct RenderFrameSubmissionDescriptor {
    frame : RenderFrameDescriptor
    frame_index : Int
    validation_status : RenderFrameValidationStatus
    present : SurfacePresentDescriptor?
    resource_plan : RendererResourcePlan
    } derive(Eq,
    Debug
    )

    Auditable backend submission boundary for a finalized frame plus any per-frame present resources.

    RenderFrameSubmissionDescriptor::cache_resources

    RenderFrameSubmissionDescriptor::cacheable_resource_plan

    RenderFrameSubmissionDescriptor::cached_cacheable_resource_plan

    RenderFrameSubmissionDescriptor::gpu_backed_resource_plan

    RenderFrameSubmissionDescriptor::has_present

    RenderFrameSubmissionDescriptor::is_ready

    RenderFrameSubmissionDescriptor::missing_cacheable_resource_plan

    RenderFrameSubmissionDescriptor::new

    fn RenderFrameSubmissionDescriptor::new(frame : RenderFrameDescriptor, frame_index? : Int, buffer_index? : Int) -> RenderFrameSubmissionDescriptor

    RenderFrameSubmissionDescriptor::not_equal

    RenderFrameSubmissionDescriptor::uncacheable_resource_plan

    RenderFrameValidationStatus

    pub(all) enum RenderFrameValidationStatus {
    FrameReady
    FrameTargetMismatch
    FrameUnbalancedState
    FrameMissingGpuContext
    FrameMissingPresent
    } derive(Eq,
    Debug
    )

    Validation outcome for a finalized render frame.

    RenderFrameValidationStatus::is_ready

    RenderFrameValidationStatus::not_equal

    RenderPassDescriptor

    pub(all) struct RenderPassDescriptor {
    surface : SurfaceDescriptor
    target_key : RendererResourceKey?
    bounds : IRect
    load_op : RenderPassLoadOp
    clear_color : Color?
    store_op : RenderPassStoreOp
    } derive(Eq,
    Debug
    )

    Value-layer boundary for a single render pass.

    RenderPassDescriptor::clear

    fn RenderPassDescriptor::clear(surface : SurfaceDescriptor, color : Color, bounds? : IRect?, store_op? : RenderPassStoreOp) -> RenderPassDescriptor

    RenderPassDescriptor::clear_target

    fn RenderPassDescriptor::clear_target(target : SurfaceTargetDescriptor, color : Color, bounds? : IRect?, store_op? : RenderPassStoreOp?) -> RenderPassDescriptor

    RenderPassDescriptor::equal

    RenderPassDescriptor::for_target

    fn RenderPassDescriptor::for_target(target : SurfaceTargetDescriptor, bounds? : IRect?, load_op? : RenderPassLoadOp, clear_color? : Color?, store_op? : RenderPassStoreOp?) -> RenderPassDescriptor

    RenderPassDescriptor::has_target_binding

    fn RenderPassDescriptor::has_target_binding(self : RenderPassDescriptor) -> Bool

    RenderPassDescriptor::is_bound_to_target

    fn RenderPassDescriptor::is_bound_to_target(self : RenderPassDescriptor, target : SurfaceTargetDescriptor) -> Bool

    RenderPassDescriptor::is_empty

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

    RenderPassDescriptor::is_msaa

    fn RenderPassDescriptor::is_msaa(self : RenderPassDescriptor) -> Bool

    RenderPassDescriptor::keeps_pixels

    fn RenderPassDescriptor::keeps_pixels(self : RenderPassDescriptor) -> Bool

    RenderPassDescriptor::needs_clear

    fn RenderPassDescriptor::needs_clear(self : RenderPassDescriptor) -> Bool

    RenderPassDescriptor::needs_present

    fn RenderPassDescriptor::needs_present(self : RenderPassDescriptor) -> Bool

    RenderPassDescriptor::new

    fn RenderPassDescriptor::new(surface : SurfaceDescriptor, target_key? : RendererResourceKey?, bounds? : IRect?, load_op? : RenderPassLoadOp, clear_color? : Color?, store_op? : RenderPassStoreOp) -> RenderPassDescriptor

    RenderPassDescriptor::not_equal

    RenderPassDescriptor::present

    fn RenderPassDescriptor::present(surface : SurfaceDescriptor, bounds? : IRect?, clear_color? : Color?) -> RenderPassDescriptor

    RenderPassDescriptor::resource_descriptor

    RenderPassDescriptor::with_bounds

    RenderPassDescriptor::with_clear_color

    fn RenderPassDescriptor::with_clear_color(self : RenderPassDescriptor, color : Color) -> RenderPassDescriptor

    RenderPassDescriptor::with_load_op

    RenderPassDescriptor::with_store_op

    RenderPassDescriptor::without_clear

    RenderPassLoadOp

    pub(all) enum RenderPassLoadOp {
    LoadExisting
    ClearBeforeDraw
    DontCareLoad
    } derive(Eq,
    Debug
    )

    How a render pass should initialize its target pixels.

    RenderPassLoadOp::default

    RenderPassLoadOp::equal

    RenderPassLoadOp::needs_clear

    fn RenderPassLoadOp::needs_clear(self : RenderPassLoadOp) -> Bool

    RenderPassLoadOp::not_equal

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

    RenderPassLoadOp::preserves_existing_pixels

    fn RenderPassLoadOp::preserves_existing_pixels(self : RenderPassLoadOp) -> Bool

    RenderPassStoreOp

    pub(all) enum RenderPassStoreOp {
    StorePixels
    DiscardPixels
    PresentPixels
    } derive(Eq,
    Debug
    )

    How a render pass should finish target pixels after drawing.

    RenderPassStoreOp::default

    RenderPassStoreOp::equal

    RenderPassStoreOp::keeps_pixels

    fn RenderPassStoreOp::keeps_pixels(self : RenderPassStoreOp) -> Bool

    RenderPassStoreOp::needs_present

    fn RenderPassStoreOp::needs_present(self : RenderPassStoreOp) -> Bool

    RenderPassStoreOp::not_equal

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

    RendererResourceDescriptor

    pub(all) struct RendererResourceDescriptor {
    key : RendererResourceKey
    byte_size : Int64
    cacheable : Bool
    } derive(Eq,
    Debug
    )

    Cache metadata for one backend resource. Empty keys are automatically marked non-cacheable so anonymous one-shot resources do not collide in an LRU map.

    RendererResourceDescriptor::color_filter

    fn RendererResourceDescriptor::color_filter(id : Bytes, byte_size? : Int64) -> RendererResourceDescriptor

    RendererResourceDescriptor::equal

    RendererResourceDescriptor::filter

    fn RendererResourceDescriptor::filter(id : Bytes, byte_size? : Int64) -> RendererResourceDescriptor

    RendererResourceDescriptor::font

    fn RendererResourceDescriptor::font(id : Bytes, byte_size? : Int64) -> RendererResourceDescriptor

    RendererResourceDescriptor::gpu_context

    fn RendererResourceDescriptor::gpu_context(id : Bytes, byte_size? : Int64) -> RendererResourceDescriptor

    RendererResourceDescriptor::gpu_surface

    fn RendererResourceDescriptor::gpu_surface(id : Bytes, byte_size? : Int64) -> RendererResourceDescriptor

    RendererResourceDescriptor::image

    fn RendererResourceDescriptor::image(id : Bytes, byte_size? : Int64) -> RendererResourceDescriptor

    RendererResourceDescriptor::image_filter

    fn RendererResourceDescriptor::image_filter(id : Bytes, byte_size? : Int64) -> RendererResourceDescriptor

    RendererResourceDescriptor::is_cacheable

    RendererResourceDescriptor::is_gpu_backed

    fn RendererResourceDescriptor::is_gpu_backed(self : RendererResourceDescriptor) -> Bool

    RendererResourceDescriptor::mask_filter

    fn RendererResourceDescriptor::mask_filter(id : Bytes, byte_size? : Int64) -> RendererResourceDescriptor

    RendererResourceDescriptor::new

    fn RendererResourceDescriptor::new(key : RendererResourceKey, byte_size? : Int64, cacheable? : Bool) -> RendererResourceDescriptor

    RendererResourceDescriptor::not_equal

    RendererResourceDescriptor::of_kind

    fn RendererResourceDescriptor::of_kind(kind : RendererResourceKind, id : Bytes, byte_size? : Int64, cacheable? : Bool) -> RendererResourceDescriptor

    RendererResourceDescriptor::path

    fn RendererResourceDescriptor::path(id : Bytes, byte_size? : Int64) -> RendererResourceDescriptor

    RendererResourceDescriptor::shader

    fn RendererResourceDescriptor::shader(id : Bytes, byte_size? : Int64) -> RendererResourceDescriptor

    RendererResourceDescriptor::surface

    fn RendererResourceDescriptor::surface(id : Bytes, byte_size? : Int64) -> RendererResourceDescriptor

    RendererResourceDescriptor::text_run

    fn RendererResourceDescriptor::text_run(id : Bytes, byte_size? : Int64) -> RendererResourceDescriptor

    RendererResourceDescriptor::typeface

    fn RendererResourceDescriptor::typeface(id : Bytes, byte_size? : Int64) -> RendererResourceDescriptor

    RendererResourceDescriptor::uncacheable

    RendererResourceDescriptor::with_byte_size

    RendererResourceKey

    pub(all) struct RendererResourceKey {
    kind : RendererResourceKind
    id : Bytes
    } derive(Eq, Hash,
    Debug
    )

    Stable key for renderer-owned resources. The id is intentionally bytes so callers can use hashes, URLs, font family bytes, or serialized descriptors.

    RendererResourceKey::color_filter

    fn RendererResourceKey::color_filter(id : Bytes) -> RendererResourceKey

    RendererResourceKey::equal

    RendererResourceKey::font

    RendererResourceKey::gpu_context

    fn RendererResourceKey::gpu_context(id : Bytes) -> RendererResourceKey

    RendererResourceKey::gpu_surface

    fn RendererResourceKey::gpu_surface(id : Bytes) -> RendererResourceKey

    RendererResourceKey::hash

    RendererResourceKey::hash_combine

    RendererResourceKey::image

    fn RendererResourceKey::image(id : Bytes) -> RendererResourceKey

    RendererResourceKey::image_filter

    fn RendererResourceKey::image_filter(id : Bytes) -> RendererResourceKey

    RendererResourceKey::is_empty

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

    RendererResourceKey::is_gpu_backed

    fn RendererResourceKey::is_gpu_backed(self : RendererResourceKey) -> Bool

    RendererResourceKey::mask_filter

    fn RendererResourceKey::mask_filter(id : Bytes) -> RendererResourceKey

    RendererResourceKey::new

    RendererResourceKey::not_equal

    RendererResourceKey::path

    RendererResourceKey::shader

    fn RendererResourceKey::shader(id : Bytes) -> RendererResourceKey

    RendererResourceKey::surface

    fn RendererResourceKey::surface(id : Bytes) -> RendererResourceKey

    RendererResourceKey::text_run

    fn RendererResourceKey::text_run(id : Bytes) -> RendererResourceKey

    RendererResourceKey::typeface

    fn RendererResourceKey::typeface(id : Bytes) -> RendererResourceKey

    RendererResourceKind

    pub(all) enum RendererResourceKind {
    ImageResource
    ShaderResource
    ColorFilterResource
    ImageFilterResource
    MaskFilterResource
    TypefaceResource
    FontResource
    PathResource
    TextRunResource
    SurfaceResource
    GpuContextResource
    GpuSurfaceResource
    } derive(Eq, Hash,
    Debug
    )

    Renderer-owned resource families that commonly need backend caches.

    RendererResourceKind::equal

    RendererResourceKind::hash

    RendererResourceKind::hash_combine

    RendererResourceKind::is_filter

    fn RendererResourceKind::is_filter(self : RendererResourceKind) -> Bool

    RendererResourceKind::is_gpu_backed

    fn RendererResourceKind::is_gpu_backed(self : RendererResourceKind) -> Bool

    RendererResourceKind::is_surface

    fn RendererResourceKind::is_surface(self : RendererResourceKind) -> Bool

    RendererResourceKind::is_text

    fn RendererResourceKind::is_text(self : RendererResourceKind) -> Bool

    RendererResourceKind::not_equal

    RendererResourcePlan

    pub(all) struct RendererResourcePlan {
    descriptors : Array[RendererResourceDescriptor]
    byte_size : Int64
    cacheable_count : Int
    uncacheable_count : Int
    gpu_backed_count : Int
    } derive(Eq,
    Debug
    )

    Auditable resource requirements for a backend render step.

    RendererResourcePlan::byte_size_for_kind

    fn RendererResourcePlan::byte_size_for_kind(self : RendererResourcePlan, kind : RendererResourceKind) -> Int64

    RendererResourcePlan::cacheable_descriptors

    RendererResourcePlan::cacheable_resource_plan

    fn RendererResourcePlan::cacheable_resource_plan(self : RendererResourcePlan) -> RendererResourcePlan

    RendererResourcePlan::contains_key

    fn RendererResourcePlan::contains_key(self : RendererResourcePlan, key : RendererResourceKey) -> Bool

    RendererResourcePlan::count_kind

    fn RendererResourcePlan::count_kind(self : RendererResourcePlan, kind : RendererResourceKind) -> Int

    RendererResourcePlan::descriptor_for_key

    RendererResourcePlan::descriptors_of_kind

    RendererResourcePlan::empty

    RendererResourcePlan::equal

    RendererResourcePlan::gpu_backed_descriptors

    RendererResourcePlan::gpu_backed_resource_plan

    fn RendererResourcePlan::gpu_backed_resource_plan(self : RendererResourcePlan) -> RendererResourcePlan

    RendererResourcePlan::has_cacheable_resources

    fn RendererResourcePlan::has_cacheable_resources(self : RendererResourcePlan) -> Bool

    RendererResourcePlan::has_gpu_backed_resources

    fn RendererResourcePlan::has_gpu_backed_resources(self : RendererResourcePlan) -> Bool

    RendererResourcePlan::has_uncacheable_resources

    fn RendererResourcePlan::has_uncacheable_resources(self : RendererResourcePlan) -> Bool

    RendererResourcePlan::is_empty

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

    RendererResourcePlan::length

    fn RendererResourcePlan::length(self : RendererResourcePlan) -> Int

    RendererResourcePlan::new

    RendererResourcePlan::not_equal

    RendererResourcePlan::uncacheable_descriptors

    RendererResourcePlan::uncacheable_resource_plan

    fn RendererResourcePlan::uncacheable_resource_plan(self : RendererResourcePlan) -> RendererResourcePlan

    ResourceCache

    pub(all) struct ResourceCache[K, V] {
    // private fields
    }

    Small deterministic LRU cache for renderer-owned resources.

    ResourceCache::byte_size

    fn[K, V] ResourceCache::byte_size(self : ResourceCache[K, V]) -> Int64

    ResourceCache::cached_cacheable_resource_plan

    ResourceCache::clear

    fn[K, V] ResourceCache::clear(self : ResourceCache[K, V]) -> Unit

    ResourceCache::contains

    fn[K : Hash + Eq, V] ResourceCache::contains(self : ResourceCache[K, V], key : K) -> Bool

    ResourceCache::contains_resource_descriptor

    fn ResourceCache::contains_resource_descriptor(self : ResourceCache[RendererResourceKey, RendererResourceDescriptor], descriptor : RendererResourceDescriptor) -> Bool

    ResourceCache::contains_resource_plan

    ResourceCache::get

    fn[K : Hash + Eq, V] ResourceCache::get(self : ResourceCache[K, V], key : K) -> V?

    ResourceCache::insert

    fn[K : Hash + Eq, V] ResourceCache::insert(self : ResourceCache[K, V], key : K, value : V, byte_size? : Int64) -> Bool

    ResourceCache::insert_resource_descriptor

    fn ResourceCache::insert_resource_descriptor(self : ResourceCache[RendererResourceKey, RendererResourceDescriptor], descriptor : RendererResourceDescriptor) -> Bool

    ResourceCache::insert_resource_plan

    ResourceCache::is_empty

    fn[K, V] ResourceCache::is_empty(self : ResourceCache[K, V]) -> Bool

    ResourceCache::length

    fn[K, V] ResourceCache::length(self : ResourceCache[K, V]) -> Int

    ResourceCache::max_bytes

    fn[K, V] ResourceCache::max_bytes(self : ResourceCache[K, V]) -> Int64

    ResourceCache::missing_cacheable_resource_plan

    ResourceCache::new

    fn[K, V] ResourceCache::new(max_bytes? : Int64) -> ResourceCache[K, V]

    ResourceCache::peek

    fn[K : Hash + Eq, V] ResourceCache::peek(self : ResourceCache[K, V], key : K) -> V?

    ResourceCache::remove

    fn[K : Hash + Eq, V] ResourceCache::remove(self : ResourceCache[K, V], key : K) -> Bool

    ResourceCache::set_max_bytes

    fn[K : Hash + Eq, V] ResourceCache::set_max_bytes(self : ResourceCache[K, V], max_bytes : Int64) -> Unit

    ResourceCache::stats

    fn[K, V] ResourceCache::stats(self : ResourceCache[K, V]) -> ResourceCacheStats

    ResourceCacheStats

    pub(all) struct ResourceCacheStats {
    count : Int
    byte_size : Int64
    max_bytes : Int64
    hits : Int
    misses : Int
    evictions : Int
    } derive(Eq,
    Debug
    )

    Observable counters for a resource cache.

    ResourceCacheStats::equal

    ResourceCacheStats::not_equal

    SamplingOptions

    pub(all) struct SamplingOptions {
    filter : FilterMode
    mipmap : MipmapMode
    cubic : CubicResampler?
    } derive(Eq,
    Debug
    )

    Image sampling options modeled after Skia's SkSamplingOptions.

    SamplingOptions::catmull_rom

    fn SamplingOptions::catmull_rom() -> SamplingOptions

    SamplingOptions::cubic_b

    fn SamplingOptions::cubic_b(self : SamplingOptions) -> Float

    SamplingOptions::cubic_c

    fn SamplingOptions::cubic_c(self : SamplingOptions) -> Float

    SamplingOptions::default

    SamplingOptions::equal

    SamplingOptions::filter_ordinal

    fn SamplingOptions::filter_ordinal(self : SamplingOptions) -> Int

    SamplingOptions::from_cubic

    SamplingOptions::linear

    SamplingOptions::mipmap_ordinal

    fn SamplingOptions::mipmap_ordinal(self : SamplingOptions) -> Int

    SamplingOptions::mitchell

    SamplingOptions::new

    fn SamplingOptions::new(filter? : FilterMode, mipmap? : MipmapMode) -> SamplingOptions

    SamplingOptions::not_equal

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

    SamplingOptions::uses_cubic

    fn SamplingOptions::uses_cubic(self : SamplingOptions) -> Bool

    ShaderDescriptor

    pub(all) enum ShaderDescriptor {
    ColorShader(Color)
    LinearGradientShader(Point, Point, Color, Color, TileMode)
    RadialGradientShader(Point, Float, Color, Color, TileMode)
    } derive(Eq,
    Debug
    )

    Portable shader recipes that can be planned before native Skia handles are created.

    ShaderDescriptor::color

    ShaderDescriptor::equal

    ShaderDescriptor::is_valid

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

    ShaderDescriptor::linear_gradient

    fn ShaderDescriptor::linear_gradient(start : Point, end : Point, start_color : Color, end_color : Color, tile_mode? : TileMode) -> ShaderDescriptor?

    ShaderDescriptor::not_equal

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

    ShaderDescriptor::radial_gradient

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

    ShaderDescriptor::resource_descriptor

    fn ShaderDescriptor::resource_descriptor(self : ShaderDescriptor, byte_size? : Int64) -> RendererResourceDescriptor

    ShaderDescriptor::resource_key

    ShapedGlyphRunDescriptor

    pub(all) struct ShapedGlyphRunDescriptor {
    shaped_run : ShapedTextRunDescriptor
    glyph_ids : Array[Int]
    positions : Array[Point]
    clusters : Array[Int]
    } derive(Eq,
    Debug
    )

    Detailed glyph IDs, positions, and clusters for a shaped text run.

    ShapedGlyphRunDescriptor::cluster_count

    fn ShapedGlyphRunDescriptor::cluster_count(self : ShapedGlyphRunDescriptor) -> Int

    ShapedGlyphRunDescriptor::equal

    ShapedGlyphRunDescriptor::glyph_count

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

    ShapedGlyphRunDescriptor::is_empty

    ShapedGlyphRunDescriptor::is_valid

    ShapedGlyphRunDescriptor::new

    fn ShapedGlyphRunDescriptor::new(shaped_run? : ShapedTextRunDescriptor, glyph_ids? : Array[Int], positions? : Array[Point], clusters? : Array[Int]) -> ShapedGlyphRunDescriptor

    ShapedGlyphRunDescriptor::not_equal

    ShapedGlyphRunDescriptor::resource_descriptor

    fn ShapedGlyphRunDescriptor::resource_descriptor(self : ShapedGlyphRunDescriptor, text : Bytes, byte_size? : Int64) -> RendererResourceDescriptor

    ShapedGlyphRunDescriptor::resource_key

    ShapedGlyphRunDescriptor::resource_plan

    fn ShapedGlyphRunDescriptor::resource_plan(self : ShapedGlyphRunDescriptor, text : Bytes, glyph_run_byte_size? : Int64, shaped_byte_size? : Int64, shaping_byte_size? : Int64, text_byte_size? : Int64, font_byte_size? : Int64, fallback_byte_size? : Int64) -> RendererResourcePlan

    ShapedTextRunDescriptor

    pub(all) struct ShapedTextRunDescriptor {
    shaping : TextShapingDescriptor
    glyph_count : Int
    cluster_count : Int
    advance : Point
    } derive(Eq,
    Debug
    )

    Value-layer metadata for a native shaped text run result.

    ShapedTextRunDescriptor::equal

    ShapedTextRunDescriptor::glyph_run_descriptor

    fn ShapedTextRunDescriptor::glyph_run_descriptor(self : ShapedTextRunDescriptor, glyph_ids? : Array[Int], positions? : Array[Point], clusters? : Array[Int]) -> ShapedGlyphRunDescriptor

    ShapedTextRunDescriptor::is_valid

    ShapedTextRunDescriptor::new

    fn ShapedTextRunDescriptor::new(shaping? : TextShapingDescriptor, glyph_count? : Int, cluster_count? : Int, advance? : Point) -> ShapedTextRunDescriptor

    ShapedTextRunDescriptor::not_equal

    ShapedTextRunDescriptor::resource_descriptor

    fn ShapedTextRunDescriptor::resource_descriptor(self : ShapedTextRunDescriptor, text : Bytes, byte_size? : Int64) -> RendererResourceDescriptor

    ShapedTextRunDescriptor::resource_key

    fn ShapedTextRunDescriptor::resource_key(self : ShapedTextRunDescriptor, text : Bytes) -> RendererResourceKey

    ShapedTextRunDescriptor::resource_plan

    fn ShapedTextRunDescriptor::resource_plan(self : ShapedTextRunDescriptor, text : Bytes, shaped_byte_size? : Int64, shaping_byte_size? : Int64, text_byte_size? : Int64, font_byte_size? : Int64, fallback_byte_size? : Int64) -> RendererResourcePlan

    Size

    pub(all) struct Size {
    width : Float
    height : Float
    } derive(Eq,
    Debug
    )

    Floating-point width and height.
    impl Default for Size

    Size::default

    fn Size::default() -> Size

    Size::empty

    fn Size::empty() -> Size

    Size::equal

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

    Size::from_isize

    fn Size::from_isize(size : ISize) -> Size

    Size::is_empty

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

    Size::is_finite

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

    Size::is_zero

    fn Size::is_zero(self : Size) -> Bool

    Size::new

    fn Size::new(width : Float, height : Float) -> Size

    Size::not_equal

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

    Size::scale

    fn Size::scale(self : Size, scale : Float) -> Size

    Size::to_isize_round

    fn Size::to_isize_round(self : Size) -> ISize

    Size::to_repr

    StrokeCap

    pub(all) enum StrokeCap {
    Butt
    Round
    Square
    } derive(Eq,
    Debug
    )

    Shape used at the end of an open stroked contour.

    StrokeCap::default

    fn StrokeCap::default() -> StrokeCap

    StrokeCap::equal

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

    StrokeCap::not_equal

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

    StrokeCap::to_skia_ordinal

    fn StrokeCap::to_skia_ordinal(self : StrokeCap) -> Int

    StrokeJoin

    pub(all) enum StrokeJoin {
    Miter
    Round
    Bevel
    } derive(Eq,
    Debug
    )

    Shape used when two stroked segments meet.

    StrokeJoin::default

    fn StrokeJoin::default() -> StrokeJoin

    StrokeJoin::equal

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

    StrokeJoin::not_equal

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

    StrokeJoin::to_skia_ordinal

    fn StrokeJoin::to_skia_ordinal(self : StrokeJoin) -> Int

    SurfaceBackend

    pub(all) enum SurfaceBackend {
    Raster
    Window
    Gpu
    } derive(Eq,
    Debug
    )

    Rendering target family for a surface descriptor.

    SurfaceBackend::default

    SurfaceBackend::equal

    SurfaceBackend::is_gpu

    fn SurfaceBackend::is_gpu(self : SurfaceBackend) -> Bool

    SurfaceBackend::is_presentable

    fn SurfaceBackend::is_presentable(self : SurfaceBackend) -> Bool

    SurfaceBackend::is_raster

    fn SurfaceBackend::is_raster(self : SurfaceBackend) -> Bool

    SurfaceBackend::is_window

    fn SurfaceBackend::is_window(self : SurfaceBackend) -> Bool

    SurfaceBackend::not_equal

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

    SurfaceBudget

    pub(all) enum SurfaceBudget {
    Budgeted
    Unbudgeted
    } derive(Eq,
    Debug
    )

    Whether a surface should count against an implementation resource budget.

    SurfaceBudget::default

    fn SurfaceBudget::default() -> SurfaceBudget

    SurfaceBudget::equal

    SurfaceBudget::is_budgeted

    fn SurfaceBudget::is_budgeted(self : SurfaceBudget) -> Bool

    SurfaceBudget::not_equal

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

    SurfaceDescriptor

    pub(all) struct SurfaceDescriptor {
    backend : SurfaceBackend
    image_info : ImageInfo
    origin : SurfaceOrigin
    sample_count : Int
    stencil_bits : Int
    budget : SurfaceBudget
    } derive(Eq,
    Debug
    )

    Stable value-layer contract for raster, window, and future GPU surfaces.

    SurfaceDescriptor::bounds

    SurfaceDescriptor::dimensions

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

    SurfaceDescriptor::equal

    SurfaceDescriptor::gpu_n32_premul

    fn SurfaceDescriptor::gpu_n32_premul(size : ISize, origin? : SurfaceOrigin, sample_count? : Int, stencil_bits? : Int, budget? : SurfaceBudget) -> SurfaceDescriptor

    SurfaceDescriptor::height

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

    SurfaceDescriptor::is_budgeted

    fn SurfaceDescriptor::is_budgeted(self : SurfaceDescriptor) -> Bool

    SurfaceDescriptor::is_empty

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

    SurfaceDescriptor::is_gpu

    fn SurfaceDescriptor::is_gpu(self : SurfaceDescriptor) -> Bool

    SurfaceDescriptor::is_msaa

    fn SurfaceDescriptor::is_msaa(self : SurfaceDescriptor) -> Bool

    SurfaceDescriptor::is_presentable

    fn SurfaceDescriptor::is_presentable(self : SurfaceDescriptor) -> Bool

    SurfaceDescriptor::is_raster

    fn SurfaceDescriptor::is_raster(self : SurfaceDescriptor) -> Bool

    SurfaceDescriptor::is_window

    fn SurfaceDescriptor::is_window(self : SurfaceDescriptor) -> Bool

    SurfaceDescriptor::new

    fn SurfaceDescriptor::new(backend : SurfaceBackend, image_info : ImageInfo, origin? : SurfaceOrigin, sample_count? : Int, stencil_bits? : Int, budget? : SurfaceBudget) -> SurfaceDescriptor

    SurfaceDescriptor::not_equal

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

    SurfaceDescriptor::raster_n32_premul

    fn SurfaceDescriptor::raster_n32_premul(size : ISize) -> SurfaceDescriptor

    SurfaceDescriptor::resource_descriptor

    fn SurfaceDescriptor::resource_descriptor(self : SurfaceDescriptor, byte_size? : Int64) -> RendererResourceDescriptor

    SurfaceDescriptor::resource_key

    SurfaceDescriptor::width

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

    SurfaceDescriptor::window_n32_premul

    fn SurfaceDescriptor::window_n32_premul(size : ISize, origin? : SurfaceOrigin, sample_count? : Int, stencil_bits? : Int) -> SurfaceDescriptor

    SurfaceDescriptor::with_backend

    SurfaceDescriptor::with_budget

    SurfaceDescriptor::with_dimensions

    fn SurfaceDescriptor::with_dimensions(self : SurfaceDescriptor, dimensions : ISize) -> SurfaceDescriptor

    SurfaceDescriptor::with_image_info

    fn SurfaceDescriptor::with_image_info(self : SurfaceDescriptor, image_info : ImageInfo) -> SurfaceDescriptor

    SurfaceDescriptor::with_origin

    SurfaceDescriptor::with_sample_count

    fn SurfaceDescriptor::with_sample_count(self : SurfaceDescriptor, sample_count : Int) -> SurfaceDescriptor

    SurfaceDescriptor::with_stencil_bits

    fn SurfaceDescriptor::with_stencil_bits(self : SurfaceDescriptor, stencil_bits : Int) -> SurfaceDescriptor

    SurfaceFinalizationDescriptor

    pub(all) struct SurfaceFinalizationDescriptor {
    target : SurfaceTargetDescriptor
    frame_index : Int
    } derive(Eq,
    Debug
    )

    Per-frame surface finalization metadata before a backend flushes/submits work.

    SurfaceFinalizationDescriptor::is_finalizable

    SurfaceFinalizationDescriptor::new

    SurfaceFinalizationDescriptor::not_equal

    SurfaceFinalizationDescriptor::requires_gpu_context

    fn SurfaceFinalizationDescriptor::requires_gpu_context(self : SurfaceFinalizationDescriptor) -> Bool

    SurfaceFinalizationDescriptor::resource_descriptor

    fn SurfaceFinalizationDescriptor::resource_descriptor(self : SurfaceFinalizationDescriptor, byte_size? : Int64) -> RendererResourceDescriptor

    SurfaceFinalizationDescriptor::resource_descriptors

    fn SurfaceFinalizationDescriptor::resource_descriptors(self : SurfaceFinalizationDescriptor, byte_size? : Int64) -> Array[RendererResourceDescriptor]

    SurfaceFinalizationDescriptor::resource_key

    SurfaceFinalizationDescriptor::resource_plan

    SurfaceOrigin

    pub(all) enum SurfaceOrigin {
    TopLeft
    BottomLeft
    } derive(Eq,
    Debug
    )

    Pixel origin used by a render target.

    SurfaceOrigin::default

    fn SurfaceOrigin::default() -> SurfaceOrigin

    SurfaceOrigin::equal

    SurfaceOrigin::not_equal

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

    SurfacePresentDescriptor

    pub(all) struct SurfacePresentDescriptor {
    target : SurfaceTargetDescriptor
    frame_index : Int
    buffer_index : Int
    present_mode : SurfacePresentMode?
    } derive(Eq,
    Debug
    )

    Per-frame presentation scheduling metadata for a presentable target.

    SurfacePresentDescriptor::allows_tearing

    fn SurfacePresentDescriptor::allows_tearing(self : SurfacePresentDescriptor) -> Bool

    SurfacePresentDescriptor::equal

    SurfacePresentDescriptor::is_presentable

    fn SurfacePresentDescriptor::is_presentable(self : SurfacePresentDescriptor) -> Bool

    SurfacePresentDescriptor::new

    fn SurfacePresentDescriptor::new(target : SurfaceTargetDescriptor, frame_index? : Int, buffer_index? : Int) -> SurfacePresentDescriptor

    SurfacePresentDescriptor::not_equal

    SurfacePresentDescriptor::prefers_vsync

    fn SurfacePresentDescriptor::prefers_vsync(self : SurfacePresentDescriptor) -> Bool

    SurfacePresentDescriptor::resource_descriptor

    fn SurfacePresentDescriptor::resource_descriptor(self : SurfacePresentDescriptor, byte_size? : Int64) -> RendererResourceDescriptor

    SurfacePresentDescriptor::resource_descriptors

    fn SurfacePresentDescriptor::resource_descriptors(self : SurfacePresentDescriptor, byte_size? : Int64) -> Array[RendererResourceDescriptor]

    SurfacePresentDescriptor::resource_key

    SurfacePresentDescriptor::resource_plan

    fn SurfacePresentDescriptor::resource_plan(self : SurfacePresentDescriptor, byte_size? : Int64) -> RendererResourcePlan

    SurfacePresentMode

    pub(all) enum SurfacePresentMode {
    ImmediatePresent
    MailboxPresent
    FifoPresent
    } derive(Eq,
    Debug
    )

    Presentation policy for a window or GPU-backed surface target.

    SurfacePresentMode::allows_tearing

    fn SurfacePresentMode::allows_tearing(self : SurfacePresentMode) -> Bool

    SurfacePresentMode::default

    SurfacePresentMode::equal

    SurfacePresentMode::not_equal

    SurfacePresentMode::prefers_vsync

    fn SurfacePresentMode::prefers_vsync(self : SurfacePresentMode) -> Bool

    SurfaceTargetDescriptor

    pub(all) struct SurfaceTargetDescriptor {
    surface : SurfaceDescriptor
    target_id : Bytes
    present_mode : SurfacePresentMode?
    max_frames_in_flight : Int
    gpu_context_key : RendererResourceKey?
    } derive(Eq,
    Debug
    )

    Stable value-layer contract for a renderable target and its presentation boundary. Raster targets are valid but never presentable.

    SurfaceTargetDescriptor::bounds

    SurfaceTargetDescriptor::dimensions

    SurfaceTargetDescriptor::equal

    SurfaceTargetDescriptor::finalization_descriptor

    fn SurfaceTargetDescriptor::finalization_descriptor(self : SurfaceTargetDescriptor, frame_index? : Int) -> SurfaceFinalizationDescriptor

    SurfaceTargetDescriptor::gpu_context_resource_descriptor

    fn SurfaceTargetDescriptor::gpu_context_resource_descriptor(self : SurfaceTargetDescriptor) -> RendererResourceDescriptor?

    SurfaceTargetDescriptor::gpu_n32_premul

    fn SurfaceTargetDescriptor::gpu_n32_premul(size : ISize, origin? : SurfaceOrigin, sample_count? : Int, stencil_bits? : Int, budget? : SurfaceBudget, present_mode? : SurfacePresentMode, max_frames_in_flight? : Int, gpu_context_key? : RendererResourceKey?, target_id? : Bytes) -> SurfaceTargetDescriptor

    SurfaceTargetDescriptor::has_gpu_context

    fn SurfaceTargetDescriptor::has_gpu_context(self : SurfaceTargetDescriptor) -> Bool

    SurfaceTargetDescriptor::has_target_id

    fn SurfaceTargetDescriptor::has_target_id(self : SurfaceTargetDescriptor) -> Bool

    SurfaceTargetDescriptor::is_multibuffered

    fn SurfaceTargetDescriptor::is_multibuffered(self : SurfaceTargetDescriptor) -> Bool

    SurfaceTargetDescriptor::is_presentable

    fn SurfaceTargetDescriptor::is_presentable(self : SurfaceTargetDescriptor) -> Bool

    SurfaceTargetDescriptor::needs_present

    fn SurfaceTargetDescriptor::needs_present(self : SurfaceTargetDescriptor) -> Bool

    SurfaceTargetDescriptor::new

    fn SurfaceTargetDescriptor::new(surface : SurfaceDescriptor, present_mode? : SurfacePresentMode?, max_frames_in_flight? : Int, gpu_context_key? : RendererResourceKey?, target_id? : Bytes) -> SurfaceTargetDescriptor

    SurfaceTargetDescriptor::not_equal

    SurfaceTargetDescriptor::present_descriptor

    fn SurfaceTargetDescriptor::present_descriptor(self : SurfaceTargetDescriptor, frame_index? : Int, buffer_index? : Int) -> SurfacePresentDescriptor

    SurfaceTargetDescriptor::raster_n32_premul

    fn SurfaceTargetDescriptor::raster_n32_premul(size : ISize) -> SurfaceTargetDescriptor

    SurfaceTargetDescriptor::resource_descriptor

    fn SurfaceTargetDescriptor::resource_descriptor(self : SurfaceTargetDescriptor, byte_size? : Int64) -> RendererResourceDescriptor

    SurfaceTargetDescriptor::resource_descriptors

    fn SurfaceTargetDescriptor::resource_descriptors(self : SurfaceTargetDescriptor, byte_size? : Int64) -> Array[RendererResourceDescriptor]

    SurfaceTargetDescriptor::resource_key

    SurfaceTargetDescriptor::resource_plan

    fn SurfaceTargetDescriptor::resource_plan(self : SurfaceTargetDescriptor, byte_size? : Int64) -> RendererResourcePlan

    SurfaceTargetDescriptor::window_n32_premul

    fn SurfaceTargetDescriptor::window_n32_premul(size : ISize, origin? : SurfaceOrigin, sample_count? : Int, stencil_bits? : Int, present_mode? : SurfacePresentMode, max_frames_in_flight? : Int, target_id? : Bytes) -> SurfaceTargetDescriptor

    SurfaceTargetDescriptor::with_dimensions

    SurfaceTargetDescriptor::with_gpu_context

    SurfaceTargetDescriptor::with_max_frames_in_flight

    fn SurfaceTargetDescriptor::with_max_frames_in_flight(self : SurfaceTargetDescriptor, max_frames_in_flight : Int) -> SurfaceTargetDescriptor

    SurfaceTargetDescriptor::with_present_mode

    SurfaceTargetDescriptor::with_target_id

    fn SurfaceTargetDescriptor::with_target_id(self : SurfaceTargetDescriptor, target_id : Bytes) -> SurfaceTargetDescriptor

    SurfaceTargetDescriptor::without_gpu_context

    SurfaceTargetDescriptor::without_present

    SurfaceTargetDescriptor::without_target_id

    TextDirection

    pub(all) enum TextDirection {
    LeftToRight
    RightToLeft
    } derive(Eq,
    Debug
    )

    Lightweight text direction used by value-layer text layout contracts.

    TextDirection::default

    fn TextDirection::default() -> TextDirection

    TextDirection::equal

    TextDirection::is_left_to_right

    fn TextDirection::is_left_to_right(self : TextDirection) -> Bool

    TextDirection::is_right_to_left

    fn TextDirection::is_right_to_left(self : TextDirection) -> Bool

    TextDirection::not_equal

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

    TextMeasurementDescriptor

    pub(all) struct TextMeasurementDescriptor {
    run : TextRunDescriptor
    font_key : RendererResourceKey
    width : Float
    measure_bounds : Bool
    shape : Bool
    } derive(Eq,
    Debug
    )

    Value-layer request for measuring or shaping a text run with stable cache identity and explicit font/fallback dependencies.

    TextMeasurementDescriptor::equal

    TextMeasurementDescriptor::is_shaped

    TextMeasurementDescriptor::measured_run_descriptor

    fn TextMeasurementDescriptor::measured_run_descriptor(self : TextMeasurementDescriptor, advance? : Float, bounds? : Rect?) -> MeasuredTextRunDescriptor

    TextMeasurementDescriptor::new

    fn TextMeasurementDescriptor::new(run? : TextRunDescriptor, font_key? : RendererResourceKey, width? : Float, measure_bounds? : Bool, shape? : Bool) -> TextMeasurementDescriptor

    TextMeasurementDescriptor::not_equal

    TextMeasurementDescriptor::resource_descriptor

    fn TextMeasurementDescriptor::resource_descriptor(self : TextMeasurementDescriptor, text : Bytes, byte_size? : Int64) -> RendererResourceDescriptor

    TextMeasurementDescriptor::resource_key

    TextMeasurementDescriptor::resource_plan

    fn TextMeasurementDescriptor::resource_plan(self : TextMeasurementDescriptor, text : Bytes, measurement_byte_size? : Int64, text_byte_size? : Int64, font_byte_size? : Int64, fallback_byte_size? : Int64) -> RendererResourcePlan

    TextMeasurementDescriptor::with_font_key

    TextMeasurementDescriptor::with_measure_bounds

    fn TextMeasurementDescriptor::with_measure_bounds(self : TextMeasurementDescriptor, measure_bounds : Bool) -> TextMeasurementDescriptor

    TextMeasurementDescriptor::with_run

    TextMeasurementDescriptor::with_shape

    TextMeasurementDescriptor::with_width

    TextRange

    pub(all) struct TextRange {
    start : Int
    end : Int
    } derive(Eq,
    Debug
    )

    Half-open byte range for a shaped text run.

    TextRange::contains_offset

    fn TextRange::contains_offset(self : TextRange, offset : Int) -> Bool

    TextRange::equal

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

    TextRange::is_empty

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

    TextRange::length

    fn TextRange::length(self : TextRange) -> Int

    TextRange::new

    fn TextRange::new(start : Int, end : Int) -> TextRange

    TextRange::not_equal

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

    TextRunDescriptor

    pub(all) struct TextRunDescriptor {
    range : TextRange
    direction : TextDirection
    fallback : FontFallbackRequest
    } derive(Eq,
    Debug
    )

    Value-layer description of a text run before native shaping or fallback.

    TextRunDescriptor::equal

    TextRunDescriptor::is_empty

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

    TextRunDescriptor::is_right_to_left

    fn TextRunDescriptor::is_right_to_left(self : TextRunDescriptor) -> Bool

    TextRunDescriptor::new

    fn TextRunDescriptor::new(range? : TextRange, direction? : TextDirection, fallback? : FontFallbackRequest) -> TextRunDescriptor

    TextRunDescriptor::not_equal

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

    TextRunDescriptor::resource_descriptor

    fn TextRunDescriptor::resource_descriptor(self : TextRunDescriptor, text : Bytes, font_key? : RendererResourceKey, byte_size? : Int64) -> RendererResourceDescriptor

    Cache descriptor for a shaped or measured text run resource.

    TextRunDescriptor::resource_key

    fn TextRunDescriptor::resource_key(self : TextRunDescriptor, text : Bytes, font_key? : RendererResourceKey) -> RendererResourceKey

    Deterministic renderer cache key for a shaped or measured text run.

    TextRunDescriptor::resource_plan

    fn TextRunDescriptor::resource_plan(self : TextRunDescriptor, text : Bytes, font_key? : RendererResourceKey, text_byte_size? : Int64, font_byte_size? : Int64, fallback_byte_size? : Int64) -> RendererResourcePlan

    TextRunDescriptor::with_direction

    fn TextRunDescriptor::with_direction(self : TextRunDescriptor, direction : TextDirection) -> TextRunDescriptor

    TextRunDescriptor::with_fallback

    TextRunDescriptor::with_range

    TextShapingDescriptor

    pub(all) struct TextShapingDescriptor {
    run : TextRunDescriptor
    font_key : RendererResourceKey
    width : Float
    } derive(Eq,
    Debug
    )

    Value-layer request for shaping a text run with stable cache identity and explicit font/fallback dependencies.

    TextShapingDescriptor::equal

    TextShapingDescriptor::measurement_descriptor

    TextShapingDescriptor::new

    TextShapingDescriptor::not_equal

    TextShapingDescriptor::resource_descriptor

    fn TextShapingDescriptor::resource_descriptor(self : TextShapingDescriptor, text : Bytes, byte_size? : Int64) -> RendererResourceDescriptor

    TextShapingDescriptor::resource_key

    fn TextShapingDescriptor::resource_key(self : TextShapingDescriptor, text : Bytes) -> RendererResourceKey

    TextShapingDescriptor::resource_plan

    fn TextShapingDescriptor::resource_plan(self : TextShapingDescriptor, text : Bytes, shaping_byte_size? : Int64, text_byte_size? : Int64, font_byte_size? : Int64, fallback_byte_size? : Int64) -> RendererResourcePlan

    TextShapingDescriptor::shaped_run_descriptor

    fn TextShapingDescriptor::shaped_run_descriptor(self : TextShapingDescriptor, glyph_count? : Int, cluster_count? : Int, advance? : Point) -> ShapedTextRunDescriptor

    TextShapingDescriptor::with_font_key

    TextShapingDescriptor::with_run

    TextShapingDescriptor::with_width

    fn TextShapingDescriptor::with_width(self : TextShapingDescriptor, width : Float) -> TextShapingDescriptor

    TileMode

    pub(all) enum TileMode {
    Clamp
    Repeat
    Mirror
    Decal
    } derive(Eq,
    Debug
    )

    Sampling behavior when coordinates land outside shader bounds.
    impl Default for TileMode

    TileMode::default

    fn TileMode::default() -> TileMode

    TileMode::equal

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

    TileMode::not_equal

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

    TileMode::to_repr

    TileMode::to_skia_ordinal

    fn TileMode::to_skia_ordinal(self : TileMode) -> Int

    WindowSurfaceDescriptor

    pub(all) struct WindowSurfaceDescriptor {
    window_id : Bytes
    logical_size : Size
    physical_size : ISize
    device_pixel_ratio : Float
    origin : SurfaceOrigin
    sample_count : Int
    stencil_bits : Int
    present_mode : SurfacePresentMode
    max_frames_in_flight : Int
    } derive(Eq,
    Debug
    )

    Stable value-layer contract for a native window-backed render target.

    window_id is an owned, stable identity token chosen by the host GUI layer; it should identify the window/swapchain without borrowing a platform handle.

    WindowSurfaceDescriptor::dimensions

    WindowSurfaceDescriptor::equal

    WindowSurfaceDescriptor::from_physical_size

    fn WindowSurfaceDescriptor::from_physical_size(window_id : Bytes, physical_size : ISize, device_pixel_ratio? : Float, origin? : SurfaceOrigin, sample_count? : Int, stencil_bits? : Int, present_mode? : SurfacePresentMode, max_frames_in_flight? : Int) -> WindowSurfaceDescriptor

    WindowSurfaceDescriptor::gpu_target_descriptor

    fn WindowSurfaceDescriptor::gpu_target_descriptor(self : WindowSurfaceDescriptor, budget? : SurfaceBudget, gpu_context_key? : RendererResourceKey?) -> SurfaceTargetDescriptor

    WindowSurfaceDescriptor::has_window_id

    fn WindowSurfaceDescriptor::has_window_id(self : WindowSurfaceDescriptor) -> Bool

    WindowSurfaceDescriptor::is_empty

    WindowSurfaceDescriptor::logical_dimensions

    fn WindowSurfaceDescriptor::logical_dimensions(self : WindowSurfaceDescriptor) -> Size

    WindowSurfaceDescriptor::new

    fn WindowSurfaceDescriptor::new(window_id? : Bytes, logical_size? : Size, physical_size? : ISize, device_pixel_ratio? : Float, origin? : SurfaceOrigin, sample_count? : Int, stencil_bits? : Int, present_mode? : SurfacePresentMode, max_frames_in_flight? : Int) -> WindowSurfaceDescriptor

    WindowSurfaceDescriptor::not_equal

    WindowSurfaceDescriptor::resource_descriptor

    fn WindowSurfaceDescriptor::resource_descriptor(self : WindowSurfaceDescriptor, byte_size? : Int64) -> RendererResourceDescriptor

    WindowSurfaceDescriptor::resource_key

    WindowSurfaceDescriptor::resource_plan

    fn WindowSurfaceDescriptor::resource_plan(self : WindowSurfaceDescriptor, byte_size? : Int64) -> RendererResourcePlan

    WindowSurfaceDescriptor::surface_descriptor

    WindowSurfaceDescriptor::target_descriptor

    WindowSurfaceDescriptor::with_device_pixel_ratio

    fn WindowSurfaceDescriptor::with_device_pixel_ratio(self : WindowSurfaceDescriptor, device_pixel_ratio : Float) -> WindowSurfaceDescriptor

    WindowSurfaceDescriptor::with_logical_size

    fn WindowSurfaceDescriptor::with_logical_size(self : WindowSurfaceDescriptor, logical_size : Size) -> WindowSurfaceDescriptor

    WindowSurfaceDescriptor::with_max_frames_in_flight

    fn WindowSurfaceDescriptor::with_max_frames_in_flight(self : WindowSurfaceDescriptor, max_frames_in_flight : Int) -> WindowSurfaceDescriptor

    WindowSurfaceDescriptor::with_physical_size

    fn WindowSurfaceDescriptor::with_physical_size(self : WindowSurfaceDescriptor, physical_size : ISize) -> WindowSurfaceDescriptor

    WindowSurfaceDescriptor::with_present_mode

    WindowSurfaceDescriptor::with_window_id

    fn WindowSurfaceDescriptor::with_window_id(self : WindowSurfaceDescriptor, window_id : Bytes) -> WindowSurfaceDescriptor

    binding_status

    fn binding_status() -> String

    Project status for the current package.

    The value-layer types are usable today. Native Skia object bindings are introduced separately so their ownership and linker requirements stay explicit.