Class: Glimmer::View::Cylinder

Inherits:
Object
  • Object
show all
Includes:
UI::CustomShape
Defined in:
lib/glimmer/view/cylinder.rb

Constant Summary collapse

DEFAULT_SIZE =
28

Instance Method Summary collapse

Instance Method Details

#pitted=(value) ⇒ Object



32
33
34
35
36
37
38
39
40
41
42
43
44
# File 'lib/glimmer/view/cylinder.rb', line 32

def pitted=(value)
  options[:pitted] = value
  if value
    body_root.content {
      @pit ||= oval(oval_width / 4.0, oval_height / 4.0, oval_width / 2.0, oval_height / 2.0) {
        background :black
      }
    }
  else
    @pit&.dispose
    @pit = nil
  end
end