Class: Miyako::Diagram::Renderer
- Includes:
- Animation, Layout, SpriteBase
- Defined in:
- lib/Miyako/API/diagram.rb
Overview
レンダラクラス
レンダリングのみを行うクラス Processor#render メソッドのみを呼び出せる インスタンス生成は、Processor#renderer メソッドを呼び出して行う
Instance Attribute Summary collapse
-
#visible ⇒ Object
レンダリングの可否(true->描画 false->非描画).
Instance Method Summary collapse
-
#initialize(obj) ⇒ Renderer
constructor
:nodoc:.
-
#initialize_copy(obj) ⇒ Object
:nodoc:.
-
#render ⇒ Object
レンダリングを行う Processor#render メソッドを呼び出す visibleメソッドの値がfalseのときは描画されない。.
Methods included from Layout
#add_snap_child, #bottom, #bottom!, #broad_rect, #center, #center!, #centering, #centering!, #copy_layout, #delete_snap_child, #get_snap_children, #get_snap_sprite, #h, #include_snap_child?, #init_layout, #layout_dispose, #left, #left!, #middle, #middle!, #move, #move!, #move_to, #move_to!, #on_move, #outside_bottom, #outside_bottom!, #outside_left, #outside_left!, #outside_right, #outside_right!, #outside_top, #outside_top!, #pos, #rect, #relative_move_to, #relative_move_to!, #reset_snap, #right, #right!, #segment, #set_layout_size, #set_snap_children, #set_snap_sprite, #size, #snap, #top, #top!, #update_layout, #update_layout_position, #w, #x, #y
Methods included from Animation
[], []=, anim_hash, #reset, reset, start, #start, #stop, stop, update, update_animation, #update_animation
Methods included from SpriteBase
#bitmap, #hide, #image_rect, #image_size, #oh, #oh=, #ow, #ow=, #ox, #ox=, #oy, #oy=, #part_rect, #rect, #render_d, #render_to, #render_xy, #render_xy_to, #show, #to_sprite, #to_unit, #update
Constructor Details
#initialize(obj) ⇒ Renderer
:nodoc:
448 449 450 451 452 453 |
# File 'lib/Miyako/API/diagram.rb', line 448 def initialize(obj) #:nodoc: init_layout set_layout_size(1,1) @renderer = obj @visible = true end |
Instance Attribute Details
#visible ⇒ Object
レンダリングの可否(true->描画 false->非描画)
446 447 448 |
# File 'lib/Miyako/API/diagram.rb', line 446 def visible @visible end |
Instance Method Details
#initialize_copy(obj) ⇒ Object
:nodoc:
455 456 457 |
# File 'lib/Miyako/API/diagram.rb', line 455 def initialize_copy(obj) #:nodoc: @renderer = @renderer.dup end |
#render ⇒ Object
レンダリングを行う
Processor#render メソッドを呼び出す visibleメソッドの値がfalseのときは描画されない。
462 463 464 465 |
# File 'lib/Miyako/API/diagram.rb', line 462 def render return unless @visible @renderer.call end |