Const the remaining fl_gray_ramp references.

These were nastily done by extern, and so unnoticable in a non-LTO build.


git-svn-id: file:///fltk/svn/fltk/branches/branch-1.3@10257 ea41ed52-d2ee-0310-a9c1-e6b18d33e121
This commit is contained in:
Lauri Kasanen 2014-08-28 08:26:41 +00:00
parent 9a4ae935a1
commit ca904c01ad
3 changed files with 12 additions and 12 deletions

View File

@ -25,7 +25,7 @@
#include <FL/Fl.H>
#include <FL/fl_draw.H>
extern uchar* fl_gray_ramp();
extern const uchar* fl_gray_ramp();
static void fl_diamond_up_box(int x,int y,int w,int h,Fl_Color bgcolor) {
w &= -2;
@ -33,7 +33,7 @@ static void fl_diamond_up_box(int x,int y,int w,int h,Fl_Color bgcolor) {
int x1 = x+w/2;
int y1 = y+h/2;
fl_color(bgcolor); fl_polygon(x+3, y1, x1,y+3, x+w-3,y1, x1,y+h-3);
uchar *g = fl_gray_ramp();
const uchar *g = fl_gray_ramp();
fl_color(g['W']); fl_line(x+1, y1, x1, y+1, x+w-1, y1);
fl_color(g['U']); fl_line(x+2, y1, x1, y+2, x+w-2, y1);
fl_color(g['S']); fl_line(x+3, y1, x1, y+3, x+w-3, y1);
@ -48,7 +48,7 @@ static void fl_diamond_down_box(int x,int y,int w,int h,Fl_Color bgcolor) {
h &= -2;
int x1 = x+w/2;
int y1 = y+h/2;
uchar *g = fl_gray_ramp();
const uchar *g = fl_gray_ramp();
fl_color(g['P']); fl_line(x+0, y1, x1, y+0, x+w-0, y1);
fl_color(g['N']); fl_line(x+1, y1, x1, y+1, x+w-1, y1);
fl_color(g['H']); fl_line(x+2, y1, x1, y+2, x+w-2, y1);

View File

@ -35,7 +35,7 @@
//#define USE_OLD_PLASTIC_BOX
#define USE_OLD_PLASTIC_COLOR
extern uchar *fl_gray_ramp();
extern const uchar *fl_gray_ramp();
inline Fl_Color shade_color(uchar gc, Fl_Color bc) {
#ifdef USE_OLD_PLASTIC_COLOR
@ -71,7 +71,7 @@ inline Fl_Color shade_color(uchar gc, Fl_Color bc) {
static void frame_rect(int x, int y, int w, int h, const char *c, Fl_Color bc) {
uchar *g = fl_gray_ramp();
const uchar *g = fl_gray_ramp();
int b = ((int) strlen(c)) / 4 + 1;
for (x += b, y += b, w -= 2 * b, h -= 2 * b; b > 1; b --)
@ -91,7 +91,7 @@ static void frame_rect(int x, int y, int w, int h, const char *c, Fl_Color bc) {
static void frame_round(int x, int y, int w, int h, const char *c, Fl_Color bc) {
uchar *g = fl_gray_ramp();
const uchar *g = fl_gray_ramp();
size_t b = strlen(c) / 4 + 1;
if (w==h) {
@ -145,7 +145,7 @@ static void frame_round(int x, int y, int w, int h, const char *c, Fl_Color bc)
static void shade_rect(int x, int y, int w, int h, const char *c, Fl_Color bc) {
uchar *g = fl_gray_ramp();
const uchar *g = fl_gray_ramp();
int i, j;
int clen = (int) strlen(c) - 1;
int chalf = clen / 2;
@ -217,7 +217,7 @@ static void shade_rect(int x, int y, int w, int h, const char *c, Fl_Color bc) {
}
static void shade_round(int x, int y, int w, int h, const char *c, Fl_Color bc) {
uchar *g = fl_gray_ramp();
const uchar *g = fl_gray_ramp();
int i;
int clen = (int) (strlen(c) - 1);
int chalf = clen / 2;
@ -277,7 +277,7 @@ static void up_frame(int x, int y, int w, int h, Fl_Color c) {
static void narrow_thin_box(int x, int y, int w, int h, Fl_Color c) {
if (h<=0 || w<=0) return;
uchar *g = fl_gray_ramp();
const uchar *g = fl_gray_ramp();
fl_color(shade_color(g['R'], c));
fl_rectf(x+1, y+1, w-2, h-2);
fl_color(shade_color(g['I'], c));

View File

@ -71,10 +71,10 @@ static void draw(int which, int x,int y,int w,int h, int inset, Fl_Color color)
}
}
extern uchar* fl_gray_ramp();
extern const uchar* fl_gray_ramp();
void fl_round_down_box(int x, int y, int w, int h, Fl_Color bgcolor) {
uchar *g = fl_gray_ramp();
const uchar *g = fl_gray_ramp();
draw(FILL, x, y, w, h, 2, bgcolor);
draw(UPPER_LEFT, x+1, y, w-2, h, 0, (Fl_Color)g['N']);
draw(UPPER_LEFT, x+1, y, w-2, h, 1, (Fl_Color)g['H']);
@ -88,7 +88,7 @@ void fl_round_down_box(int x, int y, int w, int h, Fl_Color bgcolor) {
}
void fl_round_up_box(int x, int y, int w, int h, Fl_Color bgcolor) {
uchar *g = fl_gray_ramp();
const uchar *g = fl_gray_ramp();
draw(FILL, x, y, w, h, 2, bgcolor);
draw(LOWER_RIGHT, x+1, y, w-2, h, 0, (Fl_Color)g['H']);
draw(LOWER_RIGHT, x+1, y, w-2, h, 1, (Fl_Color)g['N']);