@@ -343,7 +343,7 @@ void checkGC (int mask) {
343343 Cairo .cairo_set_line_join (cairo , join_style );
344344 }
345345 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 );
347347 switch (data .lineStyle ) {
348348 case SWT .LINE_DOT :
349349 case SWT .LINE_DASH :
@@ -467,7 +467,7 @@ public void copyArea(Image image, int x, int y) {
467467 if (handle == 0 ) SWT .error (SWT .ERROR_GRAPHIC_DISPOSED );
468468 if (image == null ) SWT .error (SWT .ERROR_NULL_ARGUMENT );
469469 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 );
471471 copyAreaInPixels (image , loc .x , loc .y );
472472}
473473void copyAreaInPixels (Image image , int x , int y ) {
@@ -507,8 +507,8 @@ void copyAreaInPixels(Image image, int x, int y) {
507507 */
508508public void copyArea (int srcX , int srcY , int width , int height , int destX , int destY ) {
509509 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 );
512512 copyAreaInPixels (src .x , src .y , src .width , src .height , dest .x , dest .y );
513513}
514514
@@ -535,8 +535,8 @@ void copyAreaInPixels(int srcX, int srcY, int width, int height, int destX, int
535535 */
536536public void copyArea (int srcX , int srcY , int width , int height , int destX , int destY , boolean paint ) {
537537 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 );
540540 copyAreaInPixels (srcLoc .x , srcLoc .y , srcLoc .width , srcLoc .height , destLoc .x , destLoc .y , paint );
541541}
542542void copyAreaInPixels (int srcX , int srcY , int width , int height , int destX , int destY , boolean paint ) {
@@ -726,7 +726,7 @@ void destroy() {
726726 */
727727public void drawArc (int x , int y , int width , int height , int startAngle , int arcAngle ) {
728728 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 );
730730 drawArcInPixels (loc .x , loc .y , loc .width , loc .height , startAngle , arcAngle );
731731}
732732void 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
781781 */
782782public void drawFocus (int x , int y , int width , int height ) {
783783 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 );
785785 drawFocusInPixels (loc .x , loc .y , loc .width , loc .height );
786786}
787787void drawFocusInPixels (int x , int y , int width , int height ) {
@@ -814,7 +814,7 @@ public void drawImage(Image image, int x, int y) {
814814 if (handle == 0 ) SWT .error (SWT .ERROR_GRAPHIC_DISPOSED );
815815 if (image == null ) SWT .error (SWT .ERROR_NULL_ARGUMENT );
816816 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 );
818818 drawImageInPixels (image , loc .x , loc .y );
819819}
820820void drawImageInPixels (Image image , int x , int y ) {
@@ -861,7 +861,7 @@ public void drawImage(Image image, int srcX, int srcY, int srcWidth, int srcHeig
861861 }
862862 if (image == null ) SWT .error (SWT .ERROR_NULL_ARGUMENT );
863863 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 );
865865 drawImage (image , srcX , srcY , srcWidth , srcHeight , destRect .x , destRect .y , destRect .width , destRect .height , false );
866866}
867867void 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,
939939 */
940940public void drawLine (int x1 , int y1 , int x2 , int y2 ) {
941941 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 );
944944 drawLineInPixels (loc1 .x , loc1 .y , loc2 .x , loc2 .y );
945945}
946946void drawLineInPixels (int x1 , int y1 , int x2 , int y2 ) {
@@ -978,7 +978,7 @@ void drawLineInPixels(int x1, int y1, int x2, int y2) {
978978 */
979979public void drawOval (int x , int y , int width , int height ) {
980980 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 );
982982 drawOvalInPixels (rect .x , rect .y , rect .width , rect .height );
983983}
984984void drawOvalInPixels (int x , int y , int width , int height ) {
@@ -1065,7 +1065,7 @@ public void drawPath(Path path) {
10651065 */
10661066public void drawPoint (int x , int y ) {
10671067 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 );
10691069 drawPointInPixels (loc .x , loc .y );
10701070}
10711071void drawPointInPixels (int x , int y ) {
@@ -1095,7 +1095,7 @@ void drawPointInPixels (int x, int y) {
10951095public void drawPolygon (int [] pointArray ) {
10961096 if (handle == 0 ) SWT .error (SWT .ERROR_GRAPHIC_DISPOSED );
10971097 if (pointArray == null ) SWT .error (SWT .ERROR_NULL_ARGUMENT );
1098- int [] scaledPointArray = DPIUtil . autoScaleUp ( drawable , pointArray ) ;
1098+ int [] scaledPointArray = pointArray ;
10991099 drawPolygonInPixels (scaledPointArray );
11001100}
11011101void drawPolygonInPixels (int [] pointArray ) {
@@ -1125,7 +1125,7 @@ void drawPolygonInPixels(int[] pointArray) {
11251125public void drawPolyline (int [] pointArray ) {
11261126 if (handle == 0 ) SWT .error (SWT .ERROR_GRAPHIC_DISPOSED );
11271127 if (pointArray == null ) SWT .error (SWT .ERROR_NULL_ARGUMENT );
1128- int [] scaledPointArray = DPIUtil . autoScaleUp ( drawable , pointArray ) ;
1128+ int [] scaledPointArray = pointArray ;
11291129 drawPolylineInPixels (scaledPointArray );
11301130}
11311131void drawPolylineInPixels (int [] pointArray ) {
@@ -1199,7 +1199,7 @@ void drawRectangleInPixels(int x, int y, int width, int height) {
11991199 */
12001200public void drawRectangle (Rectangle rect ) {
12011201 if (rect == null ) SWT .error (SWT .ERROR_NULL_ARGUMENT );
1202- drawRectangleInPixels (DPIUtil . autoScaleUp ( drawable , rect ) );
1202+ drawRectangleInPixels (rect );
12031203}
12041204void drawRectangleInPixels (Rectangle rect ) {
12051205 drawRectangleInPixels (rect .x , rect .y , rect .width , rect .height );
@@ -1227,8 +1227,8 @@ void drawRectangleInPixels(Rectangle rect) {
12271227 */
12281228public void drawRoundRectangle (int x , int y , int width , int height , int arcWidth , int arcHeight ) {
12291229 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 );
12321232 drawRoundRectangleInPixels (rect .x , rect .y , rect .width , rect .height , arcSize .x , arcSize .y );
12331233}
12341234void 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) {
13331333public void drawString (String string , int x , int y , boolean isTransparent ) {
13341334 if (handle == 0 ) SWT .error (SWT .ERROR_GRAPHIC_DISPOSED );
13351335 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 );
13371337 drawStringInPixels (string , loc .x , loc .y , isTransparent );
13381338}
13391339
@@ -1395,7 +1395,7 @@ void drawTextInPixels(String string, int x, int y) {
13951395 * </ul>
13961396 */
13971397public 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 );
13991399 drawTextInPixels (string , loc .x , loc .y , isTransparent );
14001400}
14011401void drawTextInPixels (String string , int x , int y , boolean isTransparent ) {
@@ -1444,7 +1444,7 @@ void drawTextInPixels(String string, int x, int y, boolean isTransparent) {
14441444 * </ul>
14451445 */
14461446public 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 );
14481448 drawTextInPixels (string , loc .x , loc .y , flags );
14491449}
14501450void drawTextInPixels (String string , int x , int y , int flags ) {
@@ -1530,7 +1530,7 @@ public boolean equals(Object object) {
15301530 */
15311531public void fillArc (int x , int y , int width , int height , int startAngle , int arcAngle ) {
15321532 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 );
15341534 fillArcInPixels (rect .x , rect .y , rect .width , rect .height , startAngle , arcAngle );
15351535}
15361536void 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
15891589 */
15901590public void fillGradientRectangle (int x , int y , int width , int height , boolean vertical ) {
15911591 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 );
15931593 fillGradientRectangleInPixels (rect .x , rect .y , rect .width , rect .height , vertical );
15941594}
15951595
@@ -1673,7 +1673,7 @@ void fillGradientRectangleInPixels(int x, int y, int width, int height, boolean
16731673 */
16741674public void fillOval (int x , int y , int width , int height ) {
16751675 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 );
16771677 fillOvalInPixels (rect .x , rect .y , rect .width , rect .height );
16781678}
16791679void fillOvalInPixels (int x , int y , int width , int height ) {
@@ -1758,7 +1758,7 @@ public void fillPath (Path path) {
17581758public void fillPolygon (int [] pointArray ) {
17591759 if (handle == 0 ) SWT .error (SWT .ERROR_GRAPHIC_DISPOSED );
17601760 if (pointArray == null ) SWT .error (SWT .ERROR_NULL_ARGUMENT );
1761- int [] scaledPointArray = DPIUtil . autoScaleUp ( drawable , pointArray ) ;
1761+ int [] scaledPointArray = pointArray ;
17621762 fillPolygonInPixels (scaledPointArray );
17631763}
17641764void fillPolygonInPixels (int [] pointArray ) {
@@ -1824,7 +1824,7 @@ void fillRectangleInPixels(int x, int y, int width, int height) {
18241824public void fillRectangle (Rectangle rect ) {
18251825 if (handle == 0 ) SWT .error (SWT .ERROR_GRAPHIC_DISPOSED );
18261826 if (rect == null ) SWT .error (SWT .ERROR_NULL_ARGUMENT );
1827- fillRectangleInPixels (DPIUtil . autoScaleUp ( drawable , rect ) );
1827+ fillRectangleInPixels (rect );
18281828}
18291829void fillRectangleInPixels (Rectangle rect ) {
18301830 fillRectangleInPixels (rect .x , rect .y , rect .width , rect .height );
@@ -1849,8 +1849,8 @@ void fillRectangleInPixels(Rectangle rect) {
18491849 */
18501850public void fillRoundRectangle (int x , int y , int width , int height , int arcWidth , int arcHeight ) {
18511851 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 );
18541854 fillRoundRectangleInPixels (rect .x , rect .y , rect .width , rect .height , arcSize .x , arcSize .y );
18551855}
18561856void fillRoundRectangleInPixels (int x , int y , int width , int height , int arcWidth , int arcHeight ) {
@@ -2074,7 +2074,7 @@ public int getCharWidth(char ch) {
20742074 */
20752075public Rectangle getClipping () {
20762076 if (handle == 0 ) SWT .error (SWT .ERROR_GRAPHIC_DISPOSED );
2077- return DPIUtil . autoScaleDown ( drawable , getClippingInPixels () );
2077+ return getClippingInPixels ();
20782078}
20792079Rectangle getClippingInPixels () {
20802080 /* Calculate visible bounds in device space */
@@ -2251,11 +2251,11 @@ public FontMetrics getFontMetrics() {
22512251 FontMetrics fm = new FontMetrics ();
22522252 int ascent = OS .pango_font_metrics_get_ascent (metrics );
22532253 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 );
22552255 fm .ascentInPoints = ascentInPoints ;
2256- int heightInPoints = DPIUtil . autoScaleDown ( drawable , OS .PANGO_PIXELS (ascent + descent ) );
2256+ int heightInPoints = OS .PANGO_PIXELS (ascent + descent );
22572257 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 ));
22592259 OS .pango_font_metrics_unref (metrics );
22602260 return fm ;
22612261}
@@ -2352,7 +2352,7 @@ public int getInterpolation() {
23522352public LineAttributes getLineAttributes () {
23532353 if (handle == 0 ) SWT .error (SWT .ERROR_GRAPHIC_DISPOSED );
23542354 LineAttributes attributes = getLineAttributesInPixels ();
2355- attributes .width = DPIUtil . autoScaleDown ( drawable , attributes .width ) ;
2355+ attributes .width = attributes .width ;
23562356 return attributes ;
23572357}
23582358LineAttributes getLineAttributesInPixels () {
@@ -2453,7 +2453,7 @@ public int getLineStyle() {
24532453 */
24542454public int getLineWidth () {
24552455 if (handle == 0 ) SWT .error (SWT .ERROR_GRAPHIC_DISPOSED );
2456- return ( int ) DPIUtil . autoScaleDown ( drawable , data . lineWidth );
2456+ return getLineWidthInPixels ( );
24572457}
24582458int getLineWidthInPixels () {
24592459 return (int )data .lineWidth ;
@@ -3112,7 +3112,7 @@ void setClipping(long clipRgn) {
31123112 */
31133113public void setClipping (int x , int y , int width , int height ) {
31143114 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 );
31163116}
31173117void setClippingInPixels (int x , int y , int width , int height ) {
31183118 if (width < 0 ) {
@@ -3190,7 +3190,7 @@ public void setClipping(Path path) {
31903190 */
31913191public void setClipping (Rectangle rect ) {
31923192 if (handle == 0 ) SWT .error (SWT .ERROR_GRAPHIC_DISPOSED );
3193- setClippingInPixels (DPIUtil . autoScaleUp ( drawable , rect ) );
3193+ setClippingInPixels (rect );
31943194}
31953195void setClippingInPixels (Rectangle rect ) {
31963196 if (rect == null ) {
@@ -3415,7 +3415,7 @@ public void setInterpolation(int interpolation) {
34153415public void setLineAttributes (LineAttributes attributes ) {
34163416 if (handle == 0 ) SWT .error (SWT .ERROR_GRAPHIC_DISPOSED );
34173417 if (attributes == null ) SWT .error (SWT .ERROR_NULL_ARGUMENT );
3418- attributes .width = DPIUtil . autoScaleUp ( drawable , attributes .width ) ;
3418+ attributes .width = attributes .width ;
34193419 setLineAttributesInPixels (attributes );
34203420}
34213421void setLineAttributesInPixels (LineAttributes attributes ) {
@@ -3669,7 +3669,7 @@ public void setLineStyle(int lineStyle) {
36693669 */
36703670public void setLineWidth (int lineWidth ) {
36713671 if (handle == 0 ) SWT .error (SWT .ERROR_GRAPHIC_DISPOSED );
3672- setLineWidthInPixels (DPIUtil . autoScaleUp ( drawable , lineWidth ) );
3672+ setLineWidthInPixels (lineWidth );
36733673}
36743674void setLineWidthInPixels (int lineWidth ) {
36753675 if (data .lineWidth == lineWidth ) return ;
@@ -3853,7 +3853,7 @@ public void setXORMode(boolean xor) {
38533853 * </ul>
38543854 */
38553855public Point stringExtent (String string ) {
3856- return DPIUtil . autoScaleDown ( drawable , stringExtentInPixels (string ) );
3856+ return stringExtentInPixels (string );
38573857}
38583858Point stringExtentInPixels (String string ) {
38593859 return textExtentInPixels (string , 0 );
@@ -3879,7 +3879,7 @@ Point stringExtentInPixels(String string) {
38793879 * </ul>
38803880 */
38813881public Point textExtent (String string ) {
3882- return DPIUtil . autoScaleDown ( drawable , textExtentInPixels (string ) );
3882+ return textExtentInPixels (string );
38833883}
38843884
38853885Point textExtentInPixels (String string ) {
@@ -3920,7 +3920,7 @@ Point textExtentInPixels(String string) {
39203920public Point textExtent (String string , int flags ) {
39213921 if (handle == 0 ) SWT .error (SWT .ERROR_GRAPHIC_DISPOSED );
39223922 if (string == null ) SWT .error (SWT .ERROR_NULL_ARGUMENT );
3923- return DPIUtil . autoScaleDown ( drawable , textExtentInPixels (string , flags ) );
3923+ return textExtentInPixels (string , flags );
39243924}
39253925Point textExtentInPixels (String string , int flags ) {
39263926 setString (string , flags );
0 commit comments