File tree Expand file tree Collapse file tree 1 file changed +8
-8
lines changed
core/src/processing/opengl Expand file tree Collapse file tree 1 file changed +8
-8
lines changed Original file line number Diff line number Diff line change @@ -6774,25 +6774,25 @@ public void copy(PImage src,
6774
6774
int scrX0 , scrX1 ;
6775
6775
int scrY0 , scrY1 ;
6776
6776
if (invX ) {
6777
- scrX0 = dx + dw ;
6778
- scrX1 = dx ;
6777
+ scrX0 = ( dx + dw ) / src . pixelDensity ;
6778
+ scrX1 = dx / src . pixelDensity ;
6779
6779
} else {
6780
- scrX0 = dx ;
6781
- scrX1 = dx + dw ;
6780
+ scrX0 = dx / src . pixelDensity ;
6781
+ scrX1 = ( dx + dw ) / src . pixelDensity ;
6782
6782
}
6783
6783
6784
6784
int texX0 = sx ;
6785
6785
int texX1 = sx + sw ;
6786
6786
int texY0 , texY1 ;
6787
6787
if (invY ) {
6788
- scrY0 = height - (dy + dh );
6789
- scrY1 = height - dy ;
6788
+ scrY0 = height - (dy + dh ) / src . pixelDensity ;
6789
+ scrY1 = height - dy / src . pixelDensity ;
6790
6790
texY0 = tex .height - (sy + sh );
6791
6791
texY1 = tex .height - sy ;
6792
6792
} else {
6793
6793
// Because drawTexture uses bottom-to-top orientation of Y axis.
6794
- scrY0 = height - dy ;
6795
- scrY1 = height - (dy + dh );
6794
+ scrY0 = height - dy / src . pixelDensity ;
6795
+ scrY1 = height - (dy + dh ) / src . pixelDensity ;
6796
6796
texY0 = sy ;
6797
6797
texY1 = sy + sh ;
6798
6798
}
You can’t perform that action at this time.
0 commit comments