Give a meaningful default implementation to a few more member functions of class Fl_Graphics_Driver.

This commit is contained in:
ManoloFLTK 2018-12-04 12:57:32 +01:00
parent 7278a53758
commit b985b884f8
2 changed files with 63 additions and 10 deletions

View File

@ -269,27 +269,27 @@ public:
/** see fl_line(int, int, int, int) */ /** see fl_line(int, int, int, int) */
virtual void line(int x, int y, int x1, int y1) {} virtual void line(int x, int y, int x1, int y1) {}
/** see fl_line(int, int, int, int, int, int) */ /** see fl_line(int, int, int, int, int, int) */
virtual void line(int x, int y, int x1, int y1, int x2, int y2) {} virtual void line(int x, int y, int x1, int y1, int x2, int y2);
/** see fl_xyline(int, int, int) */ /** see fl_xyline(int, int, int) */
virtual void xyline(int x, int y, int x1) {} virtual void xyline(int x, int y, int x1);
/** see fl_xyline(int, int, int, int) */ /** see fl_xyline(int, int, int, int) */
virtual void xyline(int x, int y, int x1, int y2) {} virtual void xyline(int x, int y, int x1, int y2);
/** see fl_xyline(int, int, int, int, int) */ /** see fl_xyline(int, int, int, int, int) */
virtual void xyline(int x, int y, int x1, int y2, int x3) {} virtual void xyline(int x, int y, int x1, int y2, int x3);
/** see fl_yxline(int, int, int) */ /** see fl_yxline(int, int, int) */
virtual void yxline(int x, int y, int y1) {} virtual void yxline(int x, int y, int y1);
/** see fl_yxline(int, int, int, int) */ /** see fl_yxline(int, int, int, int) */
virtual void yxline(int x, int y, int y1, int x2) {} virtual void yxline(int x, int y, int y1, int x2);
/** see fl_yxline(int, int, int, int, int) */ /** see fl_yxline(int, int, int, int, int) */
virtual void yxline(int x, int y, int y1, int x2, int y3) {} virtual void yxline(int x, int y, int y1, int x2, int y3);
/** see fl_loop(int, int, int, int, int, int) */ /** see fl_loop(int, int, int, int, int, int) */
virtual void loop(int x0, int y0, int x1, int y1, int x2, int y2) {} virtual void loop(int x0, int y0, int x1, int y1, int x2, int y2);
/** see fl_loop(int, int, int, int, int, int, int, int) */ /** see fl_loop(int, int, int, int, int, int, int, int) */
virtual void loop(int x0, int y0, int x1, int y1, int x2, int y2, int x3, int y3) {} virtual void loop(int x0, int y0, int x1, int y1, int x2, int y2, int x3, int y3);
/** see fl_polygon(int, int, int, int, int, int) */ /** see fl_polygon(int, int, int, int, int, int) */
virtual void polygon(int x0, int y0, int x1, int y1, int x2, int y2) {} virtual void polygon(int x0, int y0, int x1, int y1, int x2, int y2) {}
/** see fl_polygon(int, int, int, int, int, int, int, int) */ /** see fl_polygon(int, int, int, int, int, int, int, int) */
virtual void polygon(int x0, int y0, int x1, int y1, int x2, int y2, int x3, int y3) {} virtual void polygon(int x0, int y0, int x1, int y1, int x2, int y2, int x3, int y3);
// --- clipping // --- clipping
/** see fl_push_clip() */ /** see fl_push_clip() */
virtual void push_clip(int x, int y, int w, int h) {} virtual void push_clip(int x, int y, int w, int h) {}

View File

@ -332,6 +332,59 @@ Fl_Offscreen Fl_Graphics_Driver::get_offscreen_and_delete_image_surface(Fl_Image
return off; return off;
} }
void Fl_Graphics_Driver::xyline(int x, int y, int x1) {
line(x, y, x1, y);
}
void Fl_Graphics_Driver::xyline(int x, int y, int x1, int y2) {
line(x, y, x1, y);
line(x1, y, x1, y2);
}
void Fl_Graphics_Driver::xyline(int x, int y, int x1, int y2, int x3) {
line(x, y, x1, y);
line(x1, y, x1, y2);
line(x1, y2, x3, y2);
}
void Fl_Graphics_Driver::yxline(int x, int y, int y1) {
line(x, y, x, y1);
}
void Fl_Graphics_Driver::yxline(int x, int y, int y1, int x2) {
line(x, y, x, y1);
line(x, y1, x2, y1);
}
void Fl_Graphics_Driver::yxline(int x, int y, int y1, int x2, int y3) {
line(x, y, x, y1);
line(x, y1, x2, y1);
line(x2, y1, x2, y3);
}
void Fl_Graphics_Driver::line(int x, int y, int x1, int y1, int x2, int y2) {
line(x, y, x1, y1);
line(x1, y1, x2, y2);
}
void Fl_Graphics_Driver::loop(int x0, int y0, int x1, int y1, int x2, int y2) {
line(x0, y0, x1, y1);
line(x1, y1, x2, y2);
line(x2, y2, x0, y0);
}
void Fl_Graphics_Driver::loop(int x0, int y0, int x1, int y1, int x2, int y2, int x3, int y3) {
line(x0, y0, x1, y1);
line(x1, y1, x2, y2);
line(x2, y2, x3, y3);
line(x3, y3, x0, y0);
}
void Fl_Graphics_Driver::polygon(int x0, int y0, int x1, int y1, int x2, int y2, int x3, int y3) {
polygon(x0, y0, x1, y1, x3, y3);
polygon(x1, y1, x2, y2, x3, y3);
}
/** /**
\} \}
\endcond \endcond