From 88ce4aec17dbf37de19060f03e543e7bf26fc1af Mon Sep 17 00:00:00 2001 From: Matthias Melcher Date: Sun, 11 Mar 2018 22:00:59 +0000 Subject: Android: Made Fl_Rect virtual. Maybe a bad idea? Also, added rectangular clipping which works. Expanding now to a more complex clipping scheme to make multiple windows work. git-svn-id: file:///fltk/svn/fltk/branches/branch-1.4@12739 ea41ed52-d2ee-0310-a9c1-e6b18d33e121 --- FL/Fl_Rect.H | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) (limited to 'FL') diff --git a/FL/Fl_Rect.H b/FL/Fl_Rect.H index 134521d16..dc09e45a0 100644 --- a/FL/Fl_Rect.H +++ b/FL/Fl_Rect.H @@ -60,14 +60,16 @@ public: Fl_Rect (const Fl_Widget* const widget) : x_(widget->x()), y_(widget->y()), w_(widget->w()), h_(widget->h()) {} + virtual ~Fl_Rect() { } + /** Return 1 if the rectangle is empty, width or height are 0 */ int is_empty() { return (w_<=0)||(h_<=0); } /** Set the position and size */ - void set(int x, int y, int w, int h) { x_=x; y_=y; w_=w; h_=h; } + virtual void set(int x, int y, int w, int h) { x_=x; y_=y; w_=w; h_=h; } /** Clone another rectangle */ - void set(Fl_Rect *r) { x_=r->x_; y_=r->y_; w_=r->w_; h_=r->h_; } + virtual void set(Fl_Rect *r) { x_=r->x_; y_=r->y_; w_=r->w_; h_=r->h_; } /** return 0 if the rectangles are different, or 1 if they are the same */ int equals(int x, int y, int w, int h) { return ( (x_==x) && (y_==y) && (w_==w) && (h_==h) ); } -- cgit v1.2.3