Navigation Menu

Skip to content

Commit

Permalink
libdeng2|Widgets: Added method for querying RuleRectangle’s size in i…
Browse files Browse the repository at this point in the history
…nteger
  • Loading branch information
skyjake committed Nov 22, 2013
1 parent 73d1db2 commit bb0af82
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 0 deletions.
5 changes: 5 additions & 0 deletions doomsday/libdeng2/include/de/widgets/rulerectangle.h
Expand Up @@ -118,6 +118,11 @@ class DENG2_PUBLIC RuleRectangle
*/
Vector2f size() const;

/**
* Returns the current size of the rectangle as defined by the input rules.
*/
Vector2i sizei() const;

/**
* Returns the current rectangle as defined by the input rules.
* Values are floored to integers.
Expand Down
5 changes: 5 additions & 0 deletions doomsday/libdeng2/src/widgets/rulerectangle.cpp
Expand Up @@ -322,6 +322,11 @@ Vector2f RuleRectangle::size() const
return Vector2f(width().value(), height().value());
}

Vector2i RuleRectangle::sizei() const
{
return Vector2i(width().valuei(), height().valuei());
}

Rectanglei RuleRectangle::recti() const
{
Rectanglef const r = rect();
Expand Down

0 comments on commit bb0af82

Please sign in to comment.