struct Tessell::Kit::PaintCmd

Defined in:

tessell/kit/painter.cr

Constructors

Instance Method Summary

Constructor Detail

def self.new(kind : PaintKind, rect : Rect = Rect.new, color : UInt32 = 0_u32, width : Float32 = 0.0_f32, radius : Float32 = 0.0_f32, text : String = "", x : Float32 = 0.0_f32, y : Float32 = 0.0_f32, font_size : Float32 = 0.0_f32, x2 : Float32 = 0.0_f32, y2 : Float32 = 0.0_f32, clip : Rect | Nil = nil, font_id : Int32 = 0, texture_id : Int32 = 0) #

[View source]

Instance Method Detail

def clip : Rect | Nil #

命令生效时的裁切矩形(push_clip/pop_clip 交集结果),与 DrawListPainter 的 DrawCmd#clip 同语义(issue #25)。nil = 无裁切。


[View source]
def color : UInt32 #

[View source]
def font_id : Int32 #

字体 face 维度(issue #29):0 = 默认 face;多 face 栈按宿主 renderer 表选取。与 DrawListPainter 写入 DrawCmd#atlas_id 的语义一致。


[View source]
def font_size : Float32 #

[View source]
def kind : PaintKind #

[View source]
def radius : Float32 #

[View source]
def rect : Rect #

[View source]
def text : String #

[View source]
def texture_id : Int32 #

外部纹理 handle(issue #28):仅 Image 使用,0 = 未绑定。


[View source]
def width : Float32 #

[View source]
def x : Float32 #

[View source]
def x2 : Float32 #

[View source]
def y : Float32 #

[View source]
def y2 : Float32 #

[View source]