Class: MotionPrime::ViewDrawElement

Inherits:
DrawElement show all
Includes:
DrawBackgroundMixin
Defined in:
motion-prime/elements/draw/view.rb

Instance Attribute Summary

Attributes inherited from BaseElement

#name, #options, #screen, #section, #styles, #view, #view_class, #view_name

Instance Method Summary collapse

Methods included from DrawBackgroundMixin

#draw_background_in_context

Methods inherited from DrawElement

#bind_gesture, #computed_bottom, #computed_frame, #computed_height, #computed_inner_bottom, #computed_inner_left, #computed_inner_right, #computed_inner_top, #computed_left, #computed_max_height, #computed_max_width, #computed_outer_height, #computed_outer_width, #computed_right, #computed_top, #computed_width, #default_padding_for, #draw_options, factory, #hide, #reload!, #render!, #show, #update_with_options, #view

Methods included from ElementContentPaddingMixin

#cached_content_outer_height, #cached_content_outer_width, #content_outer_height, #content_outer_width, #content_padding_bottom, #content_padding_height, #content_padding_left, #content_padding_right, #content_padding_top, #content_padding_width, #default_padding_for

Methods included from FrameCalculatorMixin

#calculate_frome_for

Methods inherited from BaseElement

#add_target, after_render, before_render, #bind_gesture, #compute_options!, #computed_options, #dealloc, factory, #hide, #initialize, #reload!, #render, #render!, #show, #update_with_options

Methods included from HasClassFactory

#camelize_factory, #class_factory, #low_camelize_factory

Methods included from HasStyleChainBuilder

#build_styles_chain

Methods included from HasNormalizer

#normalize_object, #normalize_options

Constructor Details

This class inherits a constructor from MotionPrime::BaseElement

Instance Method Details

#draw_in(rect) ⇒ Object



6
7
8
# File 'motion-prime/elements/draw/view.rb', line 6

def draw_in(rect)
  draw_in_context(UIGraphicsGetCurrentContext())
end

#draw_in_context(context) ⇒ Object



10
11
12
13
14
# File 'motion-prime/elements/draw/view.rb', line 10

def draw_in_context(context)
  return if computed_options[:hidden]

  draw_background_in_context(context)
end