Class: Browser::Canvas::Style
- Inherits:
-
StyleObject
- Object
- StyleObject
- Browser::Canvas::Style
- Defined in:
- opal/browser/canvas/style.rb
Defined Under Namespace
Classes: Image, Line, Shadow, Text
Instance Attribute Summary collapse
-
#alpha ⇒ Object
Returns the value of attribute alpha.
-
#composite_operation ⇒ Object
Returns the value of attribute composite_operation.
-
#fill ⇒ Object
Returns the value of attribute fill.
-
#image ⇒ Object
readonly
Returns the value of attribute image.
-
#line ⇒ Object
readonly
Returns the value of attribute line.
-
#shadow ⇒ Object
readonly
Returns the value of attribute shadow.
-
#stroke ⇒ Object
Returns the value of attribute stroke.
-
#text ⇒ Object
readonly
Returns the value of attribute text.
Attributes inherited from StyleObject
Instance Method Summary collapse
-
#initialize(context) ⇒ Style
constructor
A new instance of Style.
Constructor Details
permalink #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
permalink #alpha ⇒ Object
Returns the value of attribute alpha.
88 89 90 |
# File 'opal/browser/canvas/style.rb', line 88 def alpha @alpha end |
permalink #composite_operation ⇒ Object
Returns the value of attribute composite_operation.
88 89 90 |
# File 'opal/browser/canvas/style.rb', line 88 def composite_operation @composite_operation end |
permalink #fill ⇒ Object
Returns the value of attribute fill.
88 89 90 |
# File 'opal/browser/canvas/style.rb', line 88 def fill @fill end |
permalink #image ⇒ Object (readonly)
Returns the value of attribute image.
88 89 90 |
# File 'opal/browser/canvas/style.rb', line 88 def image @image end |
permalink #line ⇒ Object (readonly)
Returns the value of attribute line.
88 89 90 |
# File 'opal/browser/canvas/style.rb', line 88 def line @line end |
permalink #shadow ⇒ Object (readonly)
Returns the value of attribute shadow.
88 89 90 |
# File 'opal/browser/canvas/style.rb', line 88 def shadow @shadow end |