Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -1306,7 +1306,7 @@ public Rectangle getBounds() {
* @deprecated This API doesn't serve the purpose in an environment having
* multiple monitors with different DPIs, hence deprecated.
*/
@Deprecated
@Deprecated(since = "2025-09", forRemoval = true)
public Rectangle getBoundsInPixels() {
Rectangle bounds = getBounds();
int scaleFactor = (int) NSScreen.mainScreen().backingScaleFactor();
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -1014,7 +1014,7 @@ public Rectangle getBounds() {
* @deprecated This API doesn't serve the purpose in an environment having
* multiple monitors with different DPIs, hence deprecated.
*/
@Deprecated
@Deprecated(since = "2025-09", forRemoval = true)
public Rectangle getBoundsInPixels() {
if (isDisposed()) SWT.error(SWT.ERROR_GRAPHIC_DISPOSED);
if (width != -1 && height != -1) {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -143,7 +143,7 @@ private void drawInCellEditor(long window) {
public Rectangle getBounds () {
checkWidget();
if (image != null) {
Rectangle rect = image.getBoundsInPixels ();
Rectangle rect = image.getBounds();
return new Rectangle (x, y, rect.width, rect.height);
} else {
if (width == 0) {
Expand Down Expand Up @@ -228,7 +228,7 @@ public Canvas getParent () {
public Point getSize () {
checkWidget();
if (image != null) {
Rectangle rect = image.getBoundsInPixels ();
Rectangle rect = image.getBounds();
return new Point (rect.width, rect.height);
} else {
if (width == 0) {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -1161,7 +1161,7 @@ Rectangle getBounds(int zoom) {
* @deprecated This API doesn't serve the purpose in an environment having
* multiple monitors with different DPIs, hence deprecated.
*/
@Deprecated
@Deprecated(since = "2025-09", forRemoval = true)
public Rectangle getBoundsInPixels() {
return applyUsingAnyHandle(ImageHandle::getBounds);
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -584,7 +584,7 @@ public void test_getBounds() {
assertEquals(bounds, bounds1);
}

@SuppressWarnings("deprecation")
@SuppressWarnings("removal")
@Test
public void test_getBoundsInPixels() {
Rectangle initialBounds = new Rectangle(0, 0, 10, 20);
Expand Down
Loading