juce::Rectangle

set*

setSize()

	yellowRect.setSize (100, 200);

setSize()

setBounds()

	yellowRect.setBounds (90, 100, 100, 100);

setBounds()

setX()

	yellowRect.setX (50);

setX()

setY()

	yellowRect.setY (20);

setY()

setTop()

	yellowRect.setTop (150);

setTop()

setBottom()

	yellowRect.setBottom (150);

setBottom()

setLeft()

	yellowRect.setLeft (150);

setLeft()

setRight()

	yellowRect.setRight (150);

setRight()

setCentre()

	yellowRect.setCentre (280, 150);

setCentre()

setHorizontalRange()

	yellowRect.setHorizontalRange (juce::Range<int> (40, 200));

setHorizontalRange()

setVerticalRange()

	yellowRect.setVerticalRange (juce::Range<int> (60, 250));

setVerticalRange()

reduce/expand

reduce()

	yellowRect.reduce (20, 50);

reduce()

expand()

	yellowRect.expand (30, 40);

expand()

reduced()

	auto greenRect = blueRect.reduced (50, 30);

reduced()

expanded()

	auto greenRect = blueRect.expanded (50, 30);

expanded()

with*

withX()

	auto greenRect = blueRect.withX (20);

withX()

withY()

	auto greenRect = blueRect.withY (50);

withY()

withRightX()

	auto greenRect = blueRect.withRightX (80);

withRightX()

withRight()

	auto greenRect = blueRect.withRight (80);

withRight()

withBottomY()

	auto greenRect = blueRect.withBottomY (250);

withBottomY()

withBottom()

	auto greenRect = blueRect.withBottom (250);

withBottom()

withLeft()

	auto greenRect = blueRect.withLeft (150);

withLeft()

withTop()

	auto greenRect = blueRect.withTop (150);

withTop()

withPosition()

	auto greenRect = blueRect.withPosition (100, 100);

withPosition()

withZeroOrigin()

	auto greenRect = blueRect.withZeroOrigin();

withZeroOrigin()

withCentre()

	auto greenRect = blueRect.withCentre (juce::Point<int> (200, 250));

withCentre()

withWidth()

	auto greenRect = blueRect.withWidth (100);

withWidth()

withHeight()

	auto greenRect = blueRect.withHeight (100);

withHeight()

withSize()

	auto greenRect = blueRect.withSize (100, 100);

withSize()

withSizeKeepingCentre()

	auto greenRect = blueRect.withSizeKeepingCentre (50, 50);

withSizeKeepingCentre()

withTrimmedTop()

	auto greenRect = blueRect.withTrimmedTop (100);

withTrimmedTop()

withTrimmedBottom()

	auto greenRect = blueRect.withTrimmedBottom (100);

withTrimmedBottom()

withTrimmedLeft()

	auto greenRect = blueRect.withTrimmedLeft (100);

withTrimmedLeft()

withTrimmedRight()

	auto greenRect = blueRect.withTrimmedRight (100);

withTrimmedRight()

removeFrom*

removeFromTop()

	auto greenRect = blueRect.removeFromTop (50);

removeFromTop()

removeFromBottom()

	auto greenRect = blueRect.removeFromBottom (50);

removeFromBottom()

removeFromLeft()

	auto greenRect = blueRect.removeFromLeft (50);

removeFromLeft())

removeFromRight()

	auto greenRect = blueRect.removeFromRight (50);

removeFromRight()

Home