mirror of
https://github.com/juce-framework/JUCE.git
synced 2026-01-10 23:44:24 +00:00
Component: Add overload for setTopRightPosition(Point<int>)
This commit is contained in:
parent
81d1c104db
commit
6ff5e57b62
2 changed files with 15 additions and 1 deletions
|
|
@ -928,7 +928,8 @@ void Component::setSize (int w, int h) { setBounds (getX(), get
|
|||
void Component::setTopLeftPosition (int x, int y) { setTopLeftPosition ({ x, y }); }
|
||||
void Component::setTopLeftPosition (Point<int> pos) { setBounds (pos.x, pos.y, getWidth(), getHeight()); }
|
||||
|
||||
void Component::setTopRightPosition (int x, int y) { setTopLeftPosition (x - getWidth(), y); }
|
||||
void Component::setTopRightPosition (int x, int y) { setTopRightPosition ({ x, y }); }
|
||||
void Component::setTopRightPosition (Point<int> pos) { setTopLeftPosition (pos.x - getWidth(), pos.y); }
|
||||
void Component::setBounds (Rectangle<int> r) { setBounds (r.getX(), r.getY(), r.getWidth(), r.getHeight()); }
|
||||
|
||||
void Component::setCentrePosition (Point<int> p) { setBounds (getBounds().withCentre (p.transformedBy (getTransform().inverted()))); }
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue