Vuo 2.4.4
Loading...
Searching...
No Matches
Classes | Macros | Functions
VuoRectangle.h File Reference

Description

VuoRectangle C type definition.

Definition in file VuoRectangle.h.

Go to the source code of this file.

Classes

struct  VuoRectangle
 A 2-dimensional axis-aligned box. More...
 

Macros

#define VuoRectangle_SUPPORTS_COMPARISON
 Instances of this type can be compared and sorted.
 

Functions

VuoRectangle VuoRectangle_makeFromJson (json_object *js)
 Decodes the JSON object js to create a new value.
 
json_object * VuoRectangle_getJson (const VuoRectangle r)
 Encodes r as a JSON object.
 
char * VuoRectangle_getSummary (const VuoRectangle r)
 Returns a compact string representation of r (comma-separated coordinates).
 
bool VuoRectangle_areEqual (const VuoRectangle a, const VuoRectangle b)
 Returns true if the two rectangles are equal (within tolerance).
 
bool VuoRectangle_isLessThan (const VuoRectangle a, const VuoRectangle b)
 Compares a to b primarily by center-value and secondarily by size-value, returning true if a is less than b.
 
static VuoRectangle VuoRectangle_make (float centerX, float centerY, float width, float height) __attribute__((const))
 Returns a rectangle with the specified coordinates.
 
static VuoRectangle VuoRectangle_makeTopLeft (float leftX, float topY, float width, float height) __attribute__((const))
 Returns a rectangle with the specified coordinates.
 
bool VuoRectangle_isPointInside (VuoRectangle r, VuoPoint2d p)
 Returns true if p is inside r.
 
VuoRectangle VuoRectangle_intersection (VuoRectangle rectangleA, VuoRectangle rectangleB)
 Returns the intersecting area of rectangleA and rectangleB.
 
VuoRectangle VuoRectangle_union (VuoRectangle rectangleA, VuoRectangle rectangleB)
 Returns the union area of rectangleA and rectangleB.
 
char * VuoRectangle_getString (const VuoRectangle r)
 Automatically generated function.
 
void VuoRectangle_retain (VuoRectangle r)
 Automatically generated function.
 
void VuoRectangle_release (VuoRectangle r)
 Automatically generated function.