mirror of
https://github.com/fltk/fltk.git
synced 2026-06-05 08:06:35 +08:00
Simpler code path for a member function calling another member function of same class.
git-svn-id: file:///fltk/svn/fltk/branches/branch-1.4@12141 ea41ed52-d2ee-0310-a9c1-e6b18d33e121
This commit is contained in:
@@ -90,7 +90,7 @@ static void set_xmap(Fl_XMap& xmap, COLORREF c) {
|
|||||||
void Fl_GDI_Graphics_Driver::color(Fl_Color i) {
|
void Fl_GDI_Graphics_Driver::color(Fl_Color i) {
|
||||||
if (i & 0xffffff00) {
|
if (i & 0xffffff00) {
|
||||||
unsigned rgb = (unsigned)i;
|
unsigned rgb = (unsigned)i;
|
||||||
fl_color((uchar)(rgb >> 24), (uchar)(rgb >> 16), (uchar)(rgb >> 8));
|
color((uchar)(rgb >> 24), (uchar)(rgb >> 16), (uchar)(rgb >> 8));
|
||||||
} else {
|
} else {
|
||||||
Fl_Graphics_Driver::color(i);
|
Fl_Graphics_Driver::color(i);
|
||||||
Fl_XMap &xmap = fl_xmap[i];
|
Fl_XMap &xmap = fl_xmap[i];
|
||||||
|
|||||||
@@ -58,7 +58,7 @@ void Fl_OpenGL_Graphics_Driver::color(Fl_Color i) {
|
|||||||
*/
|
*/
|
||||||
if (i & 0xffffff00) {
|
if (i & 0xffffff00) {
|
||||||
unsigned rgb = (unsigned)i;
|
unsigned rgb = (unsigned)i;
|
||||||
fl_color((uchar)(rgb >> 24), (uchar)(rgb >> 16), (uchar)(rgb >> 8));
|
color((uchar)(rgb >> 24), (uchar)(rgb >> 16), (uchar)(rgb >> 8));
|
||||||
} else {
|
} else {
|
||||||
Fl_Graphics_Driver::color(i);
|
Fl_Graphics_Driver::color(i);
|
||||||
uchar red, green, blue;
|
uchar red, green, blue;
|
||||||
|
|||||||
@@ -113,7 +113,7 @@ Fl_XColor fl_xmap[1][256];
|
|||||||
void Fl_Xlib_Graphics_Driver::color(Fl_Color i) {
|
void Fl_Xlib_Graphics_Driver::color(Fl_Color i) {
|
||||||
if (i & 0xffffff00) {
|
if (i & 0xffffff00) {
|
||||||
unsigned rgb = (unsigned)i;
|
unsigned rgb = (unsigned)i;
|
||||||
fl_color((uchar)(rgb >> 24), (uchar)(rgb >> 16), (uchar)(rgb >> 8));
|
color((uchar)(rgb >> 24), (uchar)(rgb >> 16), (uchar)(rgb >> 8));
|
||||||
} else {
|
} else {
|
||||||
Fl_Graphics_Driver::color(i);
|
Fl_Graphics_Driver::color(i);
|
||||||
if(!gc_) return; // don't get a default gc if current window is not yet created/valid
|
if(!gc_) return; // don't get a default gc if current window is not yet created/valid
|
||||||
|
|||||||
Reference in New Issue
Block a user