Replaced all occurrences of the deprecated fl_clip() function by
fl_push_clip(). git-svn-id: file:///fltk/svn/fltk/branches/branch-1.3@6551 ea41ed52-d2ee-0310-a9c1-e6b18d33e121
This commit is contained in:
parent
e907ce4a11
commit
fbea5019fb
@ -376,7 +376,7 @@ inline void fl_set_font_name(Fl_Font n,const char* s) {Fl::set_font(n,s);}
|
||||
|
||||
inline void fl_mapcolor(Fl_Color c, uchar r, uchar g, uchar b) {Fl::set_color(c,r,g,b);}
|
||||
|
||||
#define fl_set_clipping(x,y,w,h) fl_clip(x,y,w,h)
|
||||
#define fl_set_clipping(x,y,w,h) fl_push_clip(x,y,w,h)
|
||||
#define fl_unset_clipping() fl_pop_clip()
|
||||
|
||||
////////////////////////////////////////////////////////////////
|
||||
|
@ -399,7 +399,7 @@ J1:
|
||||
|
||||
bbox(X, Y, W, H);
|
||||
|
||||
fl_clip(X, Y, W, H);
|
||||
fl_push_clip(X, Y, W, H);
|
||||
// for each line, draw it if full redraw or scrolled. Erase background
|
||||
// if not a full redraw or if it is selected:
|
||||
void* l = top();
|
||||
|
@ -83,7 +83,7 @@ void Fl_Choice::draw() {
|
||||
// ERCO
|
||||
int xx = x() + dx, yy = y() + dy + 1, ww = w() - W, hh = H - 2;
|
||||
|
||||
fl_clip(xx, yy, ww, hh);
|
||||
fl_push_clip(xx, yy, ww, hh);
|
||||
|
||||
if ( Fl::scheme()) {
|
||||
Fl_Label l;
|
||||
|
@ -316,7 +316,7 @@ void Flcc_HueBox::draw() {
|
||||
int yy1 = y()+Fl::box_dy(box());
|
||||
int w1 = w()-Fl::box_dw(box());
|
||||
int h1 = h()-Fl::box_dh(box());
|
||||
if (damage() == FL_DAMAGE_EXPOSE) fl_clip(x1+px,yy1+py,6,6);
|
||||
if (damage() == FL_DAMAGE_EXPOSE) fl_push_clip(x1+px,yy1+py,6,6);
|
||||
fl_draw_image(generate_image, this, x1, yy1, w1, h1);
|
||||
if (damage() == FL_DAMAGE_EXPOSE) fl_pop_clip();
|
||||
Fl_Color_Chooser* c = (Fl_Color_Chooser*)parent();
|
||||
@ -390,7 +390,7 @@ void Flcc_ValueBox::draw() {
|
||||
int yy1 = y()+Fl::box_dy(box());
|
||||
int w1 = w()-Fl::box_dw(box());
|
||||
int h1 = h()-Fl::box_dh(box());
|
||||
if (damage() == FL_DAMAGE_EXPOSE) fl_clip(x1,yy1+py,w1,6);
|
||||
if (damage() == FL_DAMAGE_EXPOSE) fl_push_clip(x1,yy1+py,w1,6);
|
||||
fl_draw_image(generate_vimage, this, x1, yy1, w1, h1);
|
||||
if (damage() == FL_DAMAGE_EXPOSE) fl_pop_clip();
|
||||
int Y = int((1-c->value()) * (h1-6));
|
||||
|
@ -247,7 +247,7 @@ void Fl_Input_::drawtext(int X, int Y, int W, int H) {
|
||||
yscroll_ = -(H-height)/2;
|
||||
}
|
||||
|
||||
fl_clip(X, Y, W, H);
|
||||
fl_push_clip(X, Y, W, H);
|
||||
Fl_Color tc = active_r() ? textcolor() : fl_inactive(textcolor());
|
||||
|
||||
p = value();
|
||||
|
@ -78,7 +78,7 @@ void Fl_Progress::draw()
|
||||
Fl_Color c = labelcolor();
|
||||
labelcolor(fl_contrast(labelcolor(), color2()));
|
||||
|
||||
fl_clip(x(), y(), progress + bx, h());
|
||||
fl_push_clip(x(), y(), progress + bx, h());
|
||||
draw_box(box(), x(), y(), w(), h(), active_r() ? color2() : fl_inactive(color2()));
|
||||
draw_label(tx, y() + by, tw, h() - bh);
|
||||
fl_pop_clip();
|
||||
@ -86,7 +86,7 @@ void Fl_Progress::draw()
|
||||
labelcolor(c);
|
||||
|
||||
if (progress<w()) {
|
||||
fl_clip(tx + progress, y(), w() - progress, h());
|
||||
fl_push_clip(tx + progress, y(), w() - progress, h());
|
||||
draw_box(box(), x(), y(), w(), h(), active_r() ? color() : fl_inactive(color()));
|
||||
draw_label(tx, y() + by, tw, h() - bh);
|
||||
fl_pop_clip();
|
||||
|
@ -53,7 +53,7 @@ void Fl_Scroll::fix_scrollbar_order() {
|
||||
}
|
||||
|
||||
void Fl_Scroll::draw_clip(void* v,int X, int Y, int W, int H) {
|
||||
fl_clip(X,Y,W,H);
|
||||
fl_push_clip(X,Y,W,H);
|
||||
Fl_Scroll* s = (Fl_Scroll*)v;
|
||||
// erase background as needed...
|
||||
switch (s->box()) {
|
||||
@ -140,7 +140,7 @@ void Fl_Scroll::draw() {
|
||||
if (B < (Y + H)) draw_clip(this, X, B, W, Y + H - B);
|
||||
}
|
||||
if (d & FL_DAMAGE_CHILD) { // draw damaged children
|
||||
fl_clip(X, Y, W, H);
|
||||
fl_push_clip(X, Y, W, H);
|
||||
Fl_Widget*const* a = array();
|
||||
for (int i=children()-2; i--;) update_child(**a++);
|
||||
fl_pop_clip();
|
||||
|
@ -345,8 +345,8 @@ void Fl_Tabs::draw_tab(int x1, int x2, int W, int H, Fl_Widget* o, int what) {
|
||||
if ((x2 < x1+W) && what == RIGHT) x1 = x2 - W;
|
||||
|
||||
if (H >= 0) {
|
||||
if (sel) fl_clip(x1, y(), x2 - x1, H + dh - dy);
|
||||
else fl_clip(x1, y(), x2 - x1, H);
|
||||
if (sel) fl_push_clip(x1, y(), x2 - x1, H + dh - dy);
|
||||
else fl_push_clip(x1, y(), x2 - x1, H);
|
||||
|
||||
H += dh;
|
||||
|
||||
@ -371,8 +371,8 @@ void Fl_Tabs::draw_tab(int x1, int x2, int W, int H, Fl_Widget* o, int what) {
|
||||
} else {
|
||||
H = -H;
|
||||
|
||||
if (sel) fl_clip(x1, y() + h() - H - dy, x2 - x1, H + dy);
|
||||
else fl_clip(x1, y() + h() - H, x2 - x1, H);
|
||||
if (sel) fl_push_clip(x1, y() + h() - H - dy, x2 - x1, H + dy);
|
||||
else fl_push_clip(x1, y() + h() - H, x2 - x1, H);
|
||||
|
||||
H += dh;
|
||||
|
||||
|
@ -111,7 +111,7 @@ Fl_Tiled_Image::draw(int X, // I - Starting X position
|
||||
if (W == 0) W = Fl::w();
|
||||
if (H == 0) H = Fl::h();
|
||||
|
||||
fl_clip(X, Y, W, H);
|
||||
fl_push_clip(X, Y, W, H);
|
||||
|
||||
X += cx;
|
||||
Y += cy;
|
||||
|
@ -347,7 +347,7 @@ void fl_draw(
|
||||
int draw_symbols) {
|
||||
if ((!str || !*str) && !img) return;
|
||||
if (w && h && !fl_not_clipped(x, y, w, h) && (align & FL_ALIGN_INSIDE)) return;
|
||||
if (align & FL_ALIGN_CLIP) fl_clip(x, y, w, h);
|
||||
if (align & FL_ALIGN_CLIP) fl_push_clip(x, y, w, h);
|
||||
fl_draw(str, x, y, w, h, align, fl_draw, img, draw_symbols);
|
||||
if (align & FL_ALIGN_CLIP) fl_pop_clip();
|
||||
}
|
||||
|
@ -39,7 +39,7 @@ static void innards(
|
||||
{
|
||||
Fl_Align a1 = align;
|
||||
if (a1 & FL_ALIGN_CLIP) {
|
||||
fl_clip(X, Y, W, H); a1 = (Fl_Align)(a1&~FL_ALIGN_CLIP);}
|
||||
fl_push_clip(X, Y, W, H); a1 = (Fl_Align)(a1&~FL_ALIGN_CLIP);}
|
||||
fl_font((Fl_Font)o->font, o->size);
|
||||
for (int i = 0; i < n; i++) {
|
||||
fl_color((Fl_Color)(i < n-1 ? data[i][2] : o->color));
|
||||
|
@ -35,7 +35,7 @@ const char* name[6] = {"X", "Y", "R", "start", "end", "rotate"};
|
||||
|
||||
class Drawing : public Fl_Widget {
|
||||
void draw() {
|
||||
fl_clip(x(),y(),w(),h());
|
||||
fl_push_clip(x(),y(),w(),h());
|
||||
fl_color(FL_DARK3);
|
||||
fl_rectf(x(),y(),w(),h());
|
||||
fl_push_matrix();
|
||||
|
@ -40,7 +40,7 @@ int points;
|
||||
|
||||
class Drawing : public Fl_Widget {
|
||||
void draw() {
|
||||
fl_clip(x(),y(),w(),h());
|
||||
fl_push_clip(x(),y(),w(),h());
|
||||
fl_color(FL_DARK3);
|
||||
fl_rectf(x(),y(),w(),h());
|
||||
fl_push_matrix();
|
||||
|
Loading…
x
Reference in New Issue
Block a user