Skip to content

Commit

Permalink
libdeng2|RuleRectangle: Using another RuleRectangle as the input
Browse files Browse the repository at this point in the history
  • Loading branch information
skyjake committed May 21, 2013
1 parent 516e213 commit 3075404
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 0 deletions.
1 change: 1 addition & 0 deletions doomsday/libdeng2/include/de/widgets/rulerectangle.h
Expand Up @@ -62,6 +62,7 @@ class DENG2_PUBLIC RuleRectangle : DENG2_OBSERVES(Clock, TimeChange)

RuleRectangle &setLeftTop(Rule const &left, Rule const &top);
RuleRectangle &setRightBottom(Rule const &right, Rule const &bottom);
RuleRectangle &setRect(RuleRectangle const &rect);
RuleRectangle &setSize(Rule const &width, Rule const &height);

/**
Expand Down
9 changes: 9 additions & 0 deletions doomsday/libdeng2/src/widgets/rulerectangle.cpp
Expand Up @@ -365,6 +365,15 @@ RuleRectangle &RuleRectangle::setRightBottom(Rule const &right, Rule const &bott
return *this;
}

RuleRectangle &RuleRectangle::setRect(RuleRectangle const &rect)
{
setInput(Rule::Left, rect.left());
setInput(Rule::Top, rect.top());
setInput(Rule::Right, rect.right());
setInput(Rule::Bottom, rect.bottom());
return *this;
}

RuleRectangle &RuleRectangle::setSize(Rule const &width, Rule const &height)
{
setInput(Rule::Width, width);
Expand Down

0 comments on commit 3075404

Please sign in to comment.