BoxRegion defines a 2D screen region. Mostly used for clipping.
Public Member Functions | |
| BoxRegion () | |
| BoxRegion (float x, float y, float width, float height) | |
| Creates a new box. More... | |
| void | Set (float x, float y, float width, float height) |
| Applies new values to an existing box. More... | |
| bool | Overlaps (BoxRegion box) |
| Evaluates if one box overlaps another. More... | |
| void | ClipByAffecting (BoxRegion bound, BoxRegion affect) |
| Makes sure this box fits inside the given one by clipping it so it does. Any pixels sliced off this box are also sliced off affect. More... | |
| void | ClipBy (BoxRegion box) |
| Makes sure this box fits inside the given one by clipping it so it does. More... | |
| bool | ClipByChecked (BoxRegion box) |
| Makes sure this box fits inside the given one by clipping it so it does. More... | |
| float | ClipLeft (float line) |
| Clips the left side of this box, making sure it does not extend beyond the given value. More... | |
| float | ClipRight (float line) |
| Clips the right side of this box, making sure it does not extend beyond the given value. More... | |
| float | ClipTop (float line) |
| Clips the top of this box, making sure it does not extend beyond the given value. More... | |
| float | ClipBottom (float line) |
| Clips the bottom of this box, making sure it does not extend beyond the given value. More... | |
| void | RemoveFromLeft (float px) |
| Removes up to the given amount of pixels from the left side of the box. It is bounded to ensure a negative width is not created. More... | |
| void | RemoveFromRight (float px) |
| Removes up to the given amount of pixels from the right side of the box. It is bounded to ensure a negative width is not created. More... | |
| void | RemoveFromTop (float px) |
| Removes up to the given amount of pixels from the top side of the box. It is bounded to ensure a negative height is not created. More... | |
| void | RemoveFromBottom (float px) |
| Removes up to the given amount of pixels from the bottom side of the box. It is bounded to ensure a negative height is not created. More... | |
| override string | ToString () |
| Produces an easy to read summary of this boxes shape. More... | |
Public Attributes | |
| float | X |
| The X coordinate of the box. More... | |
| float | Y |
| The Y coordinate of the box. More... | |
| float | MaxX |
| The Maximum X value of the box. X+Width. More... | |
| float | MaxY |
| The Maximum Y value of the box. Y+Height. More... | |
| float | Width |
| The width of the box. More... | |
| float | Height |
| The height of the box. More... | |
|
inline |
|
inline |
Creates a new box.
| x | The X coordinate of the box. |
| y | The Y coordinate of the box. |
| width | The width of the box. |
| height | The height of the box. |
|
inline |
Clips the bottom of this box, making sure it does not extend beyond the given value.
| line | The y coordinate of a horizontal line to clip with. It's exclusive; If it sits on the border, nothing happens. |
|
inline |
Makes sure this box fits inside the given one by clipping it so it does.
| bound | The bounding box that this must be clipped to. |
Makes sure this box fits inside the given one by clipping it so it does. Any pixels sliced off this box are also sliced off affect.
| bound | The bounding box that this must be clipped to. |
| affect | A secondary box that will also be clipped with this one. May, for example, be a region of UV pixel coordinates. |
|
inline |
Makes sure this box fits inside the given one by clipping it so it does.
| bound | The bounding box that this must be clipped to. |
|
inline |
Clips the left side of this box, making sure it does not extend beyond the given value.
| line | The x coordinate of a vertical line to clip with. It's exclusive; If it sits on the border, nothing happens. |
|
inline |
Clips the right side of this box, making sure it does not extend beyond the given value.
| line | The x coordinate of a vertical line to clip with. It's exclusive; If it sits on the border, nothing happens. |
|
inline |
Clips the top of this box, making sure it does not extend beyond the given value.
| line | The y coordinate of a horizontal line to clip with. It's exclusive; If it sits on the border, nothing happens. |
|
inline |
Evaluates if one box overlaps another.
| box | The other box to check with. |
|
inline |
Removes up to the given amount of pixels from the bottom side of the box. It is bounded to ensure a negative height is not created.
| px | The amount of pixels to remove. |
|
inline |
Removes up to the given amount of pixels from the left side of the box. It is bounded to ensure a negative width is not created.
| px | The amount of pixels to remove. |
|
inline |
Removes up to the given amount of pixels from the right side of the box. It is bounded to ensure a negative width is not created.
| px | The amount of pixels to remove. |
|
inline |
Removes up to the given amount of pixels from the top side of the box. It is bounded to ensure a negative height is not created.
| px | The amount of pixels to remove. |
|
inline |
Applies new values to an existing box.
| x | The X coordinate of the box. |
| y | The Y coordinate of the box. |
| width | The width of the box. |
| height | The height of the box. |
|
inline |
Produces an easy to read summary of this boxes shape.
| float PowerUI.BoxRegion.Height |
The height of the box.
| float PowerUI.BoxRegion.MaxX |
The Maximum X value of the box. X+Width.
| float PowerUI.BoxRegion.MaxY |
The Maximum Y value of the box. Y+Height.
| float PowerUI.BoxRegion.Width |
The width of the box.
| float PowerUI.BoxRegion.X |
The X coordinate of the box.
| float PowerUI.BoxRegion.Y |
The Y coordinate of the box.