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.



87
88
89
90
91
92
93
94
# File 'opal/browser/canvas/style.rb', line 87

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.



85
86
87
# File 'opal/browser/canvas/style.rb', line 85

def alpha
  @alpha
end

#composite_operationObject

Returns the value of attribute composite_operation.



85
86
87
# File 'opal/browser/canvas/style.rb', line 85

def composite_operation
  @composite_operation
end

#fillObject

Returns the value of attribute fill.



85
86
87
# File 'opal/browser/canvas/style.rb', line 85

def fill
  @fill
end

#imageObject (readonly)

Returns the value of attribute image.



85
86
87
# File 'opal/browser/canvas/style.rb', line 85

def image
  @image
end

#lineObject (readonly)

Returns the value of attribute line.



85
86
87
# File 'opal/browser/canvas/style.rb', line 85

def line
  @line
end

#shadowObject (readonly)

Returns the value of attribute shadow.



85
86
87
# File 'opal/browser/canvas/style.rb', line 85

def shadow
  @shadow
end

#strokeObject

Returns the value of attribute stroke.



85
86
87
# File 'opal/browser/canvas/style.rb', line 85

def stroke
  @stroke
end

#textObject (readonly)

Returns the value of attribute text.



85
86
87
# File 'opal/browser/canvas/style.rb', line 85

def text
  @text
end