diff options
| author | ManoloFLTK <41016272+ManoloFLTK@users.noreply.github.com> | 2019-03-12 10:55:01 +0100 |
|---|---|---|
| committer | ManoloFLTK <41016272+ManoloFLTK@users.noreply.github.com> | 2019-03-12 10:55:01 +0100 |
| commit | 4324acc6f6f2bdbf9c86cf08b458c1c0e96e5ae1 (patch) | |
| tree | 4de24f720f7f1d21d732b66441720ca32a5f54fe | |
| parent | 8e9512330d1c172c2819cdca23f80dc188166f19 (diff) | |
Avoid "unused argument" compiler warnings with -Wextra after #include <fl_draw.H>
| -rw-r--r-- | FL/Fl_Graphics_Driver.H | 253 | ||||
| -rw-r--r-- | src/Fl_Graphics_Driver.cxx | 265 |
2 files changed, 362 insertions, 156 deletions
diff --git a/FL/Fl_Graphics_Driver.H b/FL/Fl_Graphics_Driver.H index 5cc5bab7a..b49e71185 100644 --- a/FL/Fl_Graphics_Driver.H +++ b/FL/Fl_Graphics_Driver.H @@ -138,11 +138,11 @@ and object also reimplement the uchar **Fl_Graphics_Driver::mask_bitmap() member function. */ private: - virtual void draw_fixed(Fl_Pixmap *pxm,int XP, int YP, int WP, int HP, int cx, int cy) {} - virtual void draw_fixed(Fl_Bitmap *bm,int XP, int YP, int WP, int HP, int cx, int cy) {} - virtual void draw_fixed(Fl_RGB_Image *rgb,int XP, int YP, int WP, int HP, int cx, int cy) {} + virtual void draw_fixed(Fl_Pixmap *pxm,int XP, int YP, int WP, int HP, int cx, int cy); + virtual void draw_fixed(Fl_Bitmap *bm,int XP, int YP, int WP, int HP, int cx, int cy); + virtual void draw_fixed(Fl_RGB_Image *rgb,int XP, int YP, int WP, int HP, int cx, int cy); // the default implementation of make_unused_color_() is most probably enough - virtual void make_unused_color_(unsigned char &r, unsigned char &g, unsigned char &b) {} + virtual void make_unused_color_(unsigned char &r, unsigned char &g, unsigned char &b); // some platforms may need to reimplement this virtual void set_current_(); float scale_; // scale between FLTK and drawing coordinates: drawing = FLTK * scale_ @@ -181,32 +181,22 @@ protected: #endif matrix *fl_matrix; /**< Points to the current coordinate transformation matrix */ virtual void global_gc(); - /** Support function for Fl_Pixmap drawing */ - virtual void cache(Fl_Pixmap *img) { } - /** Support function for Fl_Bitmap drawing */ - virtual void cache(Fl_Bitmap *img) { } - /** Support function for Fl_RGB_Image drawing */ - virtual void cache(Fl_RGB_Image *img) { } - /** Support function for Fl_RGB_Image drawing */ - virtual void uncache(Fl_RGB_Image *img, fl_uintptr_t &id_, fl_uintptr_t &mask_) { } + virtual void cache(Fl_Pixmap *img); + virtual void cache(Fl_Bitmap *img); + virtual void cache(Fl_RGB_Image *img); + virtual void uncache(Fl_RGB_Image *img, fl_uintptr_t &id_, fl_uintptr_t &mask_); // --- implementation is in src/drivers/xxx/Fl_xxx_Graphics_Driver_image.cxx - /** see fl_draw_image(const uchar* buf, int X,int Y,int W,int H, int D, int L) */ - virtual void draw_image(const uchar* buf, int X,int Y,int W,int H, int D=3, int L=0) {} - /** see fl_draw_image_mono(const uchar* buf, int X,int Y,int W,int H, int D, int L) */ - virtual void draw_image_mono(const uchar* buf, int X,int Y,int W,int H, int D=1, int L=0) {} - /** see fl_draw_image(Fl_Draw_Image_Cb cb, void* data, int X,int Y,int W,int H, int D) */ - virtual void draw_image(Fl_Draw_Image_Cb cb, void* data, int X,int Y,int W,int H, int D=3) {} - /** see fl_draw_image_mono(Fl_Draw_Image_Cb cb, void* data, int X,int Y,int W,int H, int D) */ - virtual void draw_image_mono(Fl_Draw_Image_Cb cb, void* data, int X,int Y,int W,int H, int D=1) {} + virtual void draw_image(const uchar* buf, int X,int Y,int W,int H, int D=3, int L=0); + virtual void draw_image_mono(const uchar* buf, int X,int Y,int W,int H, int D=1, int L=0); + virtual void draw_image(Fl_Draw_Image_Cb cb, void* data, int X,int Y,int W,int H, int D=3); + virtual void draw_image_mono(Fl_Draw_Image_Cb cb, void* data, int X,int Y,int W,int H, int D=1); virtual void draw_rgb(Fl_RGB_Image * rgb,int XP, int YP, int WP, int HP, int cx, int cy); virtual void draw_pixmap(Fl_Pixmap * pxm,int XP, int YP, int WP, int HP, int cx, int cy); virtual void draw_bitmap(Fl_Bitmap *bm, int XP, int YP, int WP, int HP, int cx, int cy); virtual void copy_offscreen(int x, int y, int w, int h, Fl_Offscreen pixmap, int srcx, int srcy); - /** Support function for image drawing */ - virtual Fl_Bitmask create_bitmask(int w, int h, const uchar *array) {return 0; } - /** Support function for image drawing */ - virtual void delete_bitmask(Fl_Bitmask bm) {} + virtual Fl_Bitmask create_bitmask(int w, int h, const uchar *array); + virtual void delete_bitmask(Fl_Bitmask bm); /** For internal library use only */ static void change_image_size(Fl_Image *img, int W, int H) { img->w(W); @@ -255,19 +245,16 @@ public: /** Current scale factor between FLTK and drawing units: drawing = FLTK * scale() */ float scale() { return scale_; } /** Sets the current value of the scaling factor */ - virtual void scale(float f) { scale_ = f; } + virtual void scale(float f); /** Return whether the graphics driver can do alpha blending */ - virtual char can_do_alpha_blending() { return 0; } + virtual char can_do_alpha_blending(); // --- implementation is in src/fl_rect.cxx which includes src/drivers/xxx/Fl_xxx_Graphics_Driver_rect.cxx /** see fl_point() */ - virtual void point(int x, int y) {} - /** see fl_rect() */ - virtual void rect(int x, int y, int w, int h) {} + virtual void point(int x, int y); + virtual void rect(int x, int y, int w, int h); virtual void focus_rect(int x, int y, int w, int h); - /** see fl_rectf() */ - virtual void rectf(int x, int y, int w, int h) {} - /** see fl_line(int, int, int, int) */ - virtual void line(int x, int y, int x1, int y1) {} + virtual void rectf(int x, int y, int w, int h); + virtual void line(int x, int y, int x1, int y1); /** see fl_line(int, int, int, int, int, int) */ virtual void line(int x, int y, int x1, int y1, int x2, int y2); /** see fl_xyline(int, int, int) */ @@ -286,17 +273,13 @@ public: 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) */ 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) */ - 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) */ virtual void polygon(int x0, int y0, int x1, int y1, int x2, int y2, int x3, int y3); // --- clipping - /** see fl_push_clip() */ - virtual void push_clip(int x, int y, int w, int h) {} - /** see fl_clip_box() */ - virtual int clip_box(int x, int y, int w, int h, int &X, int &Y, int &W, int &H) {return 0;} - /** see fl_not_clipped() */ - virtual int not_clipped(int x, int y, int w, int h) {return 1;} + virtual void push_clip(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 not_clipped(int x, int y, int w, int h); /** see fl_push_no_clip() */ virtual void push_no_clip(); // has default implementation /** see fl_pop_clip() */ @@ -314,115 +297,73 @@ public: virtual void begin_line(); virtual void begin_loop(); virtual void begin_polygon(); - /** see fl_begin_complex_polygon() */ - virtual void begin_complex_polygon() {} + virtual void begin_complex_polygon(); virtual double transform_x(double x, double y); virtual double transform_y(double x, double y); virtual double transform_dx(double x, double y); virtual double transform_dy(double x, double y); - /** see fl_transformed_vertex() */ - virtual void transformed_vertex(double xf, double yf) {} - /** see fl_vertex() */ - virtual void vertex(double x, double y) {} - /** see fl_end_points() */ - virtual void end_points() {} - /** see fl_end_line() */ - virtual void end_line() {} - /** see fl_end_loop() */ - virtual void end_loop() {} - /** see fl_end_polygon() */ - virtual void end_polygon() {} - /** see fl_end_complex_polygon() */ - virtual void end_complex_polygon() {} - /** see fl_gap() */ - virtual void gap() {} - /** see fl_circle() */ - virtual void circle(double x, double y, double r) {} + virtual void transformed_vertex(double xf, double yf); + virtual void vertex(double x, double y); + virtual void end_points(); + virtual void end_line(); + virtual void end_loop(); + virtual void end_polygon(); + virtual void end_complex_polygon(); + virtual void gap(); + virtual void circle(double x, double y, double r); // --- implementation is in src/fl_arc.cxx which includes src/drivers/xxx/Fl_xxx_Graphics_Driver_arc.cxx if needed virtual void arc(double x, double y, double r, double start, double end); // --- implementation is in src/fl_arci.cxx which includes src/drivers/xxx/Fl_xxx_Graphics_Driver_arci.cxx - /** see fl_arc(int x, int y, int w, int h, double a1, double a2) */ - virtual void arc(int x, int y, int w, int h, double a1, double a2) {} - /** see fl_pie() */ - virtual void pie(int x, int y, int w, int h, double a1, double a2) {} + virtual void arc(int x, int y, int w, int h, double a1, double a2); + virtual void pie(int x, int y, int w, int h, double a1, double a2); // --- implementation is in src/fl_curve.cxx which includes src/drivers/xxx/Fl_xxx_Graphics_Driver_curve.cxx if needed virtual void curve(double X0, double Y0, double X1, double Y1, double X2, double Y2, double X3, double Y3); // --- implementation is in src/fl_line_style.cxx which includes src/cfg_gfx/xxx_line_style.cxx - /** see fl_line_style() */ - virtual void line_style(int style, int width=0, char* dashes=0) {} + virtual void line_style(int style, int width=0, char* dashes=0); // --- implementation is in src/fl_color.cxx which includes src/cfg_gfx/xxx_color.cxx - /** see fl_color(Fl_Color) */ - virtual void color(Fl_Color c) { color_ = c; } + virtual void color(Fl_Color c); virtual void set_color(Fl_Color i, unsigned int c); virtual void free_color(Fl_Color i, int overlay); - /** see fl_color(void) */ - virtual Fl_Color color() { return color_; } - /** see fl_color(uchar, uchar, uchar) */ - virtual void color(uchar r, uchar g, uchar b) {} - /** see fl_draw(const char *str, int n, int x, int y) */ - virtual void draw(const char *str, int nChars, int x, int y) {} - /** Draw the first \p n bytes of the string \p str starting at position \p x , \p y */ - virtual void draw(const char *str, int nChars, float x, float y) { draw(str, nChars, (int)(x+0.5), (int)(y+0.5));} - /** see fl_draw(int angle, const char *str, int n, int x, int y) */ - virtual void draw(int angle, const char *str, int nChars, int x, int y) { draw(str, nChars, x, y); } - /** see fl_rtl_draw(const char *str, int n, int x, int y) */ - virtual void rtl_draw(const char *str, int nChars, int x, int y) { draw(str, nChars, x, y); } - /** Returns non-zero if the graphics driver possesses the \p feature */ - virtual int has_feature(driver_feature feature) { return 0; } - /** see fl_font(Fl_Font, Fl_Fontsize) */ - virtual void font(Fl_Font face, Fl_Fontsize fsize) {font_ = face; size_ = fsize;} - /** see fl_font(void) */ - virtual Fl_Font font() {return font_; } - /** Return the current font size */ - virtual Fl_Fontsize size() {return size_; } - /** Compute the width of the first \p n bytes of the string \p str if drawn with current font */ - virtual double width(const char *str, int nChars) { return 0; } - /** Compute the width of Unicode character \p c if drawn with current font */ - virtual double width(unsigned int c) { char ch = (char)c; return width(&ch, 1); } + virtual Fl_Color color(); + virtual void color(uchar r, uchar g, uchar b); + virtual void draw(const char *str, int nChars, int x, int y); + virtual void draw(const char *str, int nChars, float x, float y); + virtual void draw(int angle, const char *str, int nChars, int x, int y); + virtual void rtl_draw(const char *str, int nChars, int x, int y); + virtual int has_feature(driver_feature feature); + virtual void font(Fl_Font face, Fl_Fontsize fsize); + virtual Fl_Font font(); + virtual Fl_Fontsize size(); + virtual double width(const char *str, int nChars); + virtual double width(unsigned int c); virtual void text_extents(const char*, int n, int& dx, int& dy, int& w, int& h); - /** Return the current line height */ - virtual int height() { return size(); } - /** Return the current line descent */ - virtual int descent() { return 0; } + virtual int height(); + virtual int descent(); /** Return the current Fl_Font_Descriptor */ inline Fl_Font_Descriptor *font_descriptor() { return font_descriptor_;} - /** Set the current Fl_Font_Descriptor */ - virtual void font_descriptor(Fl_Font_Descriptor *d) { font_descriptor_ = d;} - /** Sets the value of the driver-specific graphics context. */ - virtual void gc(void*) {} - /** Returns the driver-specific graphics context, of NULL if there's none. */ - virtual void *gc(void) {return NULL;} - /** Support for pixmap drawing */ - virtual uchar **mask_bitmap() { return 0; } + virtual void font_descriptor(Fl_Font_Descriptor *d); + virtual void gc(void*); + virtual void *gc(void); + virtual uchar **mask_bitmap(); // default implementation may be enough - /** Support for PostScript drawing */ - virtual float scale_font_for_PostScript(Fl_Font_Descriptor *desc, int s) { return float(s); } + virtual float scale_font_for_PostScript(Fl_Font_Descriptor *desc, int s); // default implementation may be enough - /** Support for PostScript drawing */ - virtual float scale_bitmap_for_PostScript() { return 2; } + virtual float scale_bitmap_for_PostScript(); virtual void set_spot(int font, int size, int X, int Y, int W, int H, Fl_Window *win); virtual void reset_spot(); // each platform implements these 3 functions its own way virtual void add_rectangle_to_region(Fl_Region r, int x, int y, int w, int h); virtual Fl_Region XRectangleRegion(int x, int y, int w, int h); virtual void XDestroyRegion(Fl_Region r); - /** Support for Fl::get_font_name() */ - virtual const char* get_font_name(Fl_Font fnum, int* ap) {return NULL;} - /** Support for Fl::get_font_sizes() */ - virtual int get_font_sizes(Fl_Font fnum, int*& sizep) {return 0;} - /** Support for Fl::set_fonts() */ - virtual Fl_Font set_fonts(const char *name) {return 0;} - /** Some platforms may need to implement this to support fonts */ - virtual Fl_Fontdesc* calc_fl_fonts(void) {return NULL;} - /** Support for Fl::set_font() */ + virtual const char* get_font_name(Fl_Font fnum, int* ap); + virtual int get_font_sizes(Fl_Font fnum, int*& sizep); + virtual Fl_Font set_fonts(const char *name); + virtual Fl_Fontdesc* calc_fl_fonts(void); virtual unsigned font_desc_size(); - /** Support for Fl::get_font() */ - virtual const char *font_name(int num) {return NULL;} - /** Support for Fl::set_font() */ - virtual void font_name(int num, const char *name) {} - /** Support function for fl_overlay_rect() and scaled GUI. - Defaut implementation may be enough */ - virtual void overlay_rect(int x, int y, int w , int h) { loop(x, y, x+w-1, y, x+w-1, y+h-1, x, y+h-1); } + virtual const char *font_name(int num); + virtual void font_name(int num, const char *name); + // Defaut implementation may be enough + virtual void overlay_rect(int x, int y, int w , int h); }; #ifndef FL_DOXYGEN @@ -473,74 +414,74 @@ public: Fl_Scalable_Graphics_Driver(); protected: int line_width_; - virtual Fl_Region scale_clip(float f) { return 0; } + virtual Fl_Region scale_clip(float f); void unscale_clip(Fl_Region r); virtual void point(int x, int y); - virtual void point_unscaled(float x, float y) {} + virtual void point_unscaled(float x, float y); virtual void rect(int x, int y, int w, int h); - virtual void rect_unscaled(float x, float y, float w, float h) {} + virtual void rect_unscaled(float x, float y, float w, float h); virtual void rectf(int x, int y, int w, int h); - virtual void rectf_unscaled(float x, float y, float w, float h) {} + virtual void rectf_unscaled(float x, float y, float w, float h); virtual void line(int x, int y, int x1, int y1); - virtual void line_unscaled(float x, float y, float x1, float y1) {} + virtual void line_unscaled(float x, float y, float x1, float y1); virtual void line(int x, int y, int x1, int y1, int x2, int y2); - virtual void line_unscaled(float x, float y, float x1, float y1, float x2, float y2) {} + virtual void line_unscaled(float x, float y, float x1, float y1, float x2, float y2); virtual void xyline(int x, int y, int x1); virtual void xyline(int x, int y, int x1, int y2); virtual void xyline(int x, int y, int x1, int y2, int x3); - virtual void xyline_unscaled(float x, float y, float x1) {} + virtual void xyline_unscaled(float x, float y, float x1); virtual void yxline(int x, int y, int y1); virtual void yxline(int x, int y, int y1, int x2); virtual void yxline(int x, int y, int y1, int x2, int y3); - virtual void yxline_unscaled(float x, float y, float y1) {} + virtual void yxline_unscaled(float x, float y, float y1); virtual void loop(int x0, int y0, int x1, int y1, int x2, int y2); - virtual void loop_unscaled(float x0, float y0, float x1, float y1, float x2, float y2) {} + virtual void loop_unscaled(float x0, float y0, float x1, float y1, float x2, float y2); virtual void loop(int x0, int y0, int x1, int y1, int x2, int y2, int x3, int y3); - virtual void loop_unscaled(float x0, float y0, float x1, float y1, float x2, float y2, float x3, float y3) {} + virtual void loop_unscaled(float x0, float y0, float x1, float y1, float x2, float y2, float x3, float y3); virtual void polygon(int x0, int y0, int x1, int y1, int x2, int y2); - virtual void polygon_unscaled(float x0, float y0, float x1, float y1, float x2, float y2) {} + virtual void polygon_unscaled(float x0, float y0, float x1, float y1, float x2, float y2); virtual void polygon(int x0, int y0, int x1, int y1, int x2, int y2, int x3, int y3); - virtual void polygon_unscaled(float x0, float y0, float x1, float y1, float x2, float y2, float x3, float y3) {} + virtual void polygon_unscaled(float x0, float y0, float x1, float y1, float x2, float y2, float x3, float y3); virtual void circle(double x, double y, double r); - virtual void ellipse_unscaled(double xt, double yt, double rx, double ry) {} + virtual void ellipse_unscaled(double xt, double yt, double rx, double ry); virtual void font(Fl_Font face, Fl_Fontsize size); - virtual void font_unscaled(Fl_Font face, Fl_Fontsize size) {} + virtual void font_unscaled(Fl_Font face, Fl_Fontsize size); virtual double width(const char *str, int n); virtual double width(unsigned int c); - virtual double width_unscaled(const char *str, int n) { return 0.0; } - virtual double width_unscaled(unsigned int c) { return 0.0; } + virtual double width_unscaled(const char *str, int n); + virtual double width_unscaled(unsigned int c); virtual Fl_Fontsize size(); - virtual Fl_Fontsize size_unscaled() { return 0; } + virtual Fl_Fontsize size_unscaled(); virtual void text_extents(const char *str, int n, int &dx, int &dy, int &w, int &h); - virtual void text_extents_unscaled(const char *str, int n, int &dx, int &dy, int &w, int &h) {} + virtual void text_extents_unscaled(const char *str, int n, int &dx, int &dy, int &w, int &h); virtual int height(); virtual int descent(); - virtual int height_unscaled() { return 0; } - virtual int descent_unscaled() { return 0; } + virtual int height_unscaled(); + virtual int descent_unscaled(); virtual void draw(const char *str, int n, int x, int y); - virtual void draw_unscaled(const char *str, int n, int x, int y) {} + virtual void draw_unscaled(const char *str, int n, int x, int y); virtual void draw(int angle, const char *str, int n, int x, int y); - virtual void draw_unscaled(int angle, const char *str, int n, int x, int y) {} + virtual void draw_unscaled(int angle, const char *str, int n, int x, int y); virtual void rtl_draw(const char* str, int n, int x, int y); - virtual void rtl_draw_unscaled(const char* str, int n, int x, int y) {} + virtual void rtl_draw_unscaled(const char* str, int n, int x, int y); virtual void arc(int x, int y, int w, int h, double a1, double a2); - virtual void arc_unscaled(float x, float y, float w, float h, double a1, double a2) {} + virtual void arc_unscaled(float x, float y, float w, float h, double a1, double a2); virtual void pie(int x, int y, int w, int h, double a1, double a2); - virtual void pie_unscaled(float x, float y, float w, float h, double a1, double a2) {} + virtual void pie_unscaled(float x, float y, float w, float h, double a1, double a2); virtual void line_style(int style, int width=0, char* dashes=0); - virtual void line_style_unscaled(int style, float width, char* dashes) {} + virtual void line_style_unscaled(int style, float width, char* dashes); void draw_image_rescale(void *buf, Fl_Draw_Image_Cb cb, int X, int Y, int W, int H, int D, int L, bool mono, float s); - virtual void draw_image_unscaled(const uchar* buf, int X,int Y,int W,int H, int D=3, int L=0) {} - virtual void draw_image_unscaled(Fl_Draw_Image_Cb cb, void* data, int X,int Y,int W,int H, int D=3) {} + virtual void draw_image_unscaled(const uchar* buf, int X,int Y,int W,int H, int D=3, int L=0); + virtual void draw_image_unscaled(Fl_Draw_Image_Cb cb, void* data, int X,int Y,int W,int H, int D=3); void draw_image(const uchar* buf, int X,int Y,int W,int H, int D=3, int L=0); void draw_image(Fl_Draw_Image_Cb cb, void* data, int X,int Y,int W,int H, int D=3); - virtual void draw_image_mono_unscaled(const uchar* buf, int x, int y, int w, int h, int d, int l) {} + virtual void draw_image_mono_unscaled(const uchar* buf, int x, int y, int w, int h, int d, int l); void draw_image_mono(const uchar* buf, int X,int Y,int W,int H, int D=1, int L=0); - virtual void draw_image_mono_unscaled(Fl_Draw_Image_Cb cb, void* data, int X,int Y,int W,int H, int D=1) {} + virtual void draw_image_mono_unscaled(Fl_Draw_Image_Cb cb, void* data, int X,int Y,int W,int H, int D=1); void draw_image_mono(Fl_Draw_Image_Cb cb, void* data, int X,int Y,int W,int H, int D=1); void transformed_vertex(double xf, double yf); - virtual void transformed_vertex0(float x, float y) {} + virtual void transformed_vertex0(float x, float y); void vertex(double x, double y); }; #endif // FL_DOXYGEN diff --git a/src/Fl_Graphics_Driver.cxx b/src/Fl_Graphics_Driver.cxx index cf7caa1af..b6781914e 100644 --- a/src/Fl_Graphics_Driver.cxx +++ b/src/Fl_Graphics_Driver.cxx @@ -194,6 +194,7 @@ void Fl_Graphics_Driver::uncache_pixmap(fl_uintptr_t p) { void Fl_Graphics_Driver::set_current_() { } +/** Support for Fl::set_font() */ unsigned Fl_Graphics_Driver::font_desc_size() { return (unsigned)sizeof(Fl_Fontdesc); } @@ -399,6 +400,208 @@ void Fl_Graphics_Driver::pop_clip() { restore_clip(); } +/** Sets the current value of the scaling factor */ +void Fl_Graphics_Driver::scale(float f) { scale_ = f; } + +/** Return whether the graphics driver can do alpha blending */ +char Fl_Graphics_Driver::can_do_alpha_blending() { return 0; } + +void Fl_Graphics_Driver::draw_fixed(Fl_Pixmap *pxm,int XP, int YP, int WP, int HP, int cx, int cy) {} + +void Fl_Graphics_Driver::draw_fixed(Fl_Bitmap *bm,int XP, int YP, int WP, int HP, int cx, int cy) {} + +void Fl_Graphics_Driver::draw_fixed(Fl_RGB_Image *rgb,int XP, int YP, int WP, int HP, int cx, int cy) {} + +void Fl_Graphics_Driver::make_unused_color_(unsigned char &r, unsigned char &g, unsigned char &b) {} + +/** Support function for Fl_Pixmap drawing */ +void Fl_Graphics_Driver::cache(Fl_Pixmap *img) { } + +/** Support function for Fl_Bitmap drawing */ +void Fl_Graphics_Driver::cache(Fl_Bitmap *img) { } + +/** Support function for Fl_RGB_Image drawing */ +void Fl_Graphics_Driver::cache(Fl_RGB_Image *img) { } + +/** Support function for Fl_RGB_Image drawing */ +void Fl_Graphics_Driver::uncache(Fl_RGB_Image *img, fl_uintptr_t &id_, fl_uintptr_t &mask_) { } + +/** see fl_draw_image(const uchar* buf, int X,int Y,int W,int H, int D, int L) */ +void Fl_Graphics_Driver::draw_image(const uchar* buf, int X,int Y,int W,int H, int D, int L) {} + +/** see fl_draw_image_mono(const uchar* buf, int X,int Y,int W,int H, int D, int L) */ +void Fl_Graphics_Driver::draw_image_mono(const uchar* buf, int X,int Y,int W,int H, int D, int L) {} + +/** see fl_draw_image(Fl_Draw_Image_Cb cb, void* data, int X,int Y,int W,int H, int D) */ +void Fl_Graphics_Driver::draw_image(Fl_Draw_Image_Cb cb, void* data, int X,int Y,int W,int H, int D) {} + +/** see fl_draw_image_mono(Fl_Draw_Image_Cb cb, void* data, int X,int Y,int W,int H, int D) */ +void Fl_Graphics_Driver::draw_image_mono(Fl_Draw_Image_Cb cb, void* data, int X,int Y,int W,int H, int D) {} + +/** Support function for image drawing */ +Fl_Bitmask Fl_Graphics_Driver::create_bitmask(int w, int h, const uchar *array) {return 0; } + +/** Support function for image drawing */ +void Fl_Graphics_Driver::delete_bitmask(Fl_Bitmask bm) {} + +/** see fl_point() */ +void Fl_Graphics_Driver::point(int x, int y) {} + +/** see fl_rect() */ +void Fl_Graphics_Driver::rect(int x, int y, int w, int h) {} + +/** see fl_rectf() */ +void Fl_Graphics_Driver::rectf(int x, int y, int w, int h) {} + +/** see fl_line(int, int, int, int) */ +void Fl_Graphics_Driver::line(int x, int y, int x1, int y1) {} + +/** see fl_polygon(int, int, int, int, int, int) */ +void Fl_Graphics_Driver::polygon(int x0, int y0, int x1, int y1, int x2, int y2) {} + +/** see fl_push_clip() */ +void Fl_Graphics_Driver::push_clip(int x, int y, int w, int h) {} + +/** see fl_clip_box() */ +int Fl_Graphics_Driver::clip_box(int x, int y, int w, int h, int &X, int &Y, int &W, int &H) {return 0;} +/** see fl_not_clipped() */ + +int Fl_Graphics_Driver::not_clipped(int x, int y, int w, int h) {return 1;} + +/** see fl_begin_complex_polygon() */ +void Fl_Graphics_Driver::begin_complex_polygon() {} + +/** see fl_transformed_vertex() */ +void Fl_Graphics_Driver::transformed_vertex(double xf, double yf) {} + +/** see fl_vertex() */ +void Fl_Graphics_Driver::vertex(double x, double y) {} + +/** see fl_end_points() */ +void Fl_Graphics_Driver::end_points() {} + +/** see fl_end_line() */ +void Fl_Graphics_Driver::end_line() {} + +/** see fl_end_loop() */ +void Fl_Graphics_Driver::end_loop() {} + +/** see fl_end_polygon() */ +void Fl_Graphics_Driver::end_polygon() {} + +/** see fl_end_complex_polygon() */ +void Fl_Graphics_Driver::end_complex_polygon() {} + +/** see fl_gap() */ +void Fl_Graphics_Driver::gap() {} + +/** see fl_circle() */ +void Fl_Graphics_Driver::circle(double x, double y, double r) {} + +/** see fl_arc(int x, int y, int w, int h, double a1, double a2) */ +void Fl_Graphics_Driver::arc(int x, int y, int w, int h, double a1, double a2) {} + +/** see fl_pie() */ +void Fl_Graphics_Driver::pie(int x, int y, int w, int h, double a1, double a2) {} + +/** see fl_line_style() */ +void Fl_Graphics_Driver::line_style(int style, int width, char* dashes) {} + +/** see fl_color(Fl_Color) */ +void Fl_Graphics_Driver::color(Fl_Color c) { color_ = c; } + +/** see fl_color(void) */ +Fl_Color Fl_Graphics_Driver::color() { return color_; } + +/** see fl_color(uchar, uchar, uchar) */ +void Fl_Graphics_Driver::color(uchar r, uchar g, uchar b) {} + +/** see fl_draw(const char *str, int n, int x, int y) */ +void Fl_Graphics_Driver::draw(const char *str, int nChars, int x, int y) {} + +/** Draw the first \p n bytes of the string \p str starting at position \p x , \p y */ +void Fl_Graphics_Driver::draw(const char *str, int nChars, float x, float y) { + draw(str, nChars, (int)(x+0.5), (int)(y+0.5)); +} + +/** see fl_draw(int angle, const char *str, int n, int x, int y) */ +void Fl_Graphics_Driver::draw(int angle, const char *str, int nChars, int x, int y) { + draw(str, nChars, x, y); +} + +/** see fl_rtl_draw(const char *str, int n, int x, int y) */ +void Fl_Graphics_Driver::rtl_draw(const char *str, int nChars, int x, int y) { + draw(str, nChars, x, y); +} + +/** Returns non-zero if the graphics driver possesses the \p feature */ +int Fl_Graphics_Driver::has_feature(driver_feature feature) { return 0; } + +/** see fl_font(Fl_Font, Fl_Fontsize) */ +void Fl_Graphics_Driver::font(Fl_Font face, Fl_Fontsize fsize) {font_ = face; size_ = fsize;} + +/** see fl_font(void) */ +Fl_Font Fl_Graphics_Driver::font() {return font_; } + +/** Return the current font size */ +Fl_Fontsize Fl_Graphics_Driver::size() {return size_; } + +/** Compute the width of the first \p n bytes of the string \p str if drawn with current font */ +double Fl_Graphics_Driver::width(const char *str, int nChars) { return 0; } + +/** Compute the width of Unicode character \p c if drawn with current font */ +double Fl_Graphics_Driver::width(unsigned int c) { char ch = (char)c; return width(&ch, 1); } + +/** Return the current line height */ +int Fl_Graphics_Driver::height() { return size(); } + +/** Return the current line descent */ +int Fl_Graphics_Driver::descent() { return 0; } + +/** Set the current Fl_Font_Descriptor */ +void Fl_Graphics_Driver::font_descriptor(Fl_Font_Descriptor *d) { font_descriptor_ = d;} + +/** Sets the value of the driver-specific graphics context. */ +void Fl_Graphics_Driver::gc(void*) {} + +/** Returns the driver-specific graphics context, of NULL if there's none. */ +void *Fl_Graphics_Driver::gc(void) {return NULL;} + +/** Support for pixmap drawing */ +uchar **Fl_Graphics_Driver::mask_bitmap() { return 0; } + +/** Support for PostScript drawing */ +float Fl_Graphics_Driver::scale_font_for_PostScript(Fl_Font_Descriptor *desc, int s) { + return float(s); +} + +/** Support for PostScript drawing */ +float Fl_Graphics_Driver::scale_bitmap_for_PostScript() { return 2; } + +/** Support for Fl::get_font_name() */ +const char* Fl_Graphics_Driver::get_font_name(Fl_Font fnum, int* ap) {return NULL;} + +/** Support for Fl::get_font_sizes() */ +int Fl_Graphics_Driver::get_font_sizes(Fl_Font fnum, int*& sizep) {return 0;} + +/** Support for Fl::set_fonts() */ +Fl_Font Fl_Graphics_Driver::set_fonts(const char *name) {return 0;} + +/** Some platforms may need to implement this to support fonts */ +Fl_Fontdesc* Fl_Graphics_Driver::calc_fl_fonts(void) {return NULL;} + +/** Support for Fl::get_font() */ +const char *Fl_Graphics_Driver::font_name(int num) {return NULL;} + +/** Support for Fl::set_font() */ +void Fl_Graphics_Driver::font_name(int num, const char *name) {} + +/** Support function for fl_overlay_rect() and scaled GUI.*/ +void Fl_Graphics_Driver::overlay_rect(int x, int y, int w , int h) { + loop(x, y, x+w-1, y, x+w-1, y+h-1, x, y+h-1); +} + + /** \} \endcond @@ -658,6 +861,68 @@ void Fl_Scalable_Graphics_Driver::unscale_clip(Fl_Region r) { } } +Fl_Region Fl_Scalable_Graphics_Driver::scale_clip(float f) { return 0; } + +void Fl_Scalable_Graphics_Driver::point_unscaled(float x, float y) {} + +void Fl_Scalable_Graphics_Driver::rect_unscaled(float x, float y, float w, float h) {} + +void Fl_Scalable_Graphics_Driver::rectf_unscaled(float x, float y, float w, float h) {} + +void Fl_Scalable_Graphics_Driver::line_unscaled(float x, float y, float x1, float y1) {} + +void Fl_Scalable_Graphics_Driver::line_unscaled(float x, float y, float x1, float y1, float x2, float y2) {} + +void Fl_Scalable_Graphics_Driver::xyline_unscaled(float x, float y, float x1) {} + +void Fl_Scalable_Graphics_Driver::yxline_unscaled(float x, float y, float y1) {} + +void Fl_Scalable_Graphics_Driver::loop_unscaled(float x0, float y0, float x1, float y1, float x2, float y2) {} + +void Fl_Scalable_Graphics_Driver::loop_unscaled(float x0, float y0, float x1, float y1, float x2, float y2, float x3, float y3) {} + +void Fl_Scalable_Graphics_Driver::polygon_unscaled(float x0, float y0, float x1, float y1, float x2, float y2) {} + +void Fl_Scalable_Graphics_Driver::polygon_unscaled(float x0, float y0, float x1, float y1, float x2, float y2, float x3, float y3) {} + +void Fl_Scalable_Graphics_Driver::ellipse_unscaled(double xt, double yt, double rx, double ry) {} + +void Fl_Scalable_Graphics_Driver::font_unscaled(Fl_Font face, Fl_Fontsize size) {} + +double Fl_Scalable_Graphics_Driver::width_unscaled(const char *str, int n) { return 0.0; } + +double Fl_Scalable_Graphics_Driver::width_unscaled(unsigned int c) { return 0.0; } + +Fl_Fontsize Fl_Scalable_Graphics_Driver::size_unscaled() { return 0; } + +void Fl_Scalable_Graphics_Driver::text_extents_unscaled(const char *str, int n, int &dx, int &dy, int &w, int &h) {} + +int Fl_Scalable_Graphics_Driver::height_unscaled() { return 0; } + +int Fl_Scalable_Graphics_Driver::descent_unscaled() { return 0; } + +void Fl_Scalable_Graphics_Driver::draw_unscaled(const char *str, int n, int x, int y) {} + +void Fl_Scalable_Graphics_Driver::draw_unscaled(int angle, const char *str, int n, int x, int y) {} + +void Fl_Scalable_Graphics_Driver::rtl_draw_unscaled(const char* str, int n, int x, int y) {} + +void Fl_Scalable_Graphics_Driver::arc_unscaled(float x, float y, float w, float h, double a1, double a2) {} + +void Fl_Scalable_Graphics_Driver::pie_unscaled(float x, float y, float w, float h, double a1, double a2) {} + +void Fl_Scalable_Graphics_Driver::line_style_unscaled(int style, float width, char* dashes) {} + +void Fl_Scalable_Graphics_Driver::draw_image_unscaled(const uchar* buf, int X,int Y,int W,int H, int D, int L) {} + +void Fl_Scalable_Graphics_Driver::draw_image_unscaled(Fl_Draw_Image_Cb cb, void* data, int X,int Y,int W,int H, int D) {} + +void Fl_Scalable_Graphics_Driver::draw_image_mono_unscaled(const uchar* buf, int x, int y, int w, int h, int d, int l) {} + +void Fl_Scalable_Graphics_Driver::draw_image_mono_unscaled(Fl_Draw_Image_Cb cb, void* data, int X,int Y,int W,int H, int D) {} + +void Fl_Scalable_Graphics_Driver::transformed_vertex0(float x, float y) {} + #endif // |
