mirror of
https://github.com/yshui/picom.git
synced 2025-10-30 23:46:46 -04:00
api/backend: change backend_mask_image.origin from ivec2 to vec2
A bit more precision for mask images. An attempt to reduce gaps when window/shadow is scaled. Changelog: Internal: Backend API 2.0 breaking change, backend_mask_image.origin is now a vec2. Signed-off-by: Yuxuan Shui <yshuiv7@gmail.com>
This commit is contained in:
parent
4715498b20
commit
c1b8fea1b6
4 changed files with 15 additions and 11 deletions
|
|
@ -92,7 +92,7 @@ struct backend_mask_image {
|
|||
/// rounded.
|
||||
double corner_radius;
|
||||
/// Origin of the mask image, in the source image's coordinate.
|
||||
ivec2 origin;
|
||||
vec2 origin;
|
||||
/// Whether the mask image should be inverted.
|
||||
bool inverted;
|
||||
};
|
||||
|
|
|
|||
|
|
@ -144,6 +144,10 @@ static inline vec2 vec2_add(vec2 a, vec2 b) {
|
|||
};
|
||||
}
|
||||
|
||||
static inline vec2 vec2_neg(vec2 a) {
|
||||
return (vec2){.x = -a.x, .y = -a.y};
|
||||
}
|
||||
|
||||
static inline vec2 vec2_ceil(vec2 a) {
|
||||
return (vec2){
|
||||
.x = ceil(a.x),
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue