|
|
commit 5e4643621b252c36f2cd04bbb066dcae596473bb
Author: Albrecht Schlosser <albrechts.fltk@online.de>
AuthorDate: Wed Nov 23 15:17:43 2022 +0100
Commit: Albrecht Schlosser <albrechts.fltk@online.de>
CommitDate: Wed Nov 23 15:21:34 2022 +0100
Save and restore current color when drawing arrows
Make sure we don't change the current color after we finish drawing.
src/fl_draw_arrow.cxx | 4 ++++
1 file changed, 4 insertions(+)
diff --git src/fl_draw_arrow.cxx src/fl_draw_arrow.cxx
index 2aef438..0bee122 100644
--- src/fl_draw_arrow.cxx
+++ src/fl_draw_arrow.cxx
@@ -220,6 +220,8 @@ static int fl_draw_arrow_choice(Fl_Rect r, Fl_Color col) {
void fl_draw_arrow(Fl_Rect r, Fl_Arrow_Type t, Fl_Orientation o, Fl_Color col) {
int ret = 0;
+ Fl_Color saved_color = fl_color();
+
debug_arrow(r);
// implementation of all arrow types
@@ -253,4 +255,6 @@ void fl_draw_arrow(Fl_Rect r, Fl_Arrow_Type t, Fl_Orientation o, Fl_Color col) {
fl_line(r.x(), r.b(), r.r(), r.y());
}
+ fl_color(saved_color);
+
} // fl_draw_arrow()
[ Direct Link to Message ] | |
|
| |