@@ -343,7 +343,7 @@ void checkGC (int mask) {
343
343
Cairo .cairo_set_line_join (cairo , join_style );
344
344
}
345
345
if ((state & LINE_WIDTH ) != 0 ) {
346
- Cairo .cairo_set_line_width (cairo , data .lineWidth == 0 ? DPIUtil . autoScaleUp ( drawable , 1 ) : data .lineWidth );
346
+ Cairo .cairo_set_line_width (cairo , data .lineWidth == 0 ? 1 : data .lineWidth );
347
347
switch (data .lineStyle ) {
348
348
case SWT .LINE_DOT :
349
349
case SWT .LINE_DASH :
@@ -467,7 +467,7 @@ public void copyArea(Image image, int x, int y) {
467
467
if (handle == 0 ) SWT .error (SWT .ERROR_GRAPHIC_DISPOSED );
468
468
if (image == null ) SWT .error (SWT .ERROR_NULL_ARGUMENT );
469
469
if (image .type != SWT .BITMAP || image .isDisposed ()) SWT .error (SWT .ERROR_INVALID_ARGUMENT );
470
- Point loc = DPIUtil . autoScaleUp ( drawable , new Point (x , y ) );
470
+ Point loc = new Point (x , y );
471
471
copyAreaInPixels (image , loc .x , loc .y );
472
472
}
473
473
void copyAreaInPixels (Image image , int x , int y ) {
@@ -507,8 +507,8 @@ void copyAreaInPixels(Image image, int x, int y) {
507
507
*/
508
508
public void copyArea (int srcX , int srcY , int width , int height , int destX , int destY ) {
509
509
if (handle == 0 ) SWT .error (SWT .ERROR_GRAPHIC_DISPOSED );
510
- Rectangle src = DPIUtil . autoScaleUp ( drawable , new Rectangle (srcX , srcY , width , height ) );
511
- Point dest = DPIUtil . autoScaleUp ( drawable , new Point (destX , destY ) );
510
+ Rectangle src = new Rectangle (srcX , srcY , width , height );
511
+ Point dest = new Point (destX , destY );
512
512
copyAreaInPixels (src .x , src .y , src .width , src .height , dest .x , dest .y );
513
513
}
514
514
@@ -535,8 +535,8 @@ void copyAreaInPixels(int srcX, int srcY, int width, int height, int destX, int
535
535
*/
536
536
public void copyArea (int srcX , int srcY , int width , int height , int destX , int destY , boolean paint ) {
537
537
if (handle == 0 ) SWT .error (SWT .ERROR_GRAPHIC_DISPOSED );
538
- Rectangle srcLoc = DPIUtil . autoScaleUp ( drawable , new Rectangle (srcX , srcY , width , height ) );
539
- Point destLoc = DPIUtil . autoScaleUp ( drawable , new Point (destX , destY ) );
538
+ Rectangle srcLoc = new Rectangle (srcX , srcY , width , height );
539
+ Point destLoc = new Point (destX , destY );
540
540
copyAreaInPixels (srcLoc .x , srcLoc .y , srcLoc .width , srcLoc .height , destLoc .x , destLoc .y , paint );
541
541
}
542
542
void copyAreaInPixels (int srcX , int srcY , int width , int height , int destX , int destY , boolean paint ) {
@@ -726,7 +726,7 @@ void destroy() {
726
726
*/
727
727
public void drawArc (int x , int y , int width , int height , int startAngle , int arcAngle ) {
728
728
if (handle == 0 ) SWT .error (SWT .ERROR_GRAPHIC_DISPOSED );
729
- Rectangle loc = DPIUtil . autoScaleUp ( drawable , new Rectangle (x , y , width , height ) );
729
+ Rectangle loc = new Rectangle (x , y , width , height );
730
730
drawArcInPixels (loc .x , loc .y , loc .width , loc .height , startAngle , arcAngle );
731
731
}
732
732
void drawArcInPixels (int x , int y , int width , int height , int startAngle , int arcAngle ) {
@@ -781,7 +781,7 @@ void drawArcInPixels(int x, int y, int width, int height, int startAngle, int ar
781
781
*/
782
782
public void drawFocus (int x , int y , int width , int height ) {
783
783
if (handle == 0 ) SWT .error (SWT .ERROR_GRAPHIC_DISPOSED );
784
- Rectangle loc = DPIUtil . autoScaleUp ( drawable , new Rectangle (x , y , width , height ) );
784
+ Rectangle loc = new Rectangle (x , y , width , height );
785
785
drawFocusInPixels (loc .x , loc .y , loc .width , loc .height );
786
786
}
787
787
void drawFocusInPixels (int x , int y , int width , int height ) {
@@ -814,7 +814,7 @@ public void drawImage(Image image, int x, int y) {
814
814
if (handle == 0 ) SWT .error (SWT .ERROR_GRAPHIC_DISPOSED );
815
815
if (image == null ) SWT .error (SWT .ERROR_NULL_ARGUMENT );
816
816
if (image .isDisposed ()) SWT .error (SWT .ERROR_INVALID_ARGUMENT );
817
- Point loc = DPIUtil . autoScaleUp ( drawable , new Point (x , y ) );
817
+ Point loc = new Point (x , y );
818
818
drawImageInPixels (image , loc .x , loc .y );
819
819
}
820
820
void drawImageInPixels (Image image , int x , int y ) {
@@ -861,7 +861,7 @@ public void drawImage(Image image, int srcX, int srcY, int srcWidth, int srcHeig
861
861
}
862
862
if (image == null ) SWT .error (SWT .ERROR_NULL_ARGUMENT );
863
863
if (image .isDisposed ()) SWT .error (SWT .ERROR_INVALID_ARGUMENT );
864
- Rectangle destRect = DPIUtil . autoScaleUp ( drawable , new Rectangle (destX , destY , destWidth , destHeight ) );
864
+ Rectangle destRect = new Rectangle (destX , destY , destWidth , destHeight );
865
865
drawImage (image , srcX , srcY , srcWidth , srcHeight , destRect .x , destRect .y , destRect .width , destRect .height , false );
866
866
}
867
867
void drawImage (Image srcImage , int srcX , int srcY , int srcWidth , int srcHeight , int destX , int destY , int destWidth , int destHeight , boolean simple ) {
@@ -939,8 +939,8 @@ void drawImage(Image srcImage, int srcX, int srcY, int srcWidth, int srcHeight,
939
939
*/
940
940
public void drawLine (int x1 , int y1 , int x2 , int y2 ) {
941
941
if (handle == 0 ) SWT .error (SWT .ERROR_GRAPHIC_DISPOSED );
942
- Point loc1 = DPIUtil . autoScaleUp ( drawable , new Point (x1 , y1 ) );
943
- Point loc2 = DPIUtil . autoScaleUp ( drawable , new Point (x2 , y2 ) );
942
+ Point loc1 = new Point (x1 , y1 );
943
+ Point loc2 = new Point (x2 , y2 );
944
944
drawLineInPixels (loc1 .x , loc1 .y , loc2 .x , loc2 .y );
945
945
}
946
946
void drawLineInPixels (int x1 , int y1 , int x2 , int y2 ) {
@@ -978,7 +978,7 @@ void drawLineInPixels(int x1, int y1, int x2, int y2) {
978
978
*/
979
979
public void drawOval (int x , int y , int width , int height ) {
980
980
if (handle == 0 ) SWT .error (SWT .ERROR_GRAPHIC_DISPOSED );
981
- Rectangle rect = DPIUtil . autoScaleUp ( drawable , new Rectangle (x , y , width , height ) );
981
+ Rectangle rect = new Rectangle (x , y , width , height );
982
982
drawOvalInPixels (rect .x , rect .y , rect .width , rect .height );
983
983
}
984
984
void drawOvalInPixels (int x , int y , int width , int height ) {
@@ -1065,7 +1065,7 @@ public void drawPath(Path path) {
1065
1065
*/
1066
1066
public void drawPoint (int x , int y ) {
1067
1067
if (handle == 0 ) SWT .error (SWT .ERROR_GRAPHIC_DISPOSED );
1068
- Point loc = DPIUtil . autoScaleUp ( drawable , new Point (x , y ) );
1068
+ Point loc = new Point (x , y );
1069
1069
drawPointInPixels (loc .x , loc .y );
1070
1070
}
1071
1071
void drawPointInPixels (int x , int y ) {
@@ -1095,7 +1095,7 @@ void drawPointInPixels (int x, int y) {
1095
1095
public void drawPolygon (int [] pointArray ) {
1096
1096
if (handle == 0 ) SWT .error (SWT .ERROR_GRAPHIC_DISPOSED );
1097
1097
if (pointArray == null ) SWT .error (SWT .ERROR_NULL_ARGUMENT );
1098
- int [] scaledPointArray = DPIUtil . autoScaleUp ( drawable , pointArray ) ;
1098
+ int [] scaledPointArray = pointArray ;
1099
1099
drawPolygonInPixels (scaledPointArray );
1100
1100
}
1101
1101
void drawPolygonInPixels (int [] pointArray ) {
@@ -1125,7 +1125,7 @@ void drawPolygonInPixels(int[] pointArray) {
1125
1125
public void drawPolyline (int [] pointArray ) {
1126
1126
if (handle == 0 ) SWT .error (SWT .ERROR_GRAPHIC_DISPOSED );
1127
1127
if (pointArray == null ) SWT .error (SWT .ERROR_NULL_ARGUMENT );
1128
- int [] scaledPointArray = DPIUtil . autoScaleUp ( drawable , pointArray ) ;
1128
+ int [] scaledPointArray = pointArray ;
1129
1129
drawPolylineInPixels (scaledPointArray );
1130
1130
}
1131
1131
void drawPolylineInPixels (int [] pointArray ) {
@@ -1199,7 +1199,7 @@ void drawRectangleInPixels(int x, int y, int width, int height) {
1199
1199
*/
1200
1200
public void drawRectangle (Rectangle rect ) {
1201
1201
if (rect == null ) SWT .error (SWT .ERROR_NULL_ARGUMENT );
1202
- drawRectangleInPixels (DPIUtil . autoScaleUp ( drawable , rect ) );
1202
+ drawRectangleInPixels (rect );
1203
1203
}
1204
1204
void drawRectangleInPixels (Rectangle rect ) {
1205
1205
drawRectangleInPixels (rect .x , rect .y , rect .width , rect .height );
@@ -1227,8 +1227,8 @@ void drawRectangleInPixels(Rectangle rect) {
1227
1227
*/
1228
1228
public void drawRoundRectangle (int x , int y , int width , int height , int arcWidth , int arcHeight ) {
1229
1229
if (handle == 0 ) SWT .error (SWT .ERROR_GRAPHIC_DISPOSED );
1230
- Rectangle rect = DPIUtil . autoScaleUp ( drawable , new Rectangle (x , y , width , height ) );
1231
- Point arcSize = DPIUtil . autoScaleUp ( drawable , new Point (arcWidth , arcHeight ) );
1230
+ Rectangle rect = new Rectangle (x , y , width , height );
1231
+ Point arcSize = new Point (arcWidth , arcHeight );
1232
1232
drawRoundRectangleInPixels (rect .x , rect .y , rect .width , rect .height , arcSize .x , arcSize .y );
1233
1233
}
1234
1234
void drawRoundRectangleInPixels (int x , int y , int width , int height , int arcWidth , int arcHeight ) {
@@ -1333,7 +1333,7 @@ void drawStringInPixels (String string, int x, int y) {
1333
1333
public void drawString (String string , int x , int y , boolean isTransparent ) {
1334
1334
if (handle == 0 ) SWT .error (SWT .ERROR_GRAPHIC_DISPOSED );
1335
1335
if (string == null ) SWT .error (SWT .ERROR_NULL_ARGUMENT );
1336
- Point loc = DPIUtil . autoScaleUp ( drawable , new Point (x , y ) );
1336
+ Point loc = new Point (x , y );
1337
1337
drawStringInPixels (string , loc .x , loc .y , isTransparent );
1338
1338
}
1339
1339
@@ -1395,7 +1395,7 @@ void drawTextInPixels(String string, int x, int y) {
1395
1395
* </ul>
1396
1396
*/
1397
1397
public void drawText (String string , int x , int y , boolean isTransparent ) {
1398
- Point loc = DPIUtil . autoScaleUp ( drawable , new Point (x , y ) );
1398
+ Point loc = new Point (x , y );
1399
1399
drawTextInPixels (string , loc .x , loc .y , isTransparent );
1400
1400
}
1401
1401
void drawTextInPixels (String string , int x , int y , boolean isTransparent ) {
@@ -1444,7 +1444,7 @@ void drawTextInPixels(String string, int x, int y, boolean isTransparent) {
1444
1444
* </ul>
1445
1445
*/
1446
1446
public void drawText (String string , int x , int y , int flags ) {
1447
- Point loc = DPIUtil . autoScaleUp ( drawable , new Point (x , y ) );
1447
+ Point loc = new Point (x , y );
1448
1448
drawTextInPixels (string , loc .x , loc .y , flags );
1449
1449
}
1450
1450
void drawTextInPixels (String string , int x , int y , int flags ) {
@@ -1530,7 +1530,7 @@ public boolean equals(Object object) {
1530
1530
*/
1531
1531
public void fillArc (int x , int y , int width , int height , int startAngle , int arcAngle ) {
1532
1532
if (handle == 0 ) SWT .error (SWT .ERROR_GRAPHIC_DISPOSED );
1533
- Rectangle rect = DPIUtil . autoScaleUp ( drawable , new Rectangle (x , y , width , height ) );
1533
+ Rectangle rect = new Rectangle (x , y , width , height );
1534
1534
fillArcInPixels (rect .x , rect .y , rect .width , rect .height , startAngle , arcAngle );
1535
1535
}
1536
1536
void fillArcInPixels (int x , int y , int width , int height , int startAngle , int arcAngle ) {
@@ -1589,7 +1589,7 @@ void fillArcInPixels(int x, int y, int width, int height, int startAngle, int ar
1589
1589
*/
1590
1590
public void fillGradientRectangle (int x , int y , int width , int height , boolean vertical ) {
1591
1591
if (handle == 0 ) SWT .error (SWT .ERROR_GRAPHIC_DISPOSED );
1592
- Rectangle rect = DPIUtil . autoScaleUp ( drawable , new Rectangle (x , y , width , height ) );
1592
+ Rectangle rect = new Rectangle (x , y , width , height );
1593
1593
fillGradientRectangleInPixels (rect .x , rect .y , rect .width , rect .height , vertical );
1594
1594
}
1595
1595
@@ -1673,7 +1673,7 @@ void fillGradientRectangleInPixels(int x, int y, int width, int height, boolean
1673
1673
*/
1674
1674
public void fillOval (int x , int y , int width , int height ) {
1675
1675
if (handle == 0 ) SWT .error (SWT .ERROR_GRAPHIC_DISPOSED );
1676
- Rectangle rect = DPIUtil . autoScaleUp ( drawable , new Rectangle (x , y , width , height ) );
1676
+ Rectangle rect = new Rectangle (x , y , width , height );
1677
1677
fillOvalInPixels (rect .x , rect .y , rect .width , rect .height );
1678
1678
}
1679
1679
void fillOvalInPixels (int x , int y , int width , int height ) {
@@ -1758,7 +1758,7 @@ public void fillPath (Path path) {
1758
1758
public void fillPolygon (int [] pointArray ) {
1759
1759
if (handle == 0 ) SWT .error (SWT .ERROR_GRAPHIC_DISPOSED );
1760
1760
if (pointArray == null ) SWT .error (SWT .ERROR_NULL_ARGUMENT );
1761
- int [] scaledPointArray = DPIUtil . autoScaleUp ( drawable , pointArray ) ;
1761
+ int [] scaledPointArray = pointArray ;
1762
1762
fillPolygonInPixels (scaledPointArray );
1763
1763
}
1764
1764
void fillPolygonInPixels (int [] pointArray ) {
@@ -1824,7 +1824,7 @@ void fillRectangleInPixels(int x, int y, int width, int height) {
1824
1824
public void fillRectangle (Rectangle rect ) {
1825
1825
if (handle == 0 ) SWT .error (SWT .ERROR_GRAPHIC_DISPOSED );
1826
1826
if (rect == null ) SWT .error (SWT .ERROR_NULL_ARGUMENT );
1827
- fillRectangleInPixels (DPIUtil . autoScaleUp ( drawable , rect ) );
1827
+ fillRectangleInPixels (rect );
1828
1828
}
1829
1829
void fillRectangleInPixels (Rectangle rect ) {
1830
1830
fillRectangleInPixels (rect .x , rect .y , rect .width , rect .height );
@@ -1849,8 +1849,8 @@ void fillRectangleInPixels(Rectangle rect) {
1849
1849
*/
1850
1850
public void fillRoundRectangle (int x , int y , int width , int height , int arcWidth , int arcHeight ) {
1851
1851
if (handle == 0 ) SWT .error (SWT .ERROR_GRAPHIC_DISPOSED );
1852
- Rectangle rect = DPIUtil . autoScaleUp ( drawable , new Rectangle (x , y , width , height ) );
1853
- Point arcSize = DPIUtil . autoScaleUp ( drawable , new Point (arcWidth , arcHeight ) );
1852
+ Rectangle rect = new Rectangle (x , y , width , height );
1853
+ Point arcSize = new Point (arcWidth , arcHeight );
1854
1854
fillRoundRectangleInPixels (rect .x , rect .y , rect .width , rect .height , arcSize .x , arcSize .y );
1855
1855
}
1856
1856
void fillRoundRectangleInPixels (int x , int y , int width , int height , int arcWidth , int arcHeight ) {
@@ -2074,7 +2074,7 @@ public int getCharWidth(char ch) {
2074
2074
*/
2075
2075
public Rectangle getClipping () {
2076
2076
if (handle == 0 ) SWT .error (SWT .ERROR_GRAPHIC_DISPOSED );
2077
- return DPIUtil . autoScaleDown ( drawable , getClippingInPixels () );
2077
+ return getClippingInPixels ();
2078
2078
}
2079
2079
Rectangle getClippingInPixels () {
2080
2080
/* Calculate visible bounds in device space */
@@ -2251,11 +2251,11 @@ public FontMetrics getFontMetrics() {
2251
2251
FontMetrics fm = new FontMetrics ();
2252
2252
int ascent = OS .pango_font_metrics_get_ascent (metrics );
2253
2253
int descent = OS .pango_font_metrics_get_descent (metrics );
2254
- int ascentInPoints = DPIUtil . autoScaleDown ( drawable , OS .PANGO_PIXELS (ascent ) );
2254
+ int ascentInPoints = OS .PANGO_PIXELS (ascent );
2255
2255
fm .ascentInPoints = ascentInPoints ;
2256
- int heightInPoints = DPIUtil . autoScaleDown ( drawable , OS .PANGO_PIXELS (ascent + descent ) );
2256
+ int heightInPoints = OS .PANGO_PIXELS (ascent + descent );
2257
2257
fm .descentInPoints = heightInPoints - ascentInPoints ;
2258
- fm .averageCharWidthInPoints = DPIUtil . autoScaleDown ( drawable , OS .PANGO_PIXELS (OS .pango_font_metrics_get_approximate_char_width (metrics ) ));
2258
+ fm .averageCharWidthInPoints = OS .PANGO_PIXELS (OS .pango_font_metrics_get_approximate_char_width (metrics ));
2259
2259
OS .pango_font_metrics_unref (metrics );
2260
2260
return fm ;
2261
2261
}
@@ -2352,7 +2352,7 @@ public int getInterpolation() {
2352
2352
public LineAttributes getLineAttributes () {
2353
2353
if (handle == 0 ) SWT .error (SWT .ERROR_GRAPHIC_DISPOSED );
2354
2354
LineAttributes attributes = getLineAttributesInPixels ();
2355
- attributes .width = DPIUtil . autoScaleDown ( drawable , attributes .width ) ;
2355
+ attributes .width = attributes .width ;
2356
2356
return attributes ;
2357
2357
}
2358
2358
LineAttributes getLineAttributesInPixels () {
@@ -2453,7 +2453,7 @@ public int getLineStyle() {
2453
2453
*/
2454
2454
public int getLineWidth () {
2455
2455
if (handle == 0 ) SWT .error (SWT .ERROR_GRAPHIC_DISPOSED );
2456
- return ( int ) DPIUtil . autoScaleDown ( drawable , data . lineWidth );
2456
+ return getLineWidthInPixels ( );
2457
2457
}
2458
2458
int getLineWidthInPixels () {
2459
2459
return (int )data .lineWidth ;
@@ -3112,7 +3112,7 @@ void setClipping(long clipRgn) {
3112
3112
*/
3113
3113
public void setClipping (int x , int y , int width , int height ) {
3114
3114
if (handle == 0 ) SWT .error (SWT .ERROR_GRAPHIC_DISPOSED );
3115
- setClippingInPixels (DPIUtil . autoScaleUp ( drawable , x ), DPIUtil . autoScaleUp ( drawable , y ), DPIUtil . autoScaleUp ( drawable , width ), DPIUtil . autoScaleUp ( drawable , height ) );
3115
+ setClippingInPixels (x , y , width , height );
3116
3116
}
3117
3117
void setClippingInPixels (int x , int y , int width , int height ) {
3118
3118
if (width < 0 ) {
@@ -3190,7 +3190,7 @@ public void setClipping(Path path) {
3190
3190
*/
3191
3191
public void setClipping (Rectangle rect ) {
3192
3192
if (handle == 0 ) SWT .error (SWT .ERROR_GRAPHIC_DISPOSED );
3193
- setClippingInPixels (DPIUtil . autoScaleUp ( drawable , rect ) );
3193
+ setClippingInPixels (rect );
3194
3194
}
3195
3195
void setClippingInPixels (Rectangle rect ) {
3196
3196
if (rect == null ) {
@@ -3415,7 +3415,7 @@ public void setInterpolation(int interpolation) {
3415
3415
public void setLineAttributes (LineAttributes attributes ) {
3416
3416
if (handle == 0 ) SWT .error (SWT .ERROR_GRAPHIC_DISPOSED );
3417
3417
if (attributes == null ) SWT .error (SWT .ERROR_NULL_ARGUMENT );
3418
- attributes .width = DPIUtil . autoScaleUp ( drawable , attributes .width ) ;
3418
+ attributes .width = attributes .width ;
3419
3419
setLineAttributesInPixels (attributes );
3420
3420
}
3421
3421
void setLineAttributesInPixels (LineAttributes attributes ) {
@@ -3669,7 +3669,7 @@ public void setLineStyle(int lineStyle) {
3669
3669
*/
3670
3670
public void setLineWidth (int lineWidth ) {
3671
3671
if (handle == 0 ) SWT .error (SWT .ERROR_GRAPHIC_DISPOSED );
3672
- setLineWidthInPixels (DPIUtil . autoScaleUp ( drawable , lineWidth ) );
3672
+ setLineWidthInPixels (lineWidth );
3673
3673
}
3674
3674
void setLineWidthInPixels (int lineWidth ) {
3675
3675
if (data .lineWidth == lineWidth ) return ;
@@ -3853,7 +3853,7 @@ public void setXORMode(boolean xor) {
3853
3853
* </ul>
3854
3854
*/
3855
3855
public Point stringExtent (String string ) {
3856
- return DPIUtil . autoScaleDown ( drawable , stringExtentInPixels (string ) );
3856
+ return stringExtentInPixels (string );
3857
3857
}
3858
3858
Point stringExtentInPixels (String string ) {
3859
3859
return textExtentInPixels (string , 0 );
@@ -3879,7 +3879,7 @@ Point stringExtentInPixels(String string) {
3879
3879
* </ul>
3880
3880
*/
3881
3881
public Point textExtent (String string ) {
3882
- return DPIUtil . autoScaleDown ( drawable , textExtentInPixels (string ) );
3882
+ return textExtentInPixels (string );
3883
3883
}
3884
3884
3885
3885
Point textExtentInPixels (String string ) {
@@ -3920,7 +3920,7 @@ Point textExtentInPixels(String string) {
3920
3920
public Point textExtent (String string , int flags ) {
3921
3921
if (handle == 0 ) SWT .error (SWT .ERROR_GRAPHIC_DISPOSED );
3922
3922
if (string == null ) SWT .error (SWT .ERROR_NULL_ARGUMENT );
3923
- return DPIUtil . autoScaleDown ( drawable , textExtentInPixels (string , flags ) );
3923
+ return textExtentInPixels (string , flags );
3924
3924
}
3925
3925
Point textExtentInPixels (String string , int flags ) {
3926
3926
setString (string , flags );
0 commit comments