class
UIng::Area::Draw::Context
- UIng::Area::Draw::Context
- Reference
- Object
Included Modules
Defined in:
uing/area/area/draw/context.crConstructors
Instance Method Summary
-
#clip(path : Path) : Nil
Low-level clipping: apply a finished path as clip
-
#clip_path(mode : FillMode = FillMode::Winding, &)
High-level clipping: build a path in a block, end it, and clip
-
#draw_fill(path : Path, brush : Brush) : Nil
Low-level: fill an ended path
-
#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 : Nil
-
#save : Nil
Save/restore helpers
-
#stroke_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
- #to_unsafe : Pointer(Void)
-
#transform(matrix : Matrix) : Nil
Matrix composition (same semantics as libui's uiDrawTransform)
Macros inherited from module UIng::BlockConstructor
block_constructor
block_constructor
Constructor Detail
Instance Method Detail
High-level clipping: build a path in a block, end it, and clip
High-level: build once, then optionally fill and/or stroke
Low-level: stroke an ended path
Convenience overload to build StrokeParams inline
Text drawing (libui uiDrawText equivalent)
High-level: build a path in a block, end it, and fill
High-level: build a path in a block, end it, and stroke
Matrix composition (same semantics as libui's uiDrawTransform)