SDL Wiki

SDL_FRect

A structure that contains the definition of a rectangle, with the origin at the upper left.

Data Fields

float

x

the x location of the rectangle's upper left corner

float

y

the y location of the rectangle's upper left corner

float

w

the width of the rectangle

float

h

the height of the rectangle

Version

This function is available since SDL 2.0.10.

Code Examples

SDL_FRect rect;

rect.x = 0.0;
rect.y = 0.0;
rect.w = 32.0;
rect.h = 32.0;

Remarks

An SDL_FRect defines a rectangular area of the screen.

SDL_EncloseFPoints
SDL_FRectEmpty
SDL_FRectEquals
SDL_HasIntersectionF
SDL_IntersectFRect
SDL_IntersectFRectAndLine
SDL_PointInFRect
SDL_UnionFRect

CategoryStruct, CategoryRect


[ edit | delete | history | feedback | raw ]

[ front page | index | search | recent changes | git repo | offline html ]

All wiki content is licensed under Creative Commons Attribution 4.0 International (CC BY 4.0).
Wiki powered by ghwikipp.