class
Tessell::Kit::Image
- Tessell::Kit::Image
- Tessell::Kit::Component
- Reference
- Object
Defined in:
tessell/kit/image.crConstructors
Instance Method Summary
- #a11y_name : String
- #a11y_role : A11y::Role
- #emit(b : UI::Builder, ctx : Context) : Nil
- #fit : Fit
- #fit=(fit : Fit)
- #measure(ctx : Context, constraints : Constraints) : Size
- #paint(p : Painter, ctx : Context) : Nil
-
#paint_token : UInt32
paint token 随纹理 handle/fit 变化:UI.apply 据此标 Paint 失效(#28 接入)。
-
#set_texture(handle : Int32, width : Int32, height : Int32) : Nil
重绑纹理(handle/尺寸变更时调用;paint token 随之变化驱动 Paint 失效)
- #texture_height : Int32
- #texture_id : Int32
-
#texture_width : Int32
纹理逻辑尺寸(px):aspect 计算与 src rect 换算用。
Instance methods inherited from class Tessell::Kit::Component
a11y_active_cell : Bool | Nil
a11y_active_cell,
a11y_children_count : Int32 | Nil
a11y_children_count,
a11y_col : Int32 | Nil
a11y_col,
a11y_col_count : Int32 | Nil
a11y_col_count,
a11y_col_index_text : String | Nil
a11y_col_index_text,
a11y_enabled : Bool
a11y_enabled,
a11y_first_visible_index : Int32 | Nil
a11y_first_visible_index,
a11y_name : String
a11y_name,
a11y_role : A11y::Role
a11y_role,
a11y_row : Int32 | Nil
a11y_row,
a11y_row_count : Int32 | Nil
a11y_row_count,
a11y_row_index_text : String | Nil
a11y_row_index_text,
a11y_scroll_offset : Int32
a11y_scroll_offset,
a11y_selected : Bool | Nil
a11y_selected,
a11y_value : String
a11y_value,
arrange(ctx : Context, bounds : Rect) : Nil
arrange,
attach(child : Component) : Component
attach,
bounds : Rect
bounds,
bounds=(bounds : Rect)
bounds=,
clip_bounds : Rect | Nil
clip_bounds,
collect_components(sink : Array(Component)) : Nil
collect_components,
dispose : Nil
dispose,
emit(b : UI::Builder, ctx : Context) : Nil
emit,
enabled : Bool
enabled,
enabled=(enabled : Bool)
enabled=,
focusable? : Bool
focusable?,
focused : Bool
focused,
focused=(focused : Bool)
focused=,
handle(event : Event, ctx : Context) : Bool
handle,
hit?(point : Point) : Bool
hit?,
key : UI::UiKey
key,
mark_structure_dirty : Nil
mark_structure_dirty,
measure(ctx : Context, constraints : Constraints) : Size
measure,
on_focus_changed(focused : Bool) : Nil
on_focus_changed,
paint(p : Painter, ctx : Context) : Nil
paint,
paint_token : UInt32
paint_token,
parent : Component | Nil
parent,
parent=(value : Component | Nil) : Nil
parent=,
signal_owner : Tessell::Signal::Owner
signal_owner,
signal_owner? : Tessell::Signal::Owner | Nil
signal_owner?,
structure_dirty : Bool
structure_dirty,
structure_dirty=(structure_dirty : Bool)
structure_dirty=,
take_structure_dirty : Bool
take_structure_dirty,
tick(now_ms : Int64, ctx : Context) : Nil
tick,
tooltip_delay_ms : Int32
tooltip_delay_ms,
tooltip_delay_ms=(tooltip_delay_ms : Int32)
tooltip_delay_ms=,
tooltip_text : String | Nil
tooltip_text,
tooltip_text=(tooltip_text : String | Nil)
tooltip_text=,
visible : Bool
visible,
visible=(visible : Bool)
visible=,
wants_tab? : Bool
wants_tab?,
watch(&handler : -> Nil) : Tessell::Signal::Effect
watch
Constructor methods inherited from class Tessell::Kit::Component
new(key : UI::UiKey, enabled : Bool = true, visible : Bool = true)
new
Constructor Detail
def self.new(key : UI::UiKey, texture_id : Int32, texture_width : Int32, texture_height : Int32, fit : Fit = Fit::Stretch, enabled : Bool = true)
#
Instance Method Detail
def set_texture(handle : Int32, width : Int32, height : Int32) : Nil
#
重绑纹理(handle/尺寸变更时调用;paint token 随之变化驱动 Paint 失效)