Class: WebkitRemote::Client::DomQuad
- Inherits:
-
Object
- Object
- WebkitRemote::Client::DomQuad
- Defined in:
- lib/webkit_remote_unstable/dom.rb
Overview
Coordinates for 4 points that make up a box’s boundary.
Instance Attribute Summary collapse
-
#x ⇒ Array<Number>
readonly
X coordinates for the 4 points, in clockwise order.
-
#y ⇒ Array<Number>
readonly
Y coordinates for the 4 points, in clockwise order.
Instance Method Summary collapse
-
#initialize(raw_quad) ⇒ DomQuad
constructor
Wraps raw box model data received via a RPC call.
Constructor Details
#initialize(raw_quad) ⇒ DomQuad
Wraps raw box model data received via a RPC call.
90 91 92 93 |
# File 'lib/webkit_remote_unstable/dom.rb', line 90 def initialize(raw_quad) @x = [raw_quad[0], raw_quad[2], raw_quad[4], raw_quad[6]].freeze @y = [raw_quad[1], raw_quad[3], raw_quad[5], raw_quad[7]].freeze end |
Instance Attribute Details
#x ⇒ Array<Number> (readonly)
Returns x coordinates for the 4 points, in clockwise order.
81 82 83 |
# File 'lib/webkit_remote_unstable/dom.rb', line 81 def x @x end |
#y ⇒ Array<Number> (readonly)
Returns y coordinates for the 4 points, in clockwise order.
84 85 86 |
# File 'lib/webkit_remote_unstable/dom.rb', line 84 def y @y end |