Rect#

Functions

sfBool sfFloatRect_contains(const sfFloatRect *rect, float x, float y)#

Check if a point is inside a rectangle’s area.

Parameters:
  • rect – Rectangle to test

  • x – X coordinate of the point to test

  • y – Y coordinate of the point to test

Returns:

sfTrue if the point is inside

sfBool sfIntRect_contains(const sfIntRect *rect, int x, int y)#
sfBool sfFloatRect_intersects(const sfFloatRect *rect1, const sfFloatRect *rect2, sfFloatRect *intersection)#

Check intersection between two rectangles.

Parameters:
  • rect1 – First rectangle to test

  • rect2 – Second rectangle to test

  • intersection – Rectangle to be filled with overlapping rect (can be NULL)

Returns:

sfTrue if rectangles overlap

sfBool sfIntRect_intersects(const sfIntRect *rect1, const sfIntRect *rect2, sfIntRect *intersection)#
struct sfFloatRect#
#include <Rect.h>

sfFloatRect and sfIntRect are utility classes for manipulating rectangles.

Public Members

float left#
float top#
float width#
float height#
struct sfIntRect#

Public Members

int left#
int top#
int width#
int height#