Class: Browser::Canvas::Style

Inherits:
StyleObject show all
Defined in:
opal/browser/canvas/style.rb

Defined Under Namespace

Classes: Image, Line, Shadow, Text

Instance Attribute Summary collapse

Attributes inherited from StyleObject

#context

Instance Method Summary collapse

Constructor Details

#initialize(context) ⇒ Style

Returns a new instance of Style.



90
91
92
93
94
95
96
97
# File 'opal/browser/canvas/style.rb', line 90

def initialize(context)
  super(context)

  @line   = Line.new(context)
  @text   = Text.new(context)
  @image  = Image.new(context)
  @shadow = Shadow.new(context)
end

Instance Attribute Details

#alphaObject

Returns the value of attribute alpha.



88
89
90
# File 'opal/browser/canvas/style.rb', line 88

def alpha
  @alpha
end

#composite_operationObject

Returns the value of attribute composite_operation.



88
89
90
# File 'opal/browser/canvas/style.rb', line 88

def composite_operation
  @composite_operation
end

#fillObject

Returns the value of attribute fill.



88
89
90
# File 'opal/browser/canvas/style.rb', line 88

def fill
  @fill
end

#imageObject (readonly)

Returns the value of attribute image.



88
89
90
# File 'opal/browser/canvas/style.rb', line 88

def image
  @image
end

#lineObject (readonly)

Returns the value of attribute line.



88
89
90
# File 'opal/browser/canvas/style.rb', line 88

def line
  @line
end

#shadowObject (readonly)

Returns the value of attribute shadow.



88
89
90
# File 'opal/browser/canvas/style.rb', line 88

def shadow
  @shadow
end

#strokeObject

Returns the value of attribute stroke.



88
89
90
# File 'opal/browser/canvas/style.rb', line 88

def stroke
  @stroke
end

#textObject (readonly)

Returns the value of attribute text.



88
89
90
# File 'opal/browser/canvas/style.rb', line 88

def text
  @text
end