[master] 78aa959 - Fix Fl_Cairo_Graphics_Driver::rect and Fl_Cairo_Graphics_Driver::rectf

FLTK matrix user chat room
(using Element browser app)   FLTK gitter user chat room   GitHub FLTK Project   FLTK News RSS Feed  
  FLTK Apps      FLTK Library      Forums      Links     Login 
 All Forums  |  Back to fltk.commit  ]
 
Previous Message ]Next Message ]

[master] 78aa959 - Fix Fl_Cairo_Graphics_Driver::rect and Fl_Cairo_Graphics_Driver::rectf "ManoloFLTK" 05:02 Apr 14 top right image
 
commit 78aa959ab9220edae727f9d3dea1e2012c7a6892
Author:     ManoloFLTK <41016272+ManoloFLTK@users.noreply.github.com>
AuthorDate: Wed Apr 14 13:59:16 2021 +0200
Commit:     ManoloFLTK <41016272+ManoloFLTK@users.noreply.github.com>
CommitDate: Wed Apr 14 13:59:16 2021 +0200

    Fix Fl_Cairo_Graphics_Driver::rect and Fl_Cairo_Graphics_Driver::rectf

 src/drivers/Cairo/Fl_Cairo_Graphics_Driver.cxx | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git src/drivers/Cairo/Fl_Cairo_Graphics_Driver.cxx src/drivers/Cairo/Fl_Cairo_Graphics_Driver.cxx
index b9d573a..881d2cb 100644
--- src/drivers/Cairo/Fl_Cairo_Graphics_Driver.cxx
+++ src/drivers/Cairo/Fl_Cairo_Graphics_Driver.cxx
@@ -67,13 +67,13 @@ Fl_Cairo_Graphics_Driver::~Fl_Cairo_Graphics_Driver() {}
 
 
 void Fl_Cairo_Graphics_Driver::rectf(int x, int y, int w, int h) {
-  cairo_rectangle(cairo_, x, y, w, h);
+  cairo_rectangle(cairo_, x-0.5, y-0.5, w, h);
   cairo_fill(cairo_);
   check_status();
 }
 
 void Fl_Cairo_Graphics_Driver::rect(int x, int y, int w, int h) {
-  cairo_rectangle(cairo_, x, y, w, h);
+  cairo_rectangle(cairo_, x, y, w-1, h-1);
   cairo_stroke(cairo_);
   check_status();
 }
Direct Link to Message ]
 
bottom left image   bottom right image
Previous Message ]Next Message ]
 
 

Comments are owned by the poster. All other content is copyright 1998-2022 by Bill Spitzak and others. This project is hosted by The FLTK Team. Please report site problems to 'erco@seriss.com'.