src/share/classes/sun/java2d/SunGraphics2D.java
Print this page
@@ -155,11 +155,11 @@
public DrawImagePipe imagepipe;
public ShapeDrawPipe shapepipe;
public TextPipe textpipe;
public MaskFill alphafill;
- public RenderLoops loops;
+ private RenderLoops loops;
public CompositeType imageComp; /* Image Transparency checked on fly */
public int paintState;
public int compositeState;
@@ -254,11 +254,10 @@
font = f;
if (font == null) {
font = defaultFont;
}
- loops = sd.getRenderLoops(this);
setDevClip(sd.getBounds());
invalidatePipe();
}
protected Object clone() {
@@ -3303,6 +3302,28 @@
*/
@Override
public Surface getDestSurface() {
return surfaceData;
}
+
+ /**
+ * Return the {@code RenderLoops} associated to this Graphics object.
+ *
+ * @return the loops
+ */
+ public RenderLoops getLoops() {
+
+ if (loops == null) {
+ loops = surfaceData.getRenderLoops(this);
+ }
+ return loops;
+ }
+
+ /**
+ * Sets new {@code RenderLoops} for this object.
+ *
+ * @param loops the loops to set
+ */
+ public void setLoops(RenderLoops loops) {
+ this.loops = loops;
+ }
}