class Tessell::Kit::SvgPainter

Defined in:

tessell/kit/svg_painter.cr

Constructors

Instance Method Summary

Instance methods inherited from class Tessell::Kit::Painter

fill_rect(rect : Rect, color : UInt32) : Nil fill_rect, fill_round_rect(rect : Rect, radius : Float32, color : UInt32) : Nil fill_round_rect, image(texture_id : Int32, bounds : Rect, tint : UInt32 = 4294967295_u32, src : Rect | Nil = nil) : Nil image, line(x1 : Float32, y1 : Float32, x2 : Float32, y2 : Float32, color : UInt32, width : Float32 = 1.0_f32) : Nil line, pop_clip : Nil pop_clip, push_clip(rect : Rect) : Nil push_clip, stroke_rect(rect : Rect, color : UInt32, width : Float32 = 1.0_f32) : Nil stroke_rect, stroke_round_rect(rect : Rect, radius : Float32, color : UInt32, width : Float32 = 1.0_f32) : Nil stroke_round_rect, text(x : Float32, baseline_y : Float32, text : String, color : UInt32, size : Float32, font_id : Int32 = 0) : Nil text

Constructor Detail

def self.new(width : Int32, height : Int32) #

[View source]

Instance Method Detail

def background : UInt32 #

[View source]
def background=(background : UInt32) #

[View source]
def clip_depth : Int32 #

[View source]
def elements : Int32 #

[View source]
def fill_rect(rect : Rect, color : UInt32) : Nil #

[View source]
def fill_round_rect(rect : Rect, radius : Float32, color : UInt32) : Nil #

[View source]
def height : Int32 #

[View source]
def image(texture_id : Int32, bounds : Rect, tint : UInt32 = 4294967295_u32, src : Rect | Nil = nil) : Nil #
Description copied from class Tessell::Kit::Painter

外部纹理四边形(issue #28):texture_id 来自 Backend#create_texture (独立命名空间);tint 默认全白 = 原样;src 缺省 = 整图(后端按 纹理尺寸换算 uv)。


[View source]
def line(x1 : Float32, y1 : Float32, x2 : Float32, y2 : Float32, color : UInt32, width : Float32 = 1.0_f32) : Nil #

[View source]
def pop_clip : Nil #

[View source]
def push_clip(rect : Rect) : Nil #

[View source]
def stroke_rect(rect : Rect, color : UInt32, width : Float32 = 1.0_f32) : Nil #

[View source]
def stroke_round_rect(rect : Rect, radius : Float32, color : UInt32, width : Float32 = 1.0_f32) : Nil #

[View source]
def svg : String #

[View source]
def text(x : Float32, baseline_y : Float32, text : String, color : UInt32, size : Float32, font_id : Int32 = 0) : Nil #

[View source]
def width : Int32 #

[View source]