Image drawing: simplify the code organisation to better support Fl_Image::scale() - continued

This completes changes introduced at r.12828.

git-svn-id: file:///fltk/svn/fltk/branches/branch-1.4@12829 ea41ed52-d2ee-0310-a9c1-e6b18d33e121
This commit is contained in:
Manolo Gouy
2018-04-12 14:54:53 +00:00
parent 16705ef734
commit 178343b2ee
2 changed files with 6 additions and 6 deletions
+3 -3
View File
@@ -210,9 +210,9 @@ class Clip {
void text_extents(const char *c, int n, int &dx, int &dy, int &w, int &h); void text_extents(const char *c, int n, int &dx, int &dy, int &w, int &h);
int height(); int height();
int descent(); int descent();
void draw(Fl_Pixmap * pxm,int XP, int YP, int WP, int HP, int cx, int cy); void draw_pixmap(Fl_Pixmap * pxm,int XP, int YP, int WP, int HP, int cx, int cy);
void draw(Fl_Bitmap * bitmap,int XP, int YP, int WP, int HP, int cx, int cy); void draw_bitmap(Fl_Bitmap * bitmap,int XP, int YP, int WP, int HP, int cx, int cy);
void draw(Fl_RGB_Image * rgb,int XP, int YP, int WP, int HP, int cx, int cy); void draw_rgb(Fl_RGB_Image * rgb,int XP, int YP, int WP, int HP, int cx, int cy);
/** Shields output PostScript data from modifications of the current locale. /** Shields output PostScript data from modifications of the current locale.
It typically avoids PostScript errors caused if the current locale uses comma instead of dot It typically avoids PostScript errors caused if the current locale uses comma instead of dot
as "decimal point". as "decimal point".
@@ -571,7 +571,7 @@ void Fl_PostScript_Graphics_Driver::draw_image_mono(Fl_Draw_Image_Cb call, void
////////////////////////////// Image classes ////////////////////// ////////////////////////////// Image classes //////////////////////
void Fl_PostScript_Graphics_Driver::draw(Fl_Pixmap * pxm,int XP, int YP, int WP, int HP, int cx, int cy){ void Fl_PostScript_Graphics_Driver::draw_pixmap(Fl_Pixmap * pxm,int XP, int YP, int WP, int HP, int cx, int cy){
int need_clip = cx || cy || WP != pxm->w() || HP != pxm->h(); int need_clip = cx || cy || WP != pxm->w() || HP != pxm->h();
if (need_clip) push_clip(XP, YP, WP, HP); if (need_clip) push_clip(XP, YP, WP, HP);
if (pxm->w() != pxm->data_w() || pxm->h() != pxm->data_h()) { if (pxm->w() != pxm->data_w() || pxm->h() != pxm->data_h()) {
@@ -592,7 +592,7 @@ void Fl_PostScript_Graphics_Driver::draw(Fl_Pixmap * pxm,int XP, int YP, int WP,
if (need_clip) pop_clip(); if (need_clip) pop_clip();
} }
void Fl_PostScript_Graphics_Driver::draw(Fl_RGB_Image * rgb,int XP, int YP, int WP, int HP, int cx, int cy) void Fl_PostScript_Graphics_Driver::draw_rgb(Fl_RGB_Image * rgb,int XP, int YP, int WP, int HP, int cx, int cy)
{ {
int need_clip = cx || cy || WP != rgb->w() || HP != rgb->h(); int need_clip = cx || cy || WP != rgb->w() || HP != rgb->h();
if (need_clip) push_clip(XP, YP, WP, HP); if (need_clip) push_clip(XP, YP, WP, HP);
@@ -628,7 +628,7 @@ int Fl_PostScript_Graphics_Driver::scale_and_draw(Fl_Image *img, int XP, int YP,
return 1; return 1;
} }
void Fl_PostScript_Graphics_Driver::draw(Fl_Bitmap * bitmap,int XP, int YP, int WP, int HP, int cx, int cy) { void Fl_PostScript_Graphics_Driver::draw_bitmap(Fl_Bitmap * bitmap,int XP, int YP, int WP, int HP, int cx, int cy) {
int need_clip = cx || cy || WP != bitmap->w() || HP != bitmap->h(); int need_clip = cx || cy || WP != bitmap->w() || HP != bitmap->h();
if (need_clip) push_clip(XP, YP, WP, HP); if (need_clip) push_clip(XP, YP, WP, HP);
if (bitmap->w() != bitmap->data_w() || bitmap->h() != bitmap->data_h()) { if (bitmap->w() != bitmap->data_w() || bitmap->h() != bitmap->data_h()) {