TinyGPU
Loading...
Searching...
No Matches
Static Public Member Functions | Public Attributes | List of all members
Rect Struct Reference

Represents a rectangular area on the screen or surface. More...

#include <SpriteInfo.h>

Static Public Member Functions

static Rect intersect (const Rect &first, const Rect &second)
 Returns the intersection rectangle of two rectangles.
 

Public Attributes

size_t x = 0
 
size_t y = 0
 
size_t width = 0
 
size_t height = 0
 

Detailed Description

Represents a rectangular area on the screen or surface.

The Rect structure is used to define a rectangle by its top-left corner coordinates (x, y) and its dimensions (width, height). It is commonly used for sprite placement, collision detection, and drawing operations.

Member Function Documentation

◆ intersect()

static Rect intersect ( const Rect &  first,
const Rect &  second 
)
inlinestatic

Returns the intersection rectangle of two rectangles.

Member Data Documentation

◆ height

size_t height = 0

◆ width

size_t width = 0

◆ x

size_t x = 0

◆ y

size_t y = 0

The documentation for this struct was generated from the following file: