summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorManoloFLTK <41016272+ManoloFLTK@users.noreply.github.com>2022-10-10 07:08:00 +0200
committerManoloFLTK <41016272+ManoloFLTK@users.noreply.github.com>2022-10-10 07:08:00 +0200
commit7fa677f93ea91fe06323d62ccb7bbbdd17f544f3 (patch)
tree453298e26ca5d1bc00b7cbddeca4a8986397eea6
parentcae2b2883bba3b666cfa5b8ba95eecbf0b8e2dea (diff)
Fix for issue #511: allow fl_circle() even without calls to fl_begin/end_loop/polygon().
-rw-r--r--src/drivers/Cairo/Fl_Cairo_Graphics_Driver.cxx2
-rw-r--r--src/drivers/PostScript/Fl_PostScript.cxx1
2 files changed, 3 insertions, 0 deletions
diff --git a/src/drivers/Cairo/Fl_Cairo_Graphics_Driver.cxx b/src/drivers/Cairo/Fl_Cairo_Graphics_Driver.cxx
index 4421bd610..238d99f9b 100644
--- a/src/drivers/Cairo/Fl_Cairo_Graphics_Driver.cxx
+++ b/src/drivers/Cairo/Fl_Cairo_Graphics_Driver.cxx
@@ -79,6 +79,7 @@ Fl_Cairo_Graphics_Driver::Fl_Cairo_Graphics_Driver() : Fl_Graphics_Driver() {
angle = 0;
left_margin = top_margin = 0;
needs_commit_tag_ = NULL;
+ shape_ = NONE;
}
Fl_Cairo_Graphics_Driver::~Fl_Cairo_Graphics_Driver() {
@@ -454,6 +455,7 @@ void Fl_Cairo_Graphics_Driver::circle(double x, double y, double r){
cairo_save(cairo_);
concat();
cairo_arc(cairo_, x, y, r, 0, 2*M_PI);
+ cairo_stroke(cairo_);
reconcat();
cairo_restore(cairo_);
} else {
diff --git a/src/drivers/PostScript/Fl_PostScript.cxx b/src/drivers/PostScript/Fl_PostScript.cxx
index 0022412e5..5e09e7fec 100644
--- a/src/drivers/PostScript/Fl_PostScript.cxx
+++ b/src/drivers/PostScript/Fl_PostScript.cxx
@@ -149,6 +149,7 @@ Fl_PostScript_Graphics_Driver::Fl_PostScript_Graphics_Driver(void)
scale_x = scale_y = 1.;
bg_r = bg_g = bg_b = 255;
clip_ = NULL;
+ shape_ = NONE;
}
/** \brief The destructor. */