openshot-audio
0.1.2
|
#include <juce_graphics.h>
Public Types | |
typedef Rectangle< ValueType > | RectangleType |
Public Member Functions | |
RectangleList () noexcept | |
RectangleList (const RectangleList &other) | |
RectangleList (const RectangleType &rect) | |
RectangleList & | operator= (const RectangleList &other) |
bool | isEmpty () const noexcept |
int | getNumRectangles () const noexcept |
RectangleType | getRectangle (int index) const noexcept |
void | clear () |
void | add (const RectangleType &rect) |
void | add (ValueType x, ValueType y, ValueType width, ValueType height) |
void | addWithoutMerging (const RectangleType &rect) |
void | add (const RectangleList &other) |
void | subtract (const RectangleType &rect) |
bool | subtract (const RectangleList &otherList) |
bool | clipTo (const RectangleType &rect) |
template<typename OtherValueType > | |
bool | clipTo (const RectangleList< OtherValueType > &other) |
bool | getIntersectionWith (const RectangleType &rect, RectangleList &destRegion) const |
void | swapWith (RectangleList &otherList) noexcept |
bool | containsPoint (Point< ValueType > point) const noexcept |
bool | containsPoint (ValueType x, ValueType y) const noexcept |
bool | containsRectangle (const RectangleType &rectangleToCheck) const |
bool | intersectsRectangle (const RectangleType &rectangleToCheck) const noexcept |
bool | intersects (const RectangleList &other) const noexcept |
RectangleType | getBounds () const noexcept |
void | consolidate () |
void | offsetAll (Point< ValueType > offset) noexcept |
void | offsetAll (ValueType dx, ValueType dy) noexcept |
template<typename ScaleType > | |
void | scaleAll (ScaleType scaleFactor) noexcept |
void | transformAll (const AffineTransform &transform) noexcept |
Path | toPath () const |
const RectangleType * | begin () const noexcept |
const RectangleType * | end () const noexcept |
void | ensureStorageAllocated (int minNumRectangles) |
Maintains a set of rectangles as a complex region.
This class allows a set of rectangles to be treated as a solid shape, and can add and remove rectangular sections of it, and simplify overlapping or adjacent rectangles.
typedef Rectangle<ValueType> juce::RectangleList< ValueType >::RectangleType |
|
inlinenoexcept |
Creates an empty RectangleList
|
inline |
Creates a copy of another list
|
inline |
Creates a list containing just one rectangle.
|
inline |
Merges a new rectangle into the list.
The rectangle being added will first be clipped to remove any parts of it that overlap existing rectangles in the list, and adjacent rectangles will be merged into it.
The rectangle can have any size and may be empty, but if it's floating point then it's expected to not contain any INF values.
|
inline |
Merges a new rectangle into the list.
The rectangle being added will first be clipped to remove any parts of it that overlap existing rectangles in the list.
|
inline |
Merges another rectangle list into this one.
Any overlaps between the two lists will be clipped, so that the result is the union of both lists.
|
inline |
Dumbly adds a rectangle to the list without checking for overlaps.
This simply adds the rectangle to the end, it doesn't merge it or remove any overlapping bits.
The rectangle can have any size and may be empty, but if it's floating point then it's expected to not contain any INF values.
|
inlinenoexcept |
Standard method for iterating the rectangles in the list.
|
inline |
Removes all rectangles to leave an empty region.
|
inline |
Removes any areas of the region that lie outside a given rectangle.
Any rectangles in the list which overlap this will be clipped and subdivided if necessary.
Returns true if the resulting region is not empty, false if it is empty.
|
inline |
Removes any areas of the region that lie outside a given rectangle list.
Any rectangles in this object which overlap the specified list will be clipped and subdivided if necessary.
Returns true if the resulting region is not empty, false if it is empty.
|
inline |
Optimises the list into a minimum number of constituent rectangles.
This will try to combine any adjacent rectangles into larger ones where possible, to simplify lists that might have been fragmented by repeated add/subtract calls.
|
inlinenoexcept |
Checks whether the region contains a given point.
|
inlinenoexcept |
Checks whether the region contains a given point.
|
inline |
Checks whether the region contains the whole of a given rectangle.
|
inlinenoexcept |
Standard method for iterating the rectangles in the list.
|
inline |
Increases the internal storage to hold a minimum number of rectangles. Calling this before adding a large number of rectangles means that the array won't have to keep dynamically resizing itself as the elements are added, and it'll therefore be more efficient.
|
inlinenoexcept |
Returns the smallest rectangle that can enclose the whole of this region.
|
inline |
Creates a region which is the result of clipping this one to a given rectangle.
Unlike the other clipTo method, this one doesn't affect this object - it puts the resulting region into the list whose reference is passed-in.
Returns true if the resulting region is not empty, false if it is empty.
|
inlinenoexcept |
Returns the number of rectangles in the list.
|
inlinenoexcept |
Returns one of the rectangles at a particular index.
|
inlinenoexcept |
Checks whether this region intersects any part of another one.
|
inlinenoexcept |
Checks whether the region contains any part of a given rectangle.
|
inlinenoexcept |
Returns true if the region is empty.
|
inlinenoexcept |
Adds an x and y value to all the coordinates.
|
inlinenoexcept |
Adds an x and y value to all the coordinates.
|
inline |
Copies this list from another one.
|
inlinenoexcept |
Scales all the coordinates.
|
inline |
Removes a rectangular region from the list.
Any rectangles in the list which overlap this will be clipped and subdivided if necessary.
|
inline |
Removes all areas in another RectangleList from this one.
Any rectangles in the list which overlap this will be clipped and subdivided if necessary.
|
inlinenoexcept |
Swaps the contents of this and another list.
This swaps their internal pointers, so is hugely faster than using copy-by-value to swap them.
|
inline |
Creates a Path object to represent this region.
|
inlinenoexcept |
Applies a transform to all the rectangles. Obviously this will create a mess if the transform involves any rotation or skewing.