MoonBit bindings for the Skia Graphics Library
Dependencies
cd scripts/native_smoke
moon run --target native ..\scripts\check-fallback.ps1bash scripts/fetch-release-skia.sh --platform auto --arch auto --print-envbash scripts/fetch-release-skia.sh --platform harmonyos --arch arm64 --link-mode static --print-env.\scripts\fetch-release-skia.ps1 -Platform auto -Arch auto -PrintEnv.\scripts\windows-accept-real-skia-smoke.ps1 -LogDir logs `
-SkiaInclude C:\path\to\skia `
-SkiaLibDir C:\path\to\skia\out\Staticbash 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/Staticbash 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/Staticbash scripts/macos-accept-real-skia-smoke.sh --log-dir logs \
--skia-provider source \
--work-dir .skia-cache/macosbash scripts/install-linux-smoke-deps.sh
bash scripts/linux-accept-real-skia-smoke.sh --work-dir .skia-cache/linuxbash scripts/linux-accept-and-pin-skia.sh --work-dir .skia-cache/linux///|
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()))
}impl Default for AddPathModefn ColorFilterDescriptor::resource_descriptor(self : ColorFilterDescriptor, byte_size? : Int64) -> RendererResourceDescriptorimpl Default for EncodedImageFormatimpl Default for FilterModepub(all) struct FontDescriptor {
typeface_key : RendererResourceKey
size : Float
scale_x : Float
skew_x : Float
} derive(Eq, Debug)fn FontDescriptor::from_typeface(typeface_key : RendererResourceKey, size? : Float) -> FontDescriptorfn FontDescriptor::new(typeface_key? : RendererResourceKey, size? : Float, scale_x? : Float, skew_x? : Float) -> FontDescriptorfn FontDescriptor::resource_descriptor(self : FontDescriptor, byte_size? : Int64) -> RendererResourceDescriptorfn FontDescriptor::with_typeface_key(self : FontDescriptor, typeface_key : RendererResourceKey) -> FontDescriptorfn FontFallbackChain::new(primary_family? : Bytes, fallback_families? : Array[Bytes]) -> FontFallbackChainpub(all) struct FontFallbackMatchDescriptor {
request : FontFallbackRequest
matched_family : Bytes
fallback_index : Int
synthetic : Bool
} derive(Eq, Debug)fn FontFallbackMatchDescriptor::font_descriptor(self : FontFallbackMatchDescriptor, size? : Float, scale_x? : Float, skew_x? : Float) -> FontDescriptorfn FontFallbackMatchDescriptor::new(request? : FontFallbackRequest, matched_family? : Bytes, fallback_index? : Int, synthetic? : Bool) -> FontFallbackMatchDescriptorfn FontFallbackMatchDescriptor::resource_descriptor(self : FontFallbackMatchDescriptor, byte_size? : Int64) -> RendererResourceDescriptorfn FontFallbackMatchDescriptor::resource_key(self : FontFallbackMatchDescriptor) -> RendererResourceKeyfn FontFallbackMatchDescriptor::resource_plan(self : FontFallbackMatchDescriptor, size? : Float, scale_x? : Float, skew_x? : Float, match_byte_size? : Int64, font_byte_size? : Int64) -> RendererResourcePlanpub(all) struct FontFallbackRequest {
families : FontFallbackChain
bcp47 : Array[Bytes]
character : Int
style : FontStyleRequest
} derive(Eq, Debug)fn FontFallbackRequest::font_descriptor(self : FontFallbackRequest, size? : Float, scale_x? : Float, skew_x? : Float) -> FontDescriptorfn FontFallbackRequest::match_descriptor(self : FontFallbackRequest, matched_family : Bytes, fallback_index? : Int, synthetic? : Bool) -> FontFallbackMatchDescriptorfn FontFallbackRequest::new(families? : FontFallbackChain, bcp47? : Array[Bytes], character? : Int, style? : FontStyleRequest) -> FontFallbackRequestfn FontFallbackRequest::resolution_descriptor(self : FontFallbackRequest, matched_family : Bytes, fallback_index? : Int, synthetic? : Bool) -> FontFallbackResolutionDescriptorfn FontFallbackRequest::resource_descriptor(self : FontFallbackRequest, byte_size? : Int64) -> RendererResourceDescriptorfn FontFallbackRequest::resource_plan(self : FontFallbackRequest, size? : Float, scale_x? : Float, skew_x? : Float, fallback_byte_size? : Int64, font_byte_size? : Int64) -> RendererResourcePlanfn FontFallbackRequest::with_character(self : FontFallbackRequest, character : Int) -> FontFallbackRequestfn FontFallbackRequest::with_style(self : FontFallbackRequest, style : FontStyleRequest) -> FontFallbackRequestpub(all) struct FontFallbackResolutionDescriptor {
request : FontFallbackRequest
resolved_match : FontFallbackMatchDescriptor
} derive(Eq, Debug)fn FontFallbackResolutionDescriptor::font_descriptor(self : FontFallbackResolutionDescriptor, size? : Float, scale_x? : Float, skew_x? : Float) -> FontDescriptorfn FontFallbackResolutionDescriptor::matched_in_request(self : FontFallbackResolutionDescriptor) -> Boolfn FontFallbackResolutionDescriptor::new(request? : FontFallbackRequest, resolved_match? : FontFallbackMatchDescriptor) -> FontFallbackResolutionDescriptorfn FontFallbackResolutionDescriptor::resource_descriptor(self : FontFallbackResolutionDescriptor, byte_size? : Int64) -> RendererResourceDescriptorfn FontFallbackResolutionDescriptor::resource_key(self : FontFallbackResolutionDescriptor) -> RendererResourceKeyfn 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) -> RendererResourcePlanfn FontFallbackResolutionDescriptor::source_family(self : FontFallbackResolutionDescriptor) -> Bytes?impl Default for FontStyleRequestimpl Default for GpuContextBackendpub(all) struct GpuContextDescriptor {
backend : GpuContextBackend
id : Bytes
adapter_id : Bytes
device_id : Bytes
queue_family_index : Int
protected_context : Bool
} derive(Eq, Debug)fn GpuContextDescriptor::direct3d12(id : Bytes, adapter_id? : Bytes, device_id? : Bytes) -> GpuContextDescriptorfn GpuContextDescriptor::metal(id : Bytes, adapter_id? : Bytes, device_id? : Bytes) -> GpuContextDescriptorfn GpuContextDescriptor::new(backend? : GpuContextBackend, id? : Bytes, adapter_id? : Bytes, device_id? : Bytes, queue_family_index? : Int, protected_context? : Bool) -> GpuContextDescriptorfn GpuContextDescriptor::opengl(id : Bytes, adapter_id? : Bytes, device_id? : Bytes) -> GpuContextDescriptorfn GpuContextDescriptor::resource_descriptor(self : GpuContextDescriptor, byte_size? : Int64) -> RendererResourceDescriptorfn GpuContextDescriptor::vulkan(id : Bytes, adapter_id? : Bytes, device_id? : Bytes, queue_family_index? : Int) -> GpuContextDescriptorfn GpuContextDescriptor::with_protected_context(self : GpuContextDescriptor, protected_context : Bool) -> GpuContextDescriptorfn ImageDescriptor::encoded(bytes : Bytes, format? : EncodedImageFormat?, dimensions? : ISize?) -> ImageDescriptor?fn ImageDescriptor::resource_descriptor(self : ImageDescriptor, byte_size? : Int64) -> RendererResourceDescriptorfn ImageFilterDescriptor::resource_descriptor(self : ImageFilterDescriptor, byte_size? : Int64) -> RendererResourceDescriptorfn MaskFilterDescriptor::resource_descriptor(self : MaskFilterDescriptor, byte_size? : Int64) -> RendererResourceDescriptorpub(all) struct MeasuredTextRunDescriptor {
measurement : TextMeasurementDescriptor
advance : Float
bounds : Rect?
} derive(Eq, Debug)fn MeasuredTextRunDescriptor::new(measurement? : TextMeasurementDescriptor, advance? : Float, bounds? : Rect?) -> MeasuredTextRunDescriptorfn MeasuredTextRunDescriptor::resource_descriptor(self : MeasuredTextRunDescriptor, text : Bytes, byte_size? : Int64) -> RendererResourceDescriptorfn MeasuredTextRunDescriptor::resource_key(self : MeasuredTextRunDescriptor, text : Bytes) -> RendererResourceKeyfn 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) -> RendererResourcePlanimpl Default for MipmapModepub(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)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) -> Paintimpl Default for PaintStylefn Path::add_circle(self : Path, center : Point, radius : Float, direction? : PathDirection) -> Pathfn Path::add_round_rect(self : Path, rect : Rect, rx : Float, ry : Float, direction? : PathDirection) -> Pathimpl Default for PathDirectionimpl Default for PathFillTypepub(all) struct PathRect {
rect : Rect
is_closed : Bool
direction : PathDirection
} derive(Eq, Debug)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)fn RenderCommand::draw_arc(oval : Rect, start_angle : Float, sweep_angle : Float, use_center : Bool, paint? : Paint) -> RenderCommandfn RenderCommand::draw_image_rect(image : ImageDescriptor, src : Rect, dst : Rect, paint? : Paint, sampling? : SamplingOptions) -> RenderCommandfn RenderCommand::draw_path_shader(path : Path, shader : ShaderDescriptor, paint? : Paint) -> RenderCommandfn RenderCommand::draw_points(points : Array[Point], paint? : Paint, mode? : PointMode) -> RenderCommandfn RenderCommand::draw_rect_shader(rect : Rect, shader : ShaderDescriptor, paint? : Paint) -> RenderCommandfn RenderCommand::draw_round_rect(rect : Rect, rx : Float, ry : Float, paint? : Paint) -> RenderCommandfn RenderCommand::draw_round_rect_shader(rect : Rect, rx : Float, ry : Float, shader : ShaderDescriptor, paint? : Paint) -> RenderCommandfn RenderCommand::draw_shaped_glyph_run_utf8(text : Bytes, glyph_run : ShapedGlyphRunDescriptor, origin : Point, paint? : Paint) -> RenderCommandfn RenderCommand::draw_text_run_utf8(text : Bytes, origin : Point, descriptor? : TextRunDescriptor?, font_key? : RendererResourceKey, paint? : Paint) -> RenderCommandfn RenderCommand::save_layer(bounds? : Rect?, paint? : Paint, color_filter? : ColorFilterDescriptor?, image_filter? : ImageFilterDescriptor?, mask_filter? : MaskFilterDescriptor?) -> RenderCommandpub(all) struct RenderCommandList {
pass : RenderPassDescriptor
commands : Array[RenderCommand]
} derive(Eq, Debug)fn RenderCommandList::append(self : RenderCommandList, command : RenderCommand) -> RenderCommandListfn RenderCommandList::clip_path(self : RenderCommandList, path : Path, op? : ClipOp) -> RenderCommandListfn RenderCommandList::clip_rect(self : RenderCommandList, rect : Rect, op? : ClipOp) -> RenderCommandListfn RenderCommandList::clip_rrect(self : RenderCommandList, rrect : RRect, op? : ClipOp) -> RenderCommandListfn RenderCommandList::declare_resource(self : RenderCommandList, descriptor : RendererResourceDescriptor) -> RenderCommandListfn RenderCommandList::declare_resources(self : RenderCommandList, descriptors : Array[RendererResourceDescriptor]) -> RenderCommandListfn RenderCommandList::draw_arc(self : RenderCommandList, oval : Rect, start_angle : Float, sweep_angle : Float, use_center : Bool, paint? : Paint) -> RenderCommandListfn RenderCommandList::draw_circle(self : RenderCommandList, center : Point, radius : Float, paint? : Paint) -> RenderCommandListfn RenderCommandList::draw_color(self : RenderCommandList, color : Color, blend_mode? : BlendMode) -> RenderCommandListfn RenderCommandList::draw_drrect(self : RenderCommandList, outer : RRect, inner : RRect, paint? : Paint) -> RenderCommandListfn RenderCommandList::draw_image(self : RenderCommandList, image : ImageDescriptor, top_left : Point) -> RenderCommandListfn RenderCommandList::draw_image_rect(self : RenderCommandList, image : ImageDescriptor, src : Rect, dst : Rect, paint? : Paint, sampling? : SamplingOptions) -> RenderCommandListfn RenderCommandList::draw_line(self : RenderCommandList, start : Point, end : Point, paint? : Paint) -> RenderCommandListfn RenderCommandList::draw_oval(self : RenderCommandList, oval : Rect, paint? : Paint) -> RenderCommandListfn RenderCommandList::draw_paint_shader(self : RenderCommandList, shader : ShaderDescriptor, paint? : Paint) -> RenderCommandListfn RenderCommandList::draw_path(self : RenderCommandList, path : Path, paint? : Paint) -> RenderCommandListfn RenderCommandList::draw_path_shader(self : RenderCommandList, path : Path, shader : ShaderDescriptor, paint? : Paint) -> RenderCommandListfn RenderCommandList::draw_point(self : RenderCommandList, point : Point, paint? : Paint) -> RenderCommandListfn RenderCommandList::draw_points(self : RenderCommandList, points : Array[Point], paint? : Paint, mode? : PointMode) -> RenderCommandListfn RenderCommandList::draw_rect(self : RenderCommandList, rect : Rect, paint? : Paint) -> RenderCommandListfn RenderCommandList::draw_rect_shader(self : RenderCommandList, rect : Rect, shader : ShaderDescriptor, paint? : Paint) -> RenderCommandListfn RenderCommandList::draw_round_rect(self : RenderCommandList, rect : Rect, rx : Float, ry : Float, paint? : Paint) -> RenderCommandListfn RenderCommandList::draw_round_rect_shader(self : RenderCommandList, rect : Rect, rx : Float, ry : Float, shader : ShaderDescriptor, paint? : Paint) -> RenderCommandListfn RenderCommandList::draw_rrect(self : RenderCommandList, rrect : RRect, paint? : Paint) -> RenderCommandListfn RenderCommandList::draw_shaped_glyph_run_utf8(self : RenderCommandList, text : Bytes, glyph_run : ShapedGlyphRunDescriptor, origin : Point, paint? : Paint) -> RenderCommandListfn RenderCommandList::draw_text_run_utf8(self : RenderCommandList, text : Bytes, origin : Point, descriptor? : TextRunDescriptor?, font_key? : RendererResourceKey, paint? : Paint) -> RenderCommandListfn RenderCommandList::draw_text_utf8(self : RenderCommandList, text : Bytes, origin : Point, paint? : Paint) -> RenderCommandListfn RenderCommandList::for_target(target : SurfaceTargetDescriptor, bounds? : IRect?, load_op? : RenderPassLoadOp, clear_color? : Color?, store_op? : RenderPassStoreOp?) -> RenderCommandListfn RenderCommandList::frame_descriptor(self : RenderCommandList, target : SurfaceTargetDescriptor) -> RenderFrameDescriptorfn RenderCommandList::resource_descriptors(self : RenderCommandList) -> Array[RendererResourceDescriptor]fn RenderCommandList::save_layer(self : RenderCommandList, bounds? : Rect?, paint? : Paint, color_filter? : ColorFilterDescriptor?, image_filter? : ImageFilterDescriptor?, mask_filter? : MaskFilterDescriptor?) -> RenderCommandListfn RenderCommandList::text_run_resource_keys(self : RenderCommandList) -> Array[RendererResourceKey]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)pub(all) struct RenderFrameDescriptor {
target : SurfaceTargetDescriptor
command_list : RenderCommandList
resource_plan : RendererResourcePlan
stats : RenderCommandStats
touched_bounds : Rect?
} derive(Eq, Debug)fn RenderFrameDescriptor::cache_resources(self : RenderFrameDescriptor, cache : ResourceCache[RendererResourceKey, RendererResourceDescriptor]) -> Intfn RenderFrameDescriptor::cacheable_resource_plan(self : RenderFrameDescriptor) -> RendererResourcePlanfn RenderFrameDescriptor::cached_cacheable_resource_plan(self : RenderFrameDescriptor, cache : ResourceCache[RendererResourceKey, RendererResourceDescriptor]) -> RendererResourcePlanfn RenderFrameDescriptor::finalization_descriptor(self : RenderFrameDescriptor, frame_index? : Int) -> RenderFrameFinalizationDescriptorfn RenderFrameDescriptor::finalization_resource_plan(self : RenderFrameDescriptor, frame_index? : Int) -> RendererResourcePlanfn RenderFrameDescriptor::missing_cacheable_resource_plan(self : RenderFrameDescriptor, cache : ResourceCache[RendererResourceKey, RendererResourceDescriptor]) -> RendererResourcePlanfn RenderFrameDescriptor::new(target : SurfaceTargetDescriptor, command_list : RenderCommandList) -> RenderFrameDescriptorfn RenderFrameDescriptor::present_descriptor(self : RenderFrameDescriptor, frame_index? : Int, buffer_index? : Int) -> SurfacePresentDescriptor?fn RenderFrameDescriptor::present_resource_plan(self : RenderFrameDescriptor, frame_index? : Int, buffer_index? : Int) -> RendererResourcePlanfn RenderFrameDescriptor::submission_descriptor(self : RenderFrameDescriptor, frame_index? : Int, buffer_index? : Int) -> RenderFrameSubmissionDescriptorfn RenderFrameDescriptor::uncacheable_resource_plan(self : RenderFrameDescriptor) -> RendererResourcePlanfn RenderFrameDescriptor::validation_status(self : RenderFrameDescriptor) -> RenderFrameValidationStatuspub(all) struct RenderFrameFinalizationDescriptor {
frame : RenderFrameDescriptor
frame_index : Int
validation_status : RenderFrameValidationStatus
finalization : SurfaceFinalizationDescriptor?
resource_plan : RendererResourcePlan
} derive(Eq, Debug)fn RenderFrameFinalizationDescriptor::cache_resources(self : RenderFrameFinalizationDescriptor, cache : ResourceCache[RendererResourceKey, RendererResourceDescriptor]) -> Intfn RenderFrameFinalizationDescriptor::cacheable_resource_plan(self : RenderFrameFinalizationDescriptor) -> RendererResourcePlanfn RenderFrameFinalizationDescriptor::cached_cacheable_resource_plan(self : RenderFrameFinalizationDescriptor, cache : ResourceCache[RendererResourceKey, RendererResourceDescriptor]) -> RendererResourcePlanfn RenderFrameFinalizationDescriptor::gpu_backed_resource_plan(self : RenderFrameFinalizationDescriptor) -> RendererResourcePlanfn RenderFrameFinalizationDescriptor::has_finalization(self : RenderFrameFinalizationDescriptor) -> Boolfn RenderFrameFinalizationDescriptor::missing_cacheable_resource_plan(self : RenderFrameFinalizationDescriptor, cache : ResourceCache[RendererResourceKey, RendererResourceDescriptor]) -> RendererResourcePlanfn RenderFrameFinalizationDescriptor::new(frame : RenderFrameDescriptor, frame_index? : Int) -> RenderFrameFinalizationDescriptorfn RenderFrameFinalizationDescriptor::requires_gpu_context(self : RenderFrameFinalizationDescriptor) -> Boolfn RenderFrameFinalizationDescriptor::uncacheable_resource_plan(self : RenderFrameFinalizationDescriptor) -> RendererResourcePlanpub(all) struct RenderFrameSubmissionDescriptor {
frame : RenderFrameDescriptor
frame_index : Int
validation_status : RenderFrameValidationStatus
present : SurfacePresentDescriptor?
resource_plan : RendererResourcePlan
} derive(Eq, Debug)fn RenderFrameSubmissionDescriptor::cache_resources(self : RenderFrameSubmissionDescriptor, cache : ResourceCache[RendererResourceKey, RendererResourceDescriptor]) -> Intfn RenderFrameSubmissionDescriptor::cacheable_resource_plan(self : RenderFrameSubmissionDescriptor) -> RendererResourcePlanfn RenderFrameSubmissionDescriptor::cached_cacheable_resource_plan(self : RenderFrameSubmissionDescriptor, cache : ResourceCache[RendererResourceKey, RendererResourceDescriptor]) -> RendererResourcePlanfn RenderFrameSubmissionDescriptor::gpu_backed_resource_plan(self : RenderFrameSubmissionDescriptor) -> RendererResourcePlanfn RenderFrameSubmissionDescriptor::missing_cacheable_resource_plan(self : RenderFrameSubmissionDescriptor, cache : ResourceCache[RendererResourceKey, RendererResourceDescriptor]) -> RendererResourcePlanfn RenderFrameSubmissionDescriptor::new(frame : RenderFrameDescriptor, frame_index? : Int, buffer_index? : Int) -> RenderFrameSubmissionDescriptorfn RenderFrameSubmissionDescriptor::uncacheable_resource_plan(self : RenderFrameSubmissionDescriptor) -> RendererResourcePlanpub(all) struct RenderPassDescriptor {
surface : SurfaceDescriptor
target_key : RendererResourceKey?
bounds : IRect
load_op : RenderPassLoadOp
clear_color : Color?
store_op : RenderPassStoreOp
} derive(Eq, Debug)fn RenderPassDescriptor::clear(surface : SurfaceDescriptor, color : Color, bounds? : IRect?, store_op? : RenderPassStoreOp) -> RenderPassDescriptorfn RenderPassDescriptor::clear_target(target : SurfaceTargetDescriptor, color : Color, bounds? : IRect?, store_op? : RenderPassStoreOp?) -> RenderPassDescriptorfn RenderPassDescriptor::for_target(target : SurfaceTargetDescriptor, bounds? : IRect?, load_op? : RenderPassLoadOp, clear_color? : Color?, store_op? : RenderPassStoreOp?) -> RenderPassDescriptorfn RenderPassDescriptor::is_bound_to_target(self : RenderPassDescriptor, target : SurfaceTargetDescriptor) -> Boolfn RenderPassDescriptor::new(surface : SurfaceDescriptor, target_key? : RendererResourceKey?, bounds? : IRect?, load_op? : RenderPassLoadOp, clear_color? : Color?, store_op? : RenderPassStoreOp) -> RenderPassDescriptorfn RenderPassDescriptor::present(surface : SurfaceDescriptor, bounds? : IRect?, clear_color? : Color?) -> RenderPassDescriptorfn RenderPassDescriptor::resource_descriptor(self : RenderPassDescriptor) -> RendererResourceDescriptorfn RenderPassDescriptor::with_bounds(self : RenderPassDescriptor, bounds : IRect) -> RenderPassDescriptorfn RenderPassDescriptor::with_clear_color(self : RenderPassDescriptor, color : Color) -> RenderPassDescriptorfn RenderPassDescriptor::with_load_op(self : RenderPassDescriptor, load_op : RenderPassLoadOp) -> RenderPassDescriptorfn RenderPassDescriptor::with_store_op(self : RenderPassDescriptor, store_op : RenderPassStoreOp) -> RenderPassDescriptorimpl Default for RenderPassLoadOpimpl Default for RenderPassStoreOppub(all) struct RendererResourceDescriptor {
key : RendererResourceKey
byte_size : Int64
cacheable : Bool
} derive(Eq, Debug)fn RendererResourceDescriptor::color_filter(id : Bytes, byte_size? : Int64) -> RendererResourceDescriptorfn RendererResourceDescriptor::gpu_context(id : Bytes, byte_size? : Int64) -> RendererResourceDescriptorfn RendererResourceDescriptor::gpu_surface(id : Bytes, byte_size? : Int64) -> RendererResourceDescriptorfn RendererResourceDescriptor::image_filter(id : Bytes, byte_size? : Int64) -> RendererResourceDescriptorfn RendererResourceDescriptor::mask_filter(id : Bytes, byte_size? : Int64) -> RendererResourceDescriptorfn RendererResourceDescriptor::new(key : RendererResourceKey, byte_size? : Int64, cacheable? : Bool) -> RendererResourceDescriptorfn RendererResourceDescriptor::of_kind(kind : RendererResourceKind, id : Bytes, byte_size? : Int64, cacheable? : Bool) -> RendererResourceDescriptorfn RendererResourceDescriptor::surface(id : Bytes, byte_size? : Int64) -> RendererResourceDescriptorfn RendererResourceDescriptor::text_run(id : Bytes, byte_size? : Int64) -> RendererResourceDescriptorfn RendererResourceDescriptor::typeface(id : Bytes, byte_size? : Int64) -> RendererResourceDescriptorfn RendererResourceDescriptor::uncacheable(self : RendererResourceDescriptor) -> RendererResourceDescriptorfn RendererResourceDescriptor::with_byte_size(self : RendererResourceDescriptor, byte_size : Int64) -> RendererResourceDescriptorpub(all) struct RendererResourceKey {
kind : RendererResourceKind
id : Bytes
} derive(Eq, Hash, Debug)pub(all) struct RendererResourcePlan {
descriptors : Array[RendererResourceDescriptor]
byte_size : Int64
cacheable_count : Int
uncacheable_count : Int
gpu_backed_count : Int
} derive(Eq, Debug)fn RendererResourcePlan::byte_size_for_kind(self : RendererResourcePlan, kind : RendererResourceKind) -> Int64fn RendererResourcePlan::cacheable_descriptors(self : RendererResourcePlan) -> Array[RendererResourceDescriptor]fn RendererResourcePlan::cacheable_resource_plan(self : RendererResourcePlan) -> RendererResourcePlanfn RendererResourcePlan::contains_key(self : RendererResourcePlan, key : RendererResourceKey) -> Boolfn RendererResourcePlan::count_kind(self : RendererResourcePlan, kind : RendererResourceKind) -> Intfn RendererResourcePlan::descriptor_for_key(self : RendererResourcePlan, key : RendererResourceKey) -> RendererResourceDescriptor?fn RendererResourcePlan::descriptors_of_kind(self : RendererResourcePlan, kind : RendererResourceKind) -> Array[RendererResourceDescriptor]fn RendererResourcePlan::gpu_backed_descriptors(self : RendererResourcePlan) -> Array[RendererResourceDescriptor]fn RendererResourcePlan::gpu_backed_resource_plan(self : RendererResourcePlan) -> RendererResourcePlanfn RendererResourcePlan::new(descriptors : Array[RendererResourceDescriptor]) -> RendererResourcePlanfn RendererResourcePlan::uncacheable_descriptors(self : RendererResourcePlan) -> Array[RendererResourceDescriptor]fn RendererResourcePlan::uncacheable_resource_plan(self : RendererResourcePlan) -> RendererResourcePlanpub(all) struct ResourceCache[K, V] {
// private fields
}fn ResourceCache::cached_cacheable_resource_plan(self : ResourceCache[RendererResourceKey, RendererResourceDescriptor], plan : RendererResourcePlan) -> RendererResourcePlanfn ResourceCache::contains_resource_descriptor(self : ResourceCache[RendererResourceKey, RendererResourceDescriptor], descriptor : RendererResourceDescriptor) -> Boolfn ResourceCache::contains_resource_plan(self : ResourceCache[RendererResourceKey, RendererResourceDescriptor], plan : RendererResourcePlan) -> Boolfn[K : Hash + Eq, V] ResourceCache::insert(self : ResourceCache[K, V], key : K, value : V, byte_size? : Int64) -> Boolfn ResourceCache::insert_resource_descriptor(self : ResourceCache[RendererResourceKey, RendererResourceDescriptor], descriptor : RendererResourceDescriptor) -> Boolfn ResourceCache::insert_resource_plan(self : ResourceCache[RendererResourceKey, RendererResourceDescriptor], plan : RendererResourcePlan) -> Intfn ResourceCache::missing_cacheable_resource_plan(self : ResourceCache[RendererResourceKey, RendererResourceDescriptor], plan : RendererResourcePlan) -> RendererResourcePlanfn[K : Hash + Eq, V] ResourceCache::set_max_bytes(self : ResourceCache[K, V], max_bytes : Int64) -> Unitpub(all) struct SamplingOptions {
filter : FilterMode
mipmap : MipmapMode
cubic : CubicResampler?
} derive(Eq, Debug)impl Default for SamplingOptionsfn ShaderDescriptor::linear_gradient(start : Point, end : Point, start_color : Color, end_color : Color, tile_mode? : TileMode) -> ShaderDescriptor?fn ShaderDescriptor::radial_gradient(center : Point, radius : Float, inner_color : Color, outer_color : Color, tile_mode? : TileMode) -> ShaderDescriptor?fn ShaderDescriptor::resource_descriptor(self : ShaderDescriptor, byte_size? : Int64) -> RendererResourceDescriptorfn ShapedGlyphRunDescriptor::new(shaped_run? : ShapedTextRunDescriptor, glyph_ids? : Array[Int], positions? : Array[Point], clusters? : Array[Int]) -> ShapedGlyphRunDescriptorfn ShapedGlyphRunDescriptor::resource_descriptor(self : ShapedGlyphRunDescriptor, text : Bytes, byte_size? : Int64) -> RendererResourceDescriptorfn ShapedGlyphRunDescriptor::resource_key(self : ShapedGlyphRunDescriptor, text : Bytes) -> RendererResourceKeyfn 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) -> RendererResourcePlanpub(all) struct ShapedTextRunDescriptor {
shaping : TextShapingDescriptor
glyph_count : Int
cluster_count : Int
advance : Point
} derive(Eq, Debug)fn ShapedTextRunDescriptor::glyph_run_descriptor(self : ShapedTextRunDescriptor, glyph_ids? : Array[Int], positions? : Array[Point], clusters? : Array[Int]) -> ShapedGlyphRunDescriptorfn ShapedTextRunDescriptor::new(shaping? : TextShapingDescriptor, glyph_count? : Int, cluster_count? : Int, advance? : Point) -> ShapedTextRunDescriptorfn ShapedTextRunDescriptor::resource_descriptor(self : ShapedTextRunDescriptor, text : Bytes, byte_size? : Int64) -> RendererResourceDescriptorfn ShapedTextRunDescriptor::resource_key(self : ShapedTextRunDescriptor, text : Bytes) -> RendererResourceKeyfn 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) -> RendererResourcePlanimpl Default for StrokeJoinimpl Default for SurfaceBackendimpl Default for SurfaceBudgetpub(all) struct SurfaceDescriptor {
backend : SurfaceBackend
image_info : ImageInfo
origin : SurfaceOrigin
sample_count : Int
stencil_bits : Int
budget : SurfaceBudget
} derive(Eq, Debug)fn SurfaceDescriptor::gpu_n32_premul(size : ISize, origin? : SurfaceOrigin, sample_count? : Int, stencil_bits? : Int, budget? : SurfaceBudget) -> SurfaceDescriptorfn SurfaceDescriptor::new(backend : SurfaceBackend, image_info : ImageInfo, origin? : SurfaceOrigin, sample_count? : Int, stencil_bits? : Int, budget? : SurfaceBudget) -> SurfaceDescriptorfn SurfaceDescriptor::resource_descriptor(self : SurfaceDescriptor, byte_size? : Int64) -> RendererResourceDescriptorfn SurfaceDescriptor::window_n32_premul(size : ISize, origin? : SurfaceOrigin, sample_count? : Int, stencil_bits? : Int) -> SurfaceDescriptorfn SurfaceDescriptor::with_backend(self : SurfaceDescriptor, backend : SurfaceBackend) -> SurfaceDescriptorfn SurfaceDescriptor::with_budget(self : SurfaceDescriptor, budget : SurfaceBudget) -> SurfaceDescriptorfn SurfaceDescriptor::with_dimensions(self : SurfaceDescriptor, dimensions : ISize) -> SurfaceDescriptorfn SurfaceDescriptor::with_image_info(self : SurfaceDescriptor, image_info : ImageInfo) -> SurfaceDescriptorfn SurfaceDescriptor::with_origin(self : SurfaceDescriptor, origin : SurfaceOrigin) -> SurfaceDescriptorfn SurfaceDescriptor::with_sample_count(self : SurfaceDescriptor, sample_count : Int) -> SurfaceDescriptorfn SurfaceDescriptor::with_stencil_bits(self : SurfaceDescriptor, stencil_bits : Int) -> SurfaceDescriptorpub(all) struct SurfaceFinalizationDescriptor {
target : SurfaceTargetDescriptor
frame_index : Int
} derive(Eq, Debug)fn SurfaceFinalizationDescriptor::new(target : SurfaceTargetDescriptor, frame_index? : Int) -> SurfaceFinalizationDescriptorfn SurfaceFinalizationDescriptor::requires_gpu_context(self : SurfaceFinalizationDescriptor) -> Boolfn SurfaceFinalizationDescriptor::resource_descriptor(self : SurfaceFinalizationDescriptor, byte_size? : Int64) -> RendererResourceDescriptorfn SurfaceFinalizationDescriptor::resource_descriptors(self : SurfaceFinalizationDescriptor, byte_size? : Int64) -> Array[RendererResourceDescriptor]fn SurfaceFinalizationDescriptor::resource_key(self : SurfaceFinalizationDescriptor) -> RendererResourceKeyfn SurfaceFinalizationDescriptor::resource_plan(self : SurfaceFinalizationDescriptor, byte_size? : Int64) -> RendererResourcePlanimpl Default for SurfaceOriginpub(all) struct SurfacePresentDescriptor {
target : SurfaceTargetDescriptor
frame_index : Int
buffer_index : Int
present_mode : SurfacePresentMode?
} derive(Eq, Debug)fn SurfacePresentDescriptor::new(target : SurfaceTargetDescriptor, frame_index? : Int, buffer_index? : Int) -> SurfacePresentDescriptorfn SurfacePresentDescriptor::resource_descriptor(self : SurfacePresentDescriptor, byte_size? : Int64) -> RendererResourceDescriptorfn SurfacePresentDescriptor::resource_descriptors(self : SurfacePresentDescriptor, byte_size? : Int64) -> Array[RendererResourceDescriptor]fn SurfacePresentDescriptor::resource_plan(self : SurfacePresentDescriptor, byte_size? : Int64) -> RendererResourcePlanimpl Default for SurfacePresentModepub(all) struct SurfaceTargetDescriptor {
surface : SurfaceDescriptor
target_id : Bytes
present_mode : SurfacePresentMode?
max_frames_in_flight : Int
gpu_context_key : RendererResourceKey?
} derive(Eq, Debug)fn SurfaceTargetDescriptor::finalization_descriptor(self : SurfaceTargetDescriptor, frame_index? : Int) -> SurfaceFinalizationDescriptorfn SurfaceTargetDescriptor::gpu_context_resource_descriptor(self : SurfaceTargetDescriptor) -> RendererResourceDescriptor?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) -> SurfaceTargetDescriptorfn SurfaceTargetDescriptor::new(surface : SurfaceDescriptor, present_mode? : SurfacePresentMode?, max_frames_in_flight? : Int, gpu_context_key? : RendererResourceKey?, target_id? : Bytes) -> SurfaceTargetDescriptorfn SurfaceTargetDescriptor::present_descriptor(self : SurfaceTargetDescriptor, frame_index? : Int, buffer_index? : Int) -> SurfacePresentDescriptorfn SurfaceTargetDescriptor::resource_descriptor(self : SurfaceTargetDescriptor, byte_size? : Int64) -> RendererResourceDescriptorfn SurfaceTargetDescriptor::resource_descriptors(self : SurfaceTargetDescriptor, byte_size? : Int64) -> Array[RendererResourceDescriptor]fn SurfaceTargetDescriptor::resource_plan(self : SurfaceTargetDescriptor, byte_size? : Int64) -> RendererResourcePlanfn 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) -> SurfaceTargetDescriptorfn SurfaceTargetDescriptor::with_dimensions(self : SurfaceTargetDescriptor, dimensions : ISize) -> SurfaceTargetDescriptorfn SurfaceTargetDescriptor::with_gpu_context(self : SurfaceTargetDescriptor, gpu_context : GpuContextDescriptor) -> SurfaceTargetDescriptorfn SurfaceTargetDescriptor::with_max_frames_in_flight(self : SurfaceTargetDescriptor, max_frames_in_flight : Int) -> SurfaceTargetDescriptorfn SurfaceTargetDescriptor::with_present_mode(self : SurfaceTargetDescriptor, present_mode : SurfacePresentMode) -> SurfaceTargetDescriptorfn SurfaceTargetDescriptor::with_target_id(self : SurfaceTargetDescriptor, target_id : Bytes) -> SurfaceTargetDescriptorfn SurfaceTargetDescriptor::without_gpu_context(self : SurfaceTargetDescriptor) -> SurfaceTargetDescriptorfn SurfaceTargetDescriptor::without_present(self : SurfaceTargetDescriptor) -> SurfaceTargetDescriptorfn SurfaceTargetDescriptor::without_target_id(self : SurfaceTargetDescriptor) -> SurfaceTargetDescriptorimpl Default for TextDirectionpub(all) struct TextMeasurementDescriptor {
run : TextRunDescriptor
font_key : RendererResourceKey
width : Float
measure_bounds : Bool
shape : Bool
} derive(Eq, Debug)fn TextMeasurementDescriptor::measured_run_descriptor(self : TextMeasurementDescriptor, advance? : Float, bounds? : Rect?) -> MeasuredTextRunDescriptorfn TextMeasurementDescriptor::new(run? : TextRunDescriptor, font_key? : RendererResourceKey, width? : Float, measure_bounds? : Bool, shape? : Bool) -> TextMeasurementDescriptorfn TextMeasurementDescriptor::resource_descriptor(self : TextMeasurementDescriptor, text : Bytes, byte_size? : Int64) -> RendererResourceDescriptorfn TextMeasurementDescriptor::resource_key(self : TextMeasurementDescriptor, text : Bytes) -> RendererResourceKeyfn TextMeasurementDescriptor::resource_plan(self : TextMeasurementDescriptor, text : Bytes, measurement_byte_size? : Int64, text_byte_size? : Int64, font_byte_size? : Int64, fallback_byte_size? : Int64) -> RendererResourcePlanfn TextMeasurementDescriptor::with_font_key(self : TextMeasurementDescriptor, font_key : RendererResourceKey) -> TextMeasurementDescriptorfn TextMeasurementDescriptor::with_measure_bounds(self : TextMeasurementDescriptor, measure_bounds : Bool) -> TextMeasurementDescriptorfn TextMeasurementDescriptor::with_run(self : TextMeasurementDescriptor, run : TextRunDescriptor) -> TextMeasurementDescriptorfn TextMeasurementDescriptor::with_shape(self : TextMeasurementDescriptor, shape : Bool) -> TextMeasurementDescriptorfn TextMeasurementDescriptor::with_width(self : TextMeasurementDescriptor, width : Float) -> TextMeasurementDescriptorpub(all) struct TextRunDescriptor {
range : TextRange
direction : TextDirection
fallback : FontFallbackRequest
} derive(Eq, Debug)fn TextRunDescriptor::new(range? : TextRange, direction? : TextDirection, fallback? : FontFallbackRequest) -> TextRunDescriptorfn TextRunDescriptor::resource_descriptor(self : TextRunDescriptor, text : Bytes, font_key? : RendererResourceKey, byte_size? : Int64) -> RendererResourceDescriptorfn TextRunDescriptor::resource_key(self : TextRunDescriptor, text : Bytes, font_key? : RendererResourceKey) -> RendererResourceKeyfn TextRunDescriptor::resource_plan(self : TextRunDescriptor, text : Bytes, font_key? : RendererResourceKey, text_byte_size? : Int64, font_byte_size? : Int64, fallback_byte_size? : Int64) -> RendererResourcePlanfn TextRunDescriptor::with_direction(self : TextRunDescriptor, direction : TextDirection) -> TextRunDescriptorfn TextRunDescriptor::with_fallback(self : TextRunDescriptor, fallback : FontFallbackRequest) -> TextRunDescriptorpub(all) struct TextShapingDescriptor {
run : TextRunDescriptor
font_key : RendererResourceKey
width : Float
} derive(Eq, Debug)fn TextShapingDescriptor::measurement_descriptor(self : TextShapingDescriptor) -> TextMeasurementDescriptorfn TextShapingDescriptor::new(run? : TextRunDescriptor, font_key? : RendererResourceKey, width? : Float) -> TextShapingDescriptorfn TextShapingDescriptor::resource_descriptor(self : TextShapingDescriptor, text : Bytes, byte_size? : Int64) -> RendererResourceDescriptorfn TextShapingDescriptor::resource_key(self : TextShapingDescriptor, text : Bytes) -> RendererResourceKeyfn TextShapingDescriptor::resource_plan(self : TextShapingDescriptor, text : Bytes, shaping_byte_size? : Int64, text_byte_size? : Int64, font_byte_size? : Int64, fallback_byte_size? : Int64) -> RendererResourcePlanfn TextShapingDescriptor::shaped_run_descriptor(self : TextShapingDescriptor, glyph_count? : Int, cluster_count? : Int, advance? : Point) -> ShapedTextRunDescriptorfn TextShapingDescriptor::with_font_key(self : TextShapingDescriptor, font_key : RendererResourceKey) -> TextShapingDescriptorfn TextShapingDescriptor::with_run(self : TextShapingDescriptor, run : TextRunDescriptor) -> TextShapingDescriptorfn TextShapingDescriptor::with_width(self : TextShapingDescriptor, width : Float) -> TextShapingDescriptorpub(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)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) -> WindowSurfaceDescriptorfn WindowSurfaceDescriptor::gpu_target_descriptor(self : WindowSurfaceDescriptor, budget? : SurfaceBudget, gpu_context_key? : RendererResourceKey?) -> SurfaceTargetDescriptorfn 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) -> WindowSurfaceDescriptorfn WindowSurfaceDescriptor::resource_descriptor(self : WindowSurfaceDescriptor, byte_size? : Int64) -> RendererResourceDescriptorfn WindowSurfaceDescriptor::resource_plan(self : WindowSurfaceDescriptor, byte_size? : Int64) -> RendererResourcePlanfn WindowSurfaceDescriptor::target_descriptor(self : WindowSurfaceDescriptor) -> SurfaceTargetDescriptorfn WindowSurfaceDescriptor::with_device_pixel_ratio(self : WindowSurfaceDescriptor, device_pixel_ratio : Float) -> WindowSurfaceDescriptorfn WindowSurfaceDescriptor::with_logical_size(self : WindowSurfaceDescriptor, logical_size : Size) -> WindowSurfaceDescriptorfn WindowSurfaceDescriptor::with_max_frames_in_flight(self : WindowSurfaceDescriptor, max_frames_in_flight : Int) -> WindowSurfaceDescriptorfn WindowSurfaceDescriptor::with_physical_size(self : WindowSurfaceDescriptor, physical_size : ISize) -> WindowSurfaceDescriptorfn WindowSurfaceDescriptor::with_present_mode(self : WindowSurfaceDescriptor, present_mode : SurfacePresentMode) -> WindowSurfaceDescriptorfn WindowSurfaceDescriptor::with_window_id(self : WindowSurfaceDescriptor, window_id : Bytes) -> WindowSurfaceDescriptorfn binding_status() -> StringMoonBit bindings for the Skia Graphics Library
Dependencies