README

moonbit-community/harfbuzz/draw does not have a README file

#
DrawClosePathFunc

type DrawClosePathFunc[T] = (T, DrawState) -> Unit

#
DrawCubicToFunc

type DrawCubicToFunc[T] = (T, DrawState, Double, Double, Double, Double, Double, Double) -> Unit

#
DrawLineToFunc

type DrawLineToFunc[T] = (T, DrawState, Double, Double) -> Unit

#
DrawMoveToFunc

type DrawMoveToFunc[T] = (T, DrawState, Double, Double) -> Unit

Draw callback types.

#
DrawQuadraticToFunc

type DrawQuadraticToFunc[T] = (T, DrawState, Double, Double, Double, Double) -> Unit

#
DrawExtents

pub struct DrawExtents {
xmin : Double
ymin : Double
xmax : Double
ymax : Double
} derive(Show, ToJson)

Bounding box builder for draw callbacks.

#
DrawExtents::add_point

fn DrawExtents::add_point(self : DrawExtents, x : Double, y : Double) -> Unit

#
DrawExtents::is_empty

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

#
DrawExtents::is_void

fn DrawExtents::is_void(self : DrawExtents) -> Bool

#
DrawExtents::new

#
DrawFuncs

pub struct DrawFuncs[T] {
move_to_cb : (T, DrawState, Double, Double) -> Unit
line_to_cb : (T, DrawState, Double, Double) -> Unit
quadratic_to_cb : (T, DrawState, Double, Double, Double, Double) -> Unit?
cubic_to_cb : (T, DrawState, Double, Double, Double, Double, Double, Double) -> Unit
close_path_cb : (T, DrawState) -> Unit
immutable : Bool
}

Draw callbacks container.

#
DrawFuncs::close_path

fn[T] DrawFuncs::close_path(self : DrawFuncs[T], draw_data : T, st : DrawState) -> Unit

#
DrawFuncs::cubic_to

fn[T] DrawFuncs::cubic_to(self : DrawFuncs[T], draw_data : T, st : DrawState, control1_x : Double, control1_y : Double, control2_x : Double, control2_y : Double, to_x : Double, to_y : Double) -> Unit

#
DrawFuncs::emit_close_path

fn[T] DrawFuncs::emit_close_path(self : DrawFuncs[T], draw_data : T, st : DrawState) -> Unit

#
DrawFuncs::emit_cubic_to

fn[T] DrawFuncs::emit_cubic_to(self : DrawFuncs[T], draw_data : T, st : DrawState, control1_x : Double, control1_y : Double, control2_x : Double, control2_y : Double, to_x : Double, to_y : Double) -> Unit

#
DrawFuncs::emit_line_to

fn[T] DrawFuncs::emit_line_to(self : DrawFuncs[T], draw_data : T, st : DrawState, to_x : Double, to_y : Double) -> Unit

#
DrawFuncs::emit_move_to

fn[T] DrawFuncs::emit_move_to(self : DrawFuncs[T], draw_data : T, st : DrawState, to_x : Double, to_y : Double) -> Unit

#
DrawFuncs::emit_quadratic_to

fn[T] DrawFuncs::emit_quadratic_to(self : DrawFuncs[T], draw_data : T, st : DrawState, control_x : Double, control_y : Double, to_x : Double, to_y : Double) -> Unit

#
DrawFuncs::empty

fn[T] DrawFuncs::empty() -> DrawFuncs[T]

#
DrawFuncs::is_immutable

fn[T] DrawFuncs::is_immutable(self : DrawFuncs[T]) -> Bool

#
DrawFuncs::line_to

fn[T] DrawFuncs::line_to(self : DrawFuncs[T], draw_data : T, st : DrawState, to_x : Double, to_y : Double) -> Unit

#
DrawFuncs::make_immutable

fn[T] DrawFuncs::make_immutable(self : DrawFuncs[T]) -> Unit

#
DrawFuncs::move_to

fn[T] DrawFuncs::move_to(self : DrawFuncs[T], draw_data : T, st : DrawState, to_x : Double, to_y : Double) -> Unit

#
DrawFuncs::new

fn[T] DrawFuncs::new() -> DrawFuncs[T]

#
DrawFuncs::quadratic_to

fn[T] DrawFuncs::quadratic_to(self : DrawFuncs[T], draw_data : T, st : DrawState, control_x : Double, control_y : Double, to_x : Double, to_y : Double) -> Unit

#
DrawFuncs::set_close_path

fn[T] DrawFuncs::set_close_path(self : DrawFuncs[T], func : (T, DrawState) -> Unit?) -> Unit

#
DrawFuncs::set_cubic_to

fn[T] DrawFuncs::set_cubic_to(self : DrawFuncs[T], func : (T, DrawState, Double, Double, Double, Double, Double, Double) -> Unit?) -> Unit

#
DrawFuncs::set_line_to

fn[T] DrawFuncs::set_line_to(self : DrawFuncs[T], func : (T, DrawState, Double, Double) -> Unit?) -> Unit

#
DrawFuncs::set_move_to

fn[T] DrawFuncs::set_move_to(self : DrawFuncs[T], func : (T, DrawState, Double, Double) -> Unit?) -> Unit

#
DrawFuncs::set_quadratic_to

fn[T] DrawFuncs::set_quadratic_to(self : DrawFuncs[T], func : (T, DrawState, Double, Double, Double, Double) -> Unit?) -> Unit

#
DrawSession

pub struct DrawSession[T] {
funcs : DrawFuncs[T]
draw_data : T
st : DrawState
}

A draw session ties draw funcs and data to a mutable draw state.

#
DrawSession::close_path

fn[T] DrawSession::close_path(self : DrawSession[T]) -> Unit

#
DrawSession::cubic_to

fn[T] DrawSession::cubic_to(self : DrawSession[T], control1_x : Double, control1_y : Double, control2_x : Double, control2_y : Double, to_x : Double, to_y : Double) -> Unit

#
DrawSession::line_to

fn[T] DrawSession::line_to(self : DrawSession[T], to_x : Double, to_y : Double) -> Unit

#
DrawSession::move_to

fn[T] DrawSession::move_to(self : DrawSession[T], to_x : Double, to_y : Double) -> Unit

#
DrawSession::new

fn[T] DrawSession::new(funcs : DrawFuncs[T], draw_data : T) -> DrawSession[T]

#
DrawSession::quadratic_to

fn[T] DrawSession::quadratic_to(self : DrawSession[T], control_x : Double, control_y : Double, to_x : Double, to_y : Double) -> Unit

#
DrawState

pub struct DrawState {
path_open : Bool
path_start_x : Double
path_start_y : Double
current_x : Double
current_y : Double
} derive(Show, ToJson)

Current drawing state.

#
DrawState::new

fn DrawState::new() -> DrawState

#
Outline

pub struct Outline {
points : Array[OutlinePoint]
contours : Array[Int]
} derive(Show, ToJson)

Outline path container (points + contour end indices).

#
Outline::control_area

fn Outline::control_area(self : Outline) -> Double

#
Outline::embolden

fn Outline::embolden(self : Outline, x_strength : Double, y_strength : Double, x_shift : Double, y_shift : Double) -> Unit

#
Outline::new

fn Outline::new() -> Outline

#
Outline::replay

fn[T] Outline::replay(self : Outline, pen : DrawFuncs[T], pen_data : T) -> Unit

#
Outline::reset

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

#
Outline::slant

fn Outline::slant(self : Outline, slant_xy : Double) -> Unit

#
Outline::translate

fn Outline::translate(self : Outline, dx : Double, dy : Double) -> Unit

#
OutlinePoint

pub struct OutlinePoint {
x : Double
y : Double
kind : OutlinePointKind
} derive(Eq, Show, ToJson)

Outline point with type.

#
OutlinePoint::new

fn OutlinePoint::new(x : Double, y : Double, kind : OutlinePointKind) -> OutlinePoint

#
OutlinePointKind

pub enum OutlinePointKind {
MoveTo
LineTo
QuadraticTo
CubicTo
} derive(Eq, Show, ToJson)

Outline point types.

#
draw_extents_get_funcs

fn draw_extents_get_funcs() -> DrawFuncs[DrawExtents]

#
outline_recording_pen_get_funcs

fn outline_recording_pen_get_funcs() -> DrawFuncs[Outline]

Powered by MoonBit

Site sourceReport issuePackagesBuild queueSkillsStatistics

© 2026 mooncakes.io