UIng::Area::Draw::Context
Inherits UIng::BlockConstructor < Reference < Object
Constructors
new(*args, &)
Sourcenew(*args, **kwargs, &)
Sourcenew(ref_ptr : Pointer(LibUI::DrawContext))
SourceInstance methods
clip_path(mode : FillMode = FillMode::Winding, &)
High-level clipping: build a path in a block, end it, and clip
draw_path(mode : FillMode = FillMode::Winding, fill : Bool = true, stroke : Bool = false, fill_brush : Brush | Nil = nil, stroke_brush : Brush | Nil = nil, stroke_params : StrokeParams | Nil = nil, &)
High-level: build once, then optionally fill and/or stroke
draw_stroke(path : Path, brush : Brush, stroke_params : StrokeParams) : Nil
Low-level: stroke an ended path
draw_stroke(path : Path, brush : Brush, cap : UIng::Area::Draw::LineCap = LineCap::Flat, join : UIng::Area::Draw::LineJoin = LineJoin::Miter, thickness : Number = 1.0, miter_limit : Number = 10.0, dash_phase : Number = 0.0, dashes : Enumerable(Float64) | Nil = nil) : Nil
Convenience overload to build StrokeParams inline
draw_text_layout(text_layout : TextLayout, x : Float64, y : Float64) : Nil
Text drawing (libui uiDrawText equivalent)
fill_path(brush : Brush, mode : FillMode = FillMode::Winding, &)
High-level: build a path in a block, end it, and fill
restore
Sourcestroke_path(brush : Brush, stroke_params : StrokeParams, mode : FillMode = FillMode::Winding, &)
High-level: build a path in a block, end it, and stroke
stroke_path(brush : Brush, cap : UIng::Area::Draw::LineCap = LineCap::Flat, join : UIng::Area::Draw::LineJoin = LineJoin::Miter, thickness : Number = 1.0, miter_limit : Number = 10.0, dash_phase : Number = 0.0, dashes : Enumerable(Float64) | Nil = nil, mode : FillMode = FillMode::Winding, &block : Path -> Nil) : Nil
Sourceto_unsafe
Sourcetransform(matrix : Matrix) : Nil
Matrix composition (same semantics as libui's uiDrawTransform)