/** * Sets the current clip to the rectangle specified by the given * coordinates. This method sets the user clip, which is * independent of the clipping associated with device bounds * and window visibility. * Rendering operations have no effect outside of the clipping area. * @param x the <i>x</i> coordinate of the new clip rectangle. * @param y the <i>y</i> coordinate of the new clip rectangle. * @param width the width of the new clip rectangle. * @param height the height of the new clip rectangle. * @see java.awt.Graphics#clipRect * @see java.awt.Graphics#setClip(Shape) * @since JDK1.1 */ public void setClip(int x, int y, int width, int height){ setClip(new Rectangle(x, y, width, height)); }
/** * Sets the current clip to the rectangle specified by the given * coordinates. This method sets the user clip, which is * independent of the clipping associated with device bounds * and window visibility. * Rendering operations have no effect outside of the clipping area. * @param x the <i>x</i> coordinate of the new clip rectangle. * @param y the <i>y</i> coordinate of the new clip rectangle. * @param width the width of the new clip rectangle. * @param height the height of the new clip rectangle. * @see java.awt.Graphics#clipRect * @see java.awt.Graphics#setClip(Shape) * @since JDK1.1 */ public void setClip(int x, int y, int width, int height){ setClip(new Rectangle(x, y, width, height)); }