2018-01-25 19:15:20 +01:00
|
|
|
#ifndef WLR_UTIL_REGION_H
|
|
|
|
#define WLR_UTIL_REGION_H
|
|
|
|
|
|
|
|
#include <pixman.h>
|
2018-01-26 22:11:09 +01:00
|
|
|
#include <wayland-server.h>
|
2018-01-25 19:15:20 +01:00
|
|
|
|
2018-01-25 21:54:51 +01:00
|
|
|
/**
|
|
|
|
* Scales a region, ie. multiplies all its coordinates by `scale`.
|
|
|
|
*
|
|
|
|
* The resulting coordinates are rounded up or down so that the new region is
|
|
|
|
* at least as big as the original one.
|
|
|
|
*/
|
2018-01-25 19:15:20 +01:00
|
|
|
void wlr_region_scale(pixman_region32_t *dst, pixman_region32_t *src,
|
|
|
|
float scale);
|
|
|
|
|
2018-01-26 22:11:09 +01:00
|
|
|
/**
|
|
|
|
* Applies a transform to a region inside a box of size `width` x `height`.
|
|
|
|
*/
|
|
|
|
void wlr_region_transform(pixman_region32_t *dst, pixman_region32_t *src,
|
|
|
|
enum wl_output_transform transform, int width, int height);
|
|
|
|
|
2018-01-30 12:01:10 +01:00
|
|
|
/**
|
|
|
|
* Expands the region of `distance`. If `distance` is negative, it shrinks the
|
|
|
|
* region.
|
|
|
|
*/
|
|
|
|
void wlr_region_expand(pixman_region32_t *dst, pixman_region32_t *src,
|
|
|
|
int distance);
|
|
|
|
|
2018-01-25 19:15:20 +01:00
|
|
|
#endif
|