protected void init(Graphics graphics) { NetGraphicsState state = new NetGraphicsState(); state.saveGraphics(this); g = graphics; state.restoreGraphics(this); }
public override java.awt.Graphics create() { checkState(); myState = new NetGraphicsState(); myState.saveGraphics(this); PrintGraphics newGraphics = (PrintGraphics)MemberwiseClone(); newGraphics.myState = null; newGraphics.isBase = false; newGraphics.baseContext = baseContext; baseContext.Current = newGraphics; // since it is very likely that the next op will be on that graphics // this is similar to init myState.restoreGraphics(newGraphics); return newGraphics; }