mirror of
https://codeberg.org/vyivel/dulcepan/
synced 2025-03-12 18:59:15 +02:00
Fix selection size rounding
This commit is contained in:
parent
cd836cc6fa
commit
4c7575b10e
@ -347,7 +347,8 @@ static void redraw(struct dp_output *output) {
|
||||
if (output == selection->output) {
|
||||
double scale = output->scale;
|
||||
double x = round(selection->x * scale), y = round(selection->y * scale);
|
||||
double width = round(selection->width * scale), height = round(selection->height * scale);
|
||||
double width = round((selection->x + selection->width) * scale) - x,
|
||||
height = round((selection->y + selection->height) * scale) - y;
|
||||
|
||||
int border_size = config->border_size;
|
||||
if (border_size != 0 && width != 0 && height != 0) {
|
||||
|
@ -143,8 +143,8 @@ void dp_save(struct dp_state *state) {
|
||||
double scale = output->scale;
|
||||
|
||||
int x = (int)round(selection->x * scale), y = (int)round(selection->y * scale);
|
||||
int width = (int)round(selection->width * scale),
|
||||
height = (int)round(selection->height * scale);
|
||||
int width = (int)round((selection->x + selection->width) * scale) - x,
|
||||
height = (int)round((selection->y + selection->height) * scale) - y;
|
||||
|
||||
pixman_image_t *out_image = pixman_image_create_bits(PIXMAN_a8b8g8r8, width, height, NULL, 0);
|
||||
pixman_image_composite32(
|
||||
|
Loading…
x
Reference in New Issue
Block a user