diff options
author | Po Lu <luangruo@yahoo.com> | 2022-01-01 09:56:14 +0000 |
---|---|---|
committer | Po Lu <luangruo@yahoo.com> | 2022-01-01 09:56:14 +0000 |
commit | ab3c6c799ea6973ba8496eae3827e8fa2c5caae0 (patch) | |
tree | 8bcee27593ea3a16144d0f85a3e26fb51dbc0ad7 /src/haiku_support.cc | |
parent | c6d83707d6c5b9af67f69d34034a60719584b805 (diff) | |
download | emacs-ab3c6c799ea6973ba8496eae3827e8fa2c5caae0.tar.gz emacs-ab3c6c799ea6973ba8496eae3827e8fa2c5caae0.tar.bz2 emacs-ab3c6c799ea6973ba8496eae3827e8fa2c5caae0.zip |
Fix some more off-by-one errors in Haiku image code
* src/haiku_draw_support.cc (BView_DrawBitmapWithEraseOp):
(BView_DrawMask):
(BBitmap_transform_bitmap):
* src/haiku_support.cc (AttachCairoSurface): Adjust calculations
to take account of BRect width and height functions returning
(start - end) instead of the actual width and height of the
rectangle.
Diffstat (limited to 'src/haiku_support.cc')
-rw-r--r-- | src/haiku_support.cc | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/src/haiku_support.cc b/src/haiku_support.cc index 6a7a043fe06..6a270d338a2 100644 --- a/src/haiku_support.cc +++ b/src/haiku_support.cc @@ -960,8 +960,9 @@ public: gui_abort ("Trying to attach cr surface when one already exists"); cr_surface = cairo_image_surface_create_for_data ((unsigned char *) offscreen_draw_bitmap_1->Bits (), - CAIRO_FORMAT_ARGB32, offscreen_draw_bitmap_1->Bounds ().Width (), - offscreen_draw_bitmap_1->Bounds ().Height (), + CAIRO_FORMAT_ARGB32, + offscreen_draw_bitmap_1->Bounds ().IntegerWidth () + 1, + offscreen_draw_bitmap_1->Bounds ().IntegerHeight () + 1, offscreen_draw_bitmap_1->BytesPerRow ()); if (!cr_surface) gui_abort ("Cr surface allocation failed for double-buffered view"); |