Documentation for <wlr/util/region.h>

Back to index

Table of contents

wlr_region_confine()

bool wlr_region_confine(​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, pixman_region32_t *src, int distance);

Expands the region of `distance`. If `distance` is negative, it shrinks the region.

wlr_region_rotated_bounds()

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

wlr_region_scale()

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

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.

wlr_region_scale_xy()

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

wlr_region_transform()

void wlr_region_transform(​pixman_region32_t *dst, 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`.