@@ -14,10 +14,11 @@ public class PGraphicsRetina2D extends PGraphicsJava2D {
1414 // INTERNAL
1515
1616
17- // public PGraphicsRetina2D() {
17+ public PGraphicsRetina2D () {
18+ pixelFactor = 2 ;
1819// retina = new PImage();
1920// retina.format = RGB;
20- // }
21+ }
2122
2223
2324// @Override
@@ -96,13 +97,13 @@ public class PGraphicsRetina2D extends PGraphicsJava2D {
9697
9798 @ Override
9899 public void beginDraw () {
99- GraphicsConfiguration gc = parent .getGraphicsConfiguration ();
100-
101- if (image == null ) {
102- retina .width = width * 2 ;
103- retina .height = height * 2 ;
104- image = gc .createCompatibleImage (retina .width , retina .height );
105- }
100+ // GraphicsConfiguration gc = parent.getGraphicsConfiguration();
101+ //
102+ // if (image == null) {
103+ // retina.width = width * 2;
104+ // retina.height = height * 2;
105+ // image = gc.createCompatibleImage(retina.width, retina.height);
106+ // }
106107 g2 = (Graphics2D ) image .getGraphics ();
107108
108109 checkSettings ();
@@ -196,8 +197,7 @@ public void endDraw() {
196197 //////////////////////////////////////////////////////////////
197198
198199
199- // int[] retinaPixels;
200-
200+ /*
201201 @Override
202202 public void loadPixels() {
203203 if ((retina.pixels == null) || (retina.pixels.length != retina.width * retina.height)) {
@@ -265,12 +265,6 @@ public void updatePixels() {
265265 }
266266
267267
268- /**
269- * Update the pixels[] buffer to the PGraphics image.
270- * <P>
271- * Unlike in PImage, where updatePixels() only requests that the
272- * update happens, in PGraphicsJava2D, this will happen immediately.
273- */
274268 @Override
275269 public void updatePixels(int ux, int uy, int uw, int uh) {
276270 int wide = hints[ENABLE_RETINA_PIXELS] ? retina.width : width;
@@ -636,10 +630,5 @@ public boolean save(String filename) {
636630 return super.save(filename);
637631 }
638632 }
639-
640-
641- @ Override
642- public boolean is2X () {
643- return true ;
644- }
633+ */
645634}
0 commit comments