/** * Sets the paint mode of this graphics context to overwrite the * destination with this graphics context's current color. * This sets the logical pixel operation function to the paint or * overwrite mode. All subsequent rendering operations will * overwrite the destination with the current color. */ public void setPaintMode(){ gc.setComposite(AlphaComposite.SrcOver); }
/** * Gets the current font. * @return this graphics context's current font. * @see java.awt.Font * @see java.awt.Graphics#setFont */ public Font getFont(){ return gc.getFont(); }
/** * Sets the <code>Stroke</code> for the <code>Graphics2D</code> context. * @param s the <code>Stroke</code> object to be used to stroke a * <code>Shape</code> during the rendering process */ public void setStroke(Stroke s){ gc.setStroke(s); }
/** * Creates a new AbstractGraphics2D from an existing instance. * @param g the AbstractGraphics2D whose properties should be copied */ public AbstractGraphics2D(AbstractGraphics2D g) { this.gc = (GraphicContext)g.gc.clone(); this.gc.validateTransformStack(); this.textAsShapes = g.textAsShapes; }
/** * Sets the <code>Transform</code> in the <code>Graphics2D</code> * context. * @param Tx the <code>AffineTransform</code> object to be used in the * rendering process * @see #transform * @see AffineTransform */ public void setTransform(AffineTransform Tx){ gc.setTransform(Tx); }
/** * Returns a copy of the current <code>Transform</code> in the * <code>Graphics2D</code> context. * @return the current <code>AffineTransform</code> in the * <code>Graphics2D</code> context. * @see #transform * @see #setTransform */ public AffineTransform getTransform(){ return gc.getTransform(); }
/** * Returns the current <code>Stroke</code> in the * <code>Graphics2D</code> context. * @return the current <code>Graphics2D</code> <code>Stroke</code>, * which defines the line style. * @see #setStroke */ public Stroke getStroke(){ return gc.getStroke(); }
/** * Sets this graphics context's font to the specified font. * All subsequent text operations using this graphics context * use this font. * @param font the font. * @see java.awt.Graphics#getFont */ public void setFont(Font font){ gc.setFont(font); }
/** * @return true iff this transform is the identity transform */ public boolean isIdentity() { return isIdentity(transformParameters); }
/** * Returns the current <code>Composite</code> in the * <code>Graphics2D</code> context. * @return the current <code>Graphics2D</code> <code>Composite</code>, * which defines a compositing style. * @see #setComposite */ public Composite getComposite(){ return gc.getComposite(); }
/** * Returns the current <code>Paint</code> of the * <code>Graphics2D</code> context. * @return the current <code>Graphics2D</code> <code>Paint</code>, * which defines a color or pattern. * @see #setPaint * @see java.awt.Graphics#setColor */ public Paint getPaint(){ return gc.getPaint(); }
/** * Sets this graphics context's current color to the specified * color. All subsequent graphics operations using this graphics * context use this specified color. * @param c the new rendering color. * @see java.awt.Color * @see java.awt.Graphics#getColor */ public void setColor(Color c){ gc.setColor(c); }
/** * Gets this graphics context's current color. * @return this graphics context's current color. * @see java.awt.Color * @see java.awt.Graphics#setColor */ public Color getColor(){ return gc.getColor(); }
/** * Returns the background color used for clearing a region. * @return the current <code>Graphics2D</code> <code>Color</code>, * which defines the background color. * @see #setBackground */ public Color getBackground(){ return gc.getBackground(); }
/** * Sets the paint mode of this graphics context to overwrite the * destination with this graphics context's current color. * This sets the logical pixel operation function to the paint or * overwrite mode. All subsequent rendering operations will * overwrite the destination with the current color. */ public void setPaintMode(){ gc.setComposite(AlphaComposite.SrcOver); }
/** * Gets the current font. * @return this graphics context's current font. * @see java.awt.Font * @see java.awt.Graphics#setFont */ public Font getFont(){ return gc.getFont(); }
/** * Sets the <code>Transform</code> in the <code>Graphics2D</code> * context. * @param Tx the <code>AffineTransform</code> object to be used in the * rendering process * @see #transform * @see AffineTransform */ public void setTransform(AffineTransform Tx){ gc.setTransform(Tx); }
/** * Sets the paint mode of this graphics context to overwrite the * destination with this graphics context's current color. * This sets the logical pixel operation function to the paint or * overwrite mode. All subsequent rendering operations will * overwrite the destination with the current color. */ public void setPaintMode(){ gc.setComposite(AlphaComposite.SrcOver); }
/** * Gets the current font. * @return this graphics context's current font. * @see java.awt.Font * @see java.awt.Graphics#setFont */ public Font getFont(){ return gc.getFont(); }
/** * Sets the <code>Transform</code> in the <code>Graphics2D</code> * context. * @param Tx the <code>AffineTransform</code> object to be used in the * rendering process * @see #transform * @see AffineTransform */ public void setTransform(AffineTransform Tx){ gc.setTransform(Tx); }