Class: CTioga2::Graphics::Elements::BackgroundElement

Inherits:
TiogaElement
  • Object
show all
Defined in:
lib/ctioga2/graphics/elements/plot-elements.rb

Overview

Wrapper for the background

Constant Summary

Constants inherited from TiogaElement

TiogaElement::StyleBaseOptions

Instance Attribute Summary collapse

Attributes inherited from TiogaElement

#clipped, #depth, #hidden, #location, #object_classes, #object_id, #object_parent, #parent

Instance Method Summary collapse

Methods inherited from TiogaElement

all_styles, base_style, #check_styled, define_style, #do, find_object, find_objects, #get_style, #has_style?, inherited, #inspect, register_object, register_style, #setup_style, #style_class, style_class, style_name, #style_name, styled_classes, #update_style

Methods included from Log

context, counts, debug, error, fatal, #format_exception, #identify, info, init_logger, log_to, logger, set_level, #spawn, warn

Constructor Details

#initialize(parent, opts) ⇒ BackgroundElement

Returns a new instance of BackgroundElement.



75
76
77
78
# File 'lib/ctioga2/graphics/elements/plot-elements.rb', line 75

def initialize(parent, opts)
  setup_style(parent, opts)
  @style = get_style()
end

Instance Attribute Details

#styleObject

Returns the value of attribute style.



73
74
75
# File 'lib/ctioga2/graphics/elements/plot-elements.rb', line 73

def style
  @style
end

Instance Method Details

#draw_background(t) ⇒ Object



80
81
82
# File 'lib/ctioga2/graphics/elements/plot-elements.rb', line 80

def draw_background(t)
  @style.draw_background(t)
end