Documentation for <wlr/util/region.h>

Back to index

Table of contents

wlr_region_confine()

bool wlr_region_confine(​const pixman_region32_t *region, double x1, double y1, double x2, double y2, double *x2_out, double *y2_out);

wlr_region_expand()

void wlr_region_expand(​pixman_region32_t *dst, const pixman_region32_t *src, int distance);

Expands the region by distance on both axis. distance must be a non-negative number.

wlr_region_rotated_bounds()

void wlr_region_rotated_bounds(​pixman_region32_t *dst, const pixman_region32_t *src, float rotation, int ox, int oy);

wlr_region_scale()

void wlr_region_scale(​pixman_region32_t *dst, const pixman_region32_t *src, float scale);

Scale a region by the specified factor.

The resulting coordinates are rounded up or down so that the new region is at least as big as the original one if the scale factor is greater or equal to 1.

Also see wlr_region_scale_xy().

wlr_region_scale_xy()

void wlr_region_scale_xy(​pixman_region32_t *dst, const pixman_region32_t *src, float scale_x, float scale_y);

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 up or down so that the new region is at least as big as the original one if the scale factor is greater or equal to 1.

wlr_region_transform()

void wlr_region_transform(​pixman_region32_t *dst, const pixman_region32_t *src, enum wl_output_transform transform, int width, int height);

Applies a transform to a region inside a box of size `width` x `height`.