diff --git a/apps/multi.c b/apps/multi.c index e2f08c1..2108eeb 100644 --- a/apps/multi.c +++ b/apps/multi.c @@ -39,7 +39,7 @@ static void apps_circletext_start(twin_screen_t *screen, { twin_window_t *window = twin_window_create( screen, TWIN_ARGB32, TwinWindowApplication, x, y, w, h); - int wid = window->client.right - window->client.left; + int wid = window->client.right - window->client.left + 1; int hei = window->client.bottom - window->client.top; twin_pixmap_t *pixmap = window->pixmap; twin_path_t *path = twin_path_create(); @@ -84,7 +84,7 @@ static void apps_quickbrown_start(twin_screen_t *screen, { twin_window_t *window = twin_window_create( screen, TWIN_ARGB32, TwinWindowApplication, x, y, w, h); - int wid = window->client.right - window->client.left; + int wid = window->client.right - window->client.left + 1; int hei = window->client.bottom - window->client.top; twin_pixmap_t *pixmap = window->pixmap; twin_path_t *path = twin_path_create(); @@ -127,7 +127,7 @@ static void apps_ascii_start(twin_screen_t *screen, int x, int y, int w, int h) { twin_window_t *window = twin_window_create( screen, TWIN_ARGB32, TwinWindowApplication, x, y, w, h); - int wid = window->client.right - window->client.left; + int wid = window->client.right - window->client.left + 1; int hei = window->client.bottom - window->client.top; twin_pixmap_t *pixmap = window->pixmap; twin_path_t *path = twin_path_create(); diff --git a/src/path.c b/src/path.c index 6bc7a7e..75d590c 100644 --- a/src/path.c +++ b/src/path.c @@ -612,7 +612,7 @@ void twin_composite_path(twin_pixmap_t *dst, if (bounds.left >= bounds.right || bounds.top >= bounds.bottom) return; - twin_coord_t width = bounds.right - bounds.left; + twin_coord_t width = bounds.right - bounds.left + 1; twin_coord_t height = bounds.bottom - bounds.top; twin_pixmap_t *mask = twin_pixmap_create(TWIN_A8, width, height); if (!mask)