class
Tessell::Render::Canvas
- Tessell::Render::Canvas
- Reference
- Object
Defined in:
tessell/render/canvas.crConstructors
Instance Method Summary
- #clear : Nil
- #clip_depth : Int32
- #fill_rect(rect : Tessell::Rect, color : UInt32) : Nil
- #fill_round_rect(rect : Tessell::Rect, radius : Float32, color : UInt32) : Nil
- #line(x1 : Float32, y1 : Float32, x2 : Float32, y2 : Float32, color : UInt32, width : Float32 = 1.0_f32) : Nil
- #list : DrawList
-
#polyline(points : Array(Tessell::Point), color : UInt32, width : Float32 = 1.0_f32) : Nil
折线:展开为逐段 Line 命令(同一 clip 下 atlas_id/clip 相同 → 同批)。 points < 2 时不发任何命令。
- #pop_clip : Nil
- #push_clip(rect : Tessell::Rect) : Nil
- #stroke_rect(rect : Tessell::Rect, color : UInt32, width : Float32 = 1.0_f32) : Nil
- #stroke_round_rect(rect : Tessell::Rect, radius : Float32, color : UInt32, width : Float32 = 1.0_f32) : Nil
Constructor Detail
Instance Method Detail
def line(x1 : Float32, y1 : Float32, x2 : Float32, y2 : Float32, color : UInt32, width : Float32 = 1.0_f32) : Nil
#
折线:展开为逐段 Line 命令(同一 clip 下 atlas_id/clip 相同 → 同批)。 points < 2 时不发任何命令。
def stroke_round_rect(rect : Tessell::Rect, radius : Float32, color : UInt32, width : Float32 = 1.0_f32) : Nil
#