Commit 5378162
[Cocoa] Fix copyArea(Image,int,int) ignoring scale factor in Y translation
Bug: When copying an area from a GC backed by a source image into a
destination image of different height on a HiDPI display (zoom > 100%),
the wrong portion of the source image is copied into the destination.
Root cause: The NSAffineTransform translation used to position the
drawing within the bitmap context created from the destination image
representation was computed in logical point units, while the bitmap
context's coordinate space operates in physical pixel units. The
destination rect dimensions (destRect.width, destRect.height) were
already correctly scaled by scaleFactor, but the translation was not.
The fix applies the same scaleFactor to the translation, making it
consistent with the rest of the pixel-space coordinate calculations.
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>1 parent 108533e commit 5378162
1 file changed
Lines changed: 1 addition & 1 deletion
Lines changed: 1 addition & 1 deletion
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
539 | 539 | | |
540 | 540 | | |
541 | 541 | | |
542 | | - | |
| 542 | + | |
543 | 543 | | |
544 | 544 | | |
545 | 545 | | |
| |||
0 commit comments