summaryrefslogtreecommitdiff
path: root/FL
diff options
context:
space:
mode:
authorMatthias Melcher <fltk@matthiasm.com>2016-01-20 21:40:12 +0000
committerMatthias Melcher <fltk@matthiasm.com>2016-01-20 21:40:12 +0000
commit7d0cf9299ae22b7ff6e9bfe1db31a44663ae83e7 (patch)
tree858894bf2ef56823a8c75899bff8501d09de4062 /FL
parentd34974ace7d9beeb991ef387a0b2e6b981659e47 (diff)
Wrapping up fl_rect.cxx implementation. Introducing 3 moer virtual functions to Fl_Graphics_Device - will that break binary compatibility?
git-svn-id: file:///fltk/svn/fltk/branches/branch-1.3-porting@11017 ea41ed52-d2ee-0310-a9c1-e6b18d33e121
Diffstat (limited to 'FL')
-rw-r--r--FL/Fl_Device.H39
1 files changed, 30 insertions, 9 deletions
diff --git a/FL/Fl_Device.H b/FL/Fl_Device.H
index 7a93bf690..246e52782 100644
--- a/FL/Fl_Device.H
+++ b/FL/Fl_Device.H
@@ -117,7 +117,7 @@ public:
/** A 2D coordinate transformation matrix
*/
struct matrix {double a, b, c, d, x, y;};
-private:
+protected:
static const matrix m0;
Fl_Font font_; // current font
Fl_Fontsize size_; // current font size
@@ -331,15 +331,15 @@ protected:
/** \brief see fl_transformed_vertex(double xf, double yf). */
virtual void transformed_vertex(double xf, double yf);
/** \brief see fl_push_clip(int x, int y, int w, int h). */
- virtual void push_clip(int x, int y, int w, int h);
+ virtual void push_clip(int x, int y, int w, int h) = 0;
/** \brief see fl_clip_box(int x, int y, int w, int h, int &X, int &Y, int &W, int &H). */
- virtual int clip_box(int x, int y, int w, int h, int &X, int &Y, int &W, int &H);
+ virtual int clip_box(int x, int y, int w, int h, int &X, int &Y, int &W, int &H) = 0;
/** \brief see fl_not_clipped(int x, int y, int w, int h). */
- virtual int not_clipped(int x, int y, int w, int h);
+ virtual int not_clipped(int x, int y, int w, int h) = 0;
/** \brief see fl_push_no_clip(). */
- virtual void push_no_clip();
+ virtual void push_no_clip() = 0;
/** \brief see fl_pop_clip(). */
- virtual void pop_clip();
+ virtual void pop_clip() = 0;
/** \brief see fl_push_matrix(). */
void push_matrix();
@@ -364,11 +364,11 @@ protected:
/** \brief see fl_transform_dy(double x, double y). */
double transform_dy(double x, double y);
/** \brief see fl_clip_region(). */
- Fl_Region clip_region();
+ virtual Fl_Region clip_region(); // has default implementation
/** \brief see fl_clip_region(Fl_Region r). */
- void clip_region(Fl_Region r);
+ virtual void clip_region(Fl_Region r); // has default implementation
/** \brief see fl_restore_clip(). */
- void restore_clip();
+ virtual void restore_clip(); // has default implementation
// Images
/** \brief see fl_draw_image(const uchar* buf, int X,int Y,int W,int H, int D, int L). */
@@ -490,6 +490,13 @@ public:
void loop(int x0, int y0, int x1, int y1, int x2, int y2, int x3, int y3);
void polygon(int x0, int y0, int x1, int y1, int x2, int y2);
void polygon(int x0, int y0, int x1, int y1, int x2, int y2, int x3, int y3);
+ // --- clipping
+ void push_clip(int x, int y, int w, int h);
+ int clip_box(int x, int y, int w, int h, int &X, int &Y, int &W, int &H);
+ int not_clipped(int x, int y, int w, int h);
+ void push_no_clip();
+ void pop_clip();
+ void restore_clip();
};
// FIXME: add Fl_Quartz_Printer_Graphics_Driver
@@ -543,6 +550,13 @@ public:
void loop(int x0, int y0, int x1, int y1, int x2, int y2, int x3, int y3);
void polygon(int x0, int y0, int x1, int y1, int x2, int y2);
void polygon(int x0, int y0, int x1, int y1, int x2, int y2, int x3, int y3);
+ // --- clipping
+ void push_clip(int x, int y, int w, int h);
+ int clip_box(int x, int y, int w, int h, int &X, int &Y, int &W, int &H);
+ int not_clipped(int x, int y, int w, int h);
+ void push_no_clip();
+ void pop_clip();
+ void restore_clip();
};
/**
@@ -618,6 +632,13 @@ public:
void loop(int x0, int y0, int x1, int y1, int x2, int y2, int x3, int y3);
void polygon(int x0, int y0, int x1, int y1, int x2, int y2);
void polygon(int x0, int y0, int x1, int y1, int x2, int y2, int x3, int y3);
+ // --- clipping
+ void push_clip(int x, int y, int w, int h);
+ int clip_box(int x, int y, int w, int h, int &X, int &Y, int &W, int &H);
+ int not_clipped(int x, int y, int w, int h);
+ void push_no_clip();
+ void pop_clip();
+ void restore_clip();
};
#endif