@@ -37,7 +37,7 @@ twin_pixmap_t *twin_pixmap_create(twin_format_t format,
37
37
pixmap -> height = height ;
38
38
twin_matrix_identity (& pixmap -> transform );
39
39
pixmap -> clip .left = pixmap -> clip .top = 0 ;
40
- pixmap -> clip .right = pixmap -> width - 1 ;
40
+ pixmap -> clip .right = pixmap -> width ;
41
41
pixmap -> clip .bottom = pixmap -> height ;
42
42
pixmap -> origin_x = pixmap -> origin_y = 0 ;
43
43
pixmap -> stride = stride ;
@@ -67,7 +67,7 @@ twin_pixmap_t *twin_pixmap_create_const(twin_format_t format,
67
67
pixmap -> height = height ;
68
68
twin_matrix_identity (& pixmap -> transform );
69
69
pixmap -> clip .left = pixmap -> clip .top = 0 ;
70
- pixmap -> clip .right = pixmap -> width - 1 ;
70
+ pixmap -> clip .right = pixmap -> width ;
71
71
pixmap -> clip .bottom = pixmap -> height ;
72
72
pixmap -> origin_x = pixmap -> origin_y = 0 ;
73
73
pixmap -> stride = stride ;
@@ -231,8 +231,8 @@ void twin_pixmap_clip(twin_pixmap_t *pixmap,
231
231
pixmap -> clip .left = 0 ;
232
232
if (pixmap -> clip .top < 0 )
233
233
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 ;
236
236
if (pixmap -> clip .bottom > pixmap -> height )
237
237
pixmap -> clip .bottom = pixmap -> height ;
238
238
}
@@ -269,7 +269,7 @@ void twin_pixmap_reset_clip(twin_pixmap_t *pixmap)
269
269
{
270
270
pixmap -> clip .left = 0 ;
271
271
pixmap -> clip .top = 0 ;
272
- pixmap -> clip .right = pixmap -> width - 1 ;
272
+ pixmap -> clip .right = pixmap -> width ;
273
273
pixmap -> clip .bottom = pixmap -> height ;
274
274
}
275
275
0 commit comments