mirror of
https://github.com/fltk/fltk.git
synced 2026-05-30 13:05:35 +08:00
Improve drawing of part of Fl_RGB_Image while scaling display (#1370)
This commit is contained in:
+1
-2
@@ -726,8 +726,7 @@ static void crect_intersect(rectangle_int_t *to, rectangle_int_t *with) {
|
|||||||
|
|
||||||
|
|
||||||
void Fl_RGB_Image::draw(int XP, int YP, int WP, int HP, int cx, int cy) {
|
void Fl_RGB_Image::draw(int XP, int YP, int WP, int HP, int cx, int cy) {
|
||||||
float s = fl_graphics_driver->scale();
|
if ((cx || cy || WP != w() || HP != h()) && w() == data_w() && h() == data_h()) {
|
||||||
if (s != int(s) && (cx || cy || WP != w() || HP != h()) && w() == data_w() && h() == data_h()) {
|
|
||||||
// See issue #1128: clipping to a part of the image while the scaling
|
// See issue #1128: clipping to a part of the image while the scaling
|
||||||
// has a fractional value creates problems
|
// has a fractional value creates problems
|
||||||
rectangle_int_t r1 = { XP-cx, YP-cy, w(), h() };
|
rectangle_int_t r1 = { XP-cx, YP-cy, w(), h() };
|
||||||
|
|||||||
Reference in New Issue
Block a user