-
Notifications
You must be signed in to change notification settings - Fork 254
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
feat(Rect): Rect manipulation methods
- Loading branch information
1 parent
c862aa5
commit 3da3d47
Showing
2 changed files
with
82 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,16 @@ | ||
/// Amounts by which to move a [`Rect`](super::Rect)'s borders. | ||
/// | ||
/// Positive numbers move to the right/bottom and negative to the left/top. | ||
/// | ||
/// See [`Rect::offset`](super::Rect::offset) | ||
#[derive(Debug, Default, Clone, Copy)] | ||
pub struct Offset { | ||
/// How much to move the left border | ||
pub left: i32, | ||
/// How much to move the top border | ||
pub top: i32, | ||
/// How much to move the right border | ||
pub right: i32, | ||
/// How much to move the bottom border | ||
pub bottom: i32, | ||
} |