@Signature public void clipRect(double x, double y, double width, double height) { gc.clip(new Rectangle2D.Double(x, y, width, height)); }
@Signature public void clipEllipse(double x, double y, double width, double height) { gc.clip(new Ellipse2D.Double(x, y, width, height)); }
if (isClipped) graphics.clip(anchor.getBounds2D()); graphics.drawRenderedImage(img, at); graphics.setClip(clipOld);
/** * Starts rendering of the specified composite. Does nothing except if * <tt>composite</tt> has a {@link ClippingShape}. In this case the Clip * of the <tt>Graphics2D</tt> context becomes the clipping rectangle * determined by the bounding box of the <tt>ClippingShape</tt>. */ public void startRendering(GraphicalComposite composite) { ClippingShape shape = composite.getClippingShape(); if (shape != null) { ClippingRectangle rect = shape.getBoundingBox(); _graphics.clip(new Rectangle2D.Double(rect.getMinX(), rect.getMinY(), rect.getMaxX() - rect.getMinX(), rect .getMaxY() - rect.getMinY())); } }
public void clip(Shape s) { delegate.clip(s); }
public void draw(Graphics2D g) { if (background != null) { g.setColor(background.getAwtColor()); g.fill(getBounds().getRectangle2D()); } g.clip(getBounds().getRectangle2D()); for (Grob grob : items) { grob.draw(g); } }
@Override public void clip(Shape s) { myPeer.clip(s); }
/** * add the path to the current clip. The new clip will be the intersection * of the old clip and given path. */ public void clip(GeneralPath s) { g.clip(s); }
/** * add the path to the current clip. The new clip will be the intersection * of the old clip and given path. */ public void clip(GeneralPath s) { g.clip(s); }
/** * set the clip to be the given shape. The current clip is not taken * into account. */ private void setClip(Shape s) { state.cliprgn = s; g.setClip(null); g.clip(s); }
/** * set the clip to be the given shape. The current clip is not taken * into account. */ private void setClip(Shape s) { state.cliprgn = s; g.setClip(null); g.clip(s); }
public void clip(Shape s) { System.out.println( "clip(Shape):" ); System.out.println( " s = " + s ); g2D.clip( s ); }
public void clip(Shape s) { System.out.println( "clip(Shape):" ); System.out.println( " s = " + s ); g2D.clip( s ); }
public static Graphics2D createGraphics(BufferedImage bi) { Graphics2D g2d = bi.createGraphics(); g2d.setRenderingHint(RenderingHintsKeyExt.KEY_BUFFERED_IMAGE, new WeakReference(bi)); g2d.clip(new Rectangle(0, 0, bi.getWidth(), bi.getHeight())); return g2d; }
public void paint (Graphics g) { Graphics2D gr = (Graphics2D) g; Shape previousClip = gr.getClip (); gr.clip (new RoundRectangle2D.Float (0, 0, getWidth (), getHeight (), 8, 8)); super.paint (g); gr.setClip (previousClip); }
public void clip( final StrictBounds bounds ) { final Graphics2D g = getGraphics(); graphicsContexts.push( g ); graphics = (Graphics2D) g.create(); graphics.clip( StrictGeomUtility.createAWTRectangle( bounds ) ); }