@@ -37,7 +37,7 @@ twin_pixmap_t *twin_pixmap_create(twin_format_t format,
3737 pixmap -> height = height ;
3838 twin_matrix_identity (& pixmap -> transform );
3939 pixmap -> clip .left = pixmap -> clip .top = 0 ;
40- pixmap -> clip .right = pixmap -> width - 1 ;
40+ pixmap -> clip .right = pixmap -> width ;
4141 pixmap -> clip .bottom = pixmap -> height ;
4242 pixmap -> origin_x = pixmap -> origin_y = 0 ;
4343 pixmap -> stride = stride ;
@@ -67,7 +67,7 @@ twin_pixmap_t *twin_pixmap_create_const(twin_format_t format,
6767 pixmap -> height = height ;
6868 twin_matrix_identity (& pixmap -> transform );
6969 pixmap -> clip .left = pixmap -> clip .top = 0 ;
70- pixmap -> clip .right = pixmap -> width - 1 ;
70+ pixmap -> clip .right = pixmap -> width ;
7171 pixmap -> clip .bottom = pixmap -> height ;
7272 pixmap -> origin_x = pixmap -> origin_y = 0 ;
7373 pixmap -> stride = stride ;
@@ -231,8 +231,8 @@ void twin_pixmap_clip(twin_pixmap_t *pixmap,
231231 pixmap -> clip .left = 0 ;
232232 if (pixmap -> clip .top < 0 )
233233 pixmap -> clip .top = 0 ;
234- if (pixmap -> clip .right > pixmap -> width - 1 )
235- pixmap -> clip .right = pixmap -> width - 1 ;
234+ if (pixmap -> clip .right > pixmap -> width )
235+ pixmap -> clip .right = pixmap -> width ;
236236 if (pixmap -> clip .bottom > pixmap -> height )
237237 pixmap -> clip .bottom = pixmap -> height ;
238238}
@@ -269,7 +269,7 @@ void twin_pixmap_reset_clip(twin_pixmap_t *pixmap)
269269{
270270 pixmap -> clip .left = 0 ;
271271 pixmap -> clip .top = 0 ;
272- pixmap -> clip .right = pixmap -> width - 1 ;
272+ pixmap -> clip .right = pixmap -> width ;
273273 pixmap -> clip .bottom = pixmap -> height ;
274274}
275275
0 commit comments