mirror of
https://gitlab.freedesktop.org/wlroots/wlroots.git
synced 2026-02-06 04:06:11 -05:00
util/region: add fractional region helpers
Signed-off-by: Loukas Agorgianitis <loukas@agorgianitis.com>
This commit is contained in:
parent
f6ee38c67e
commit
2ab8f41750
2 changed files with 73 additions and 0 deletions
|
|
@ -44,6 +44,31 @@ void wlr_region_scale(pixman_region32_t *dst, const pixman_region32_t *src,
|
|||
void wlr_region_scale_xy(pixman_region32_t *dst, const pixman_region32_t *src,
|
||||
float scale_x, float scale_y);
|
||||
|
||||
/**
|
||||
* Scale a fractional region by the specified factor.
|
||||
*
|
||||
* The resulting coordinates are rounded to nearest integer.
|
||||
*
|
||||
* Also see wlr_region_scalef_xy().
|
||||
*/
|
||||
void wlr_region_scalef(pixman_region32_t *dst, const pixman_region64f_t *src,
|
||||
float scale);
|
||||
|
||||
/**
|
||||
* Scale a region by the specified factors.
|
||||
*
|
||||
* The X and Y coordinates are scaled separately by scale_x and scale_y.
|
||||
*
|
||||
* The resulting coordinates are rounded to nearest integer.
|
||||
*/
|
||||
void wlr_region_scalef_xy(pixman_region32_t *dst, const pixman_region64f_t *src,
|
||||
float scale_x, float scale_y);
|
||||
|
||||
/**
|
||||
* Copy an integer region into a fractional region.
|
||||
*/
|
||||
void wlr_region64f_copy_from_region32(pixman_region64f_t *dst, const pixman_region32_t *src);
|
||||
|
||||
/**
|
||||
* Applies a transform to a region inside a box of size `width` x `height`.
|
||||
*/
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue