mirror of
https://github.com/fltk/fltk.git
synced 2026-06-01 23:06:54 +08:00
Mac OS: allow using fl_color(r,g,b) without drawing context.
git-svn-id: file:///fltk/svn/fltk/branches/branch-1.3@10739 ea41ed52-d2ee-0310-a9c1-e6b18d33e121
This commit is contained in:
@@ -63,6 +63,7 @@ void Fl_Quartz_Graphics_Driver::color(uchar r, uchar g, uchar b) {
|
|||||||
float fr = r/255.0f;
|
float fr = r/255.0f;
|
||||||
float fg = g/255.0f;
|
float fg = g/255.0f;
|
||||||
float fb = b/255.0f;
|
float fb = b/255.0f;
|
||||||
|
if (!fl_gc) return; // no context yet? We will assign the color later.
|
||||||
CGContextSetRGBFillColor(fl_gc, fr, fg, fb, 1.0f);
|
CGContextSetRGBFillColor(fl_gc, fr, fg, fb, 1.0f);
|
||||||
CGContextSetRGBStrokeColor(fl_gc, fr, fg, fb, 1.0f);
|
CGContextSetRGBStrokeColor(fl_gc, fr, fg, fb, 1.0f);
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user