Implementation of Fl_Shared_Image::scale(width, height) for scaled image drawing - cont'd
don't call Fl_Graphics_Driver::draw_scaled(Fl_Image*,...) for an enlarged Fl_Bitmap or Fl_Pixmap git-svn-id: file:///fltk/svn/fltk/branches/branch-1.3@10617 ea41ed52-d2ee-0310-a9c1-e6b18d33e121
This commit is contained in:
parent
e69467bbc9
commit
ba76bdce02
@ -338,7 +338,11 @@ void Fl_Shared_Image::draw(int X, int Y, int W, int H, int cx, int cy) {
|
||||
return;
|
||||
}
|
||||
fl_push_clip(X, Y, W, H);
|
||||
int done = fl_graphics_driver->draw_scaled(image_, X-cx, Y-cy, w(), h());
|
||||
int done = 0;
|
||||
// don't call Fl_Graphics_Driver::draw_scaled(Fl_Image*,...) for an enlarged Fl_Bitmap or Fl_Pixmap
|
||||
if ((d() != 0 && count() < 2) || (w() <= image_->w() && h() <= image_->h())) {
|
||||
done = fl_graphics_driver->draw_scaled(image_, X-cx, Y-cy, w(), h());
|
||||
}
|
||||
if (!done) {
|
||||
if (scaled_image_ && (scaled_image_->w() != w() || scaled_image_->h() != h())) {
|
||||
delete scaled_image_;
|
||||
|
Loading…
Reference in New Issue
Block a user