Package java.awt

Examples of java.awt.Graphics2D.clip()


                    lineTo(ex1, clipy);
                    lineTo(ex2, innery);
                    lineTo(sx2, innery);
                    closePath();
                    //clip();
                    g.clip(currentPath);
                    currentPath = null;
                    Rectangle2D.Float lineRect = new Rectangle2D.Float(
                            sx1a, outery, ex1a - sx1a, innery - outery);
                    Java2DRenderer.drawBorderLine(lineRect, true, true,
                            bpsBefore.style, bpsBefore.color, g);
View Full Code Here


    final Graphics2D g2 = (Graphics2D) image.getGraphics();

    g2.scale(scale, scale);
    final Rectangle2D.Double drawBounds =
        new Rectangle2D.Double(0, 0, imageWidthPt, imageHeightPt);
    g2.clip(drawBounds);
    drawable.draw(g2, drawBounds);
    g2.dispose();
    return image;
  }
View Full Code Here

                    lineTo(ex1, clipy);
                    lineTo(ex2, innery);
                    lineTo(sx2, innery);
                    closePath();
                    //clip();
                    g.clip(currentPath);
                    currentPath = null;
                    Rectangle2D.Float lineRect = new Rectangle2D.Float(
                            sx1a, outery, ex1a - sx1a, innery - outery);
                    Java2DRenderer.drawBorderLine(lineRect, true, true,
                            bpsBefore.style, bpsBefore.color, g);
View Full Code Here

                Graphics2D g = Sprite.wrapRendering(pg);
                Shape clip = g.getClip();
                Rectangle bounds = getBounds();
                updateSubJPB();
                g.translate(-bounds.x, -bounds.y);
                g.clip(bounds);
                if (isOpaque()) {
                        Color c = g.getColor();
                        g.setColor(getBackground());
                        g.fillRoundRect(bounds.x, bounds.y, bounds.width, bounds.height, arc, arc);
                        g.setColor(c);
View Full Code Here

                if (mask == null) {
                        mask = /*!Sprite._isTrueVolatile() ? */ new Sprite(SpriteIO.createBufferedImage(getSize(), Sprite.DEFAULT_TYPE), "image/x-png", getSize())/* : new Sprite(Sprite.createVolatileImage(getSize()), "image/x-png", getSize())*/;
                }
                bounds.grow(6 - (int) ((float) bounds.width / 2f), 6 - (int) ((float) bounds.height / 2f));
                g.translate(-compBounds.x, -compBounds.y);
                g.clip(compBounds);
                Color ledColor = Color.WHITE;
                if ((state & ON_STATE) != 0) {
                        g.setColor(ledColor = type == READ ? Color.GREEN.brighter() : Color.RED.brighter());
                        g.fillOval(bounds.x, bounds.y, bounds.width, bounds.height);
                }
View Full Code Here

                        g.fillOval(bounds.x, bounds.y, bounds.width, bounds.height);
                }
                mask.setBounds(bounds);
                mask.clearImageGraphics();
                Graphics2D gm = Sprite.wrapRendering(Sprite._createImageGraphics(mask.getImage(this)));
                gm.clip(new Ellipse2D.Float(-.5f, -.5f, bounds.width + 1, bounds.height + 1));
                gm.setColor(ledColor);
                gm.fill(gm.getClip());
                Composite cpsm = gm.getComposite();
                gm.setComposite(AlphaComposite.getInstance(AlphaComposite.DST_OUT, .3f));
                gm.fillOval(-(int) ((float) bounds.width / 4f), (int) ((float) bounds.height / 4f), bounds.width, bounds.height);
View Full Code Here

        // constrain the table output to the available space
        tempRect.x = 0;
        tempRect.y = 0;
        tempRect.width = imgWidth;
        tempRect.height = availableSpace;
        g2d.clip(tempRect);
           
        // if we have a scale factor, scale the graphics object to fit
        // the entire width
        if (sf != 1.0D) {
            g2d.scale(sf, sf);
View Full Code Here

        // then translate downwards
        if (columnHeader != null) {
            columnHeaderClip.x = tableClip.x;
            columnHeaderClip.width = tableClip.width;
            g2d.translate(-columnHeaderClip.x, 0);
            g2d.clip(columnHeaderClip);
            columnHeader.print(g2d);
            // restore the original transform and clip
            g2d.setTransform(oldTrans);
            g2d.setClip(oldClip);
            // translate downwards
View Full Code Here

            g2d.translate(0, columnHeaderClip.height);
        }
       
        // print the current section of the table
        g2d.translate(-tableClip.x, -tableClip.y);
        g2d.clip(tableClip);
        table.print(g2d);
        // restore the original transform and clip
        g2d.setTransform(oldTrans);
        g2d.setClip(oldClip);
View Full Code Here

        //
        // Append transform to selected area
        //
        g.transform(curTxf);

        g.clip(curAOI);

        //
        // Delegate rendering to painter
        //
        try{
View Full Code Here

TOP
Copyright © 2018 www.massapi.com. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.