#include <Ultralight/dom/DOMRect.h>
A rectangle in CSS pixels, relative to the viewport (DOMRect).
The coordinates are in the same space as event client positions and Document::elementFromPoint().
- Note
- For an element in a subframe, the viewport is that frame's own viewport.
- Note
- CSS pixels are device pixels divided by the View's device scale.
- See also
- Element::getBoundingClientRect(), Range::getBoundingClientRect()
|
| double | left () const |
| | Get the left edge (left).
|
| double | top () const |
| | Get the top edge (top).
|
| double | right () const |
| | Get the right edge (right).
|
| double | bottom () const |
| | Get the bottom edge (bottom).
|
|
| double | x = 0 |
| | The horizontal position.
|
| double | y = 0 |
| | The vertical position.
|
| double | width = 0 |
| | The width (can be negative).
|
| double | height = 0 |
| | The height (can be negative).
|
◆ bottom()
Get the bottom edge (bottom).
◆ left()
Get the left edge (left).
This is x unless the width is negative.
◆ right()
Get the right edge (right).
◆ top()
Get the top edge (top).
This is y unless the height is negative.
◆ height
The height (can be negative).
◆ width
The width (can be negative).
The documentation for this struct was generated from the following file: