Package com.google.code.appengine.awt

Examples of com.google.code.appengine.awt.Rectangle


            xMax = ttf.readFWord();
            yMax = ttf.readFWord();
        }

        public Rectangle getBBox() {
            return new Rectangle(xMin, yMin, xMax - xMin, yMax - yMin);
        }
View Full Code Here


        String s = getProperty(key);
        if (s == null) return def;
        if (s.equals("null")) return null;

        String[] r = s.split(", ");
        return new Rectangle(
                        Integer.parseInt(r[0]),
                        Integer.parseInt(r[1]),
                        Integer.parseInt(r[2]),
                        Integer.parseInt(r[3])
        );
View Full Code Here

      this.scaleIncrement = scaleMax / DEFAULT_NR_OF_INCREMENTS;
    else
      scaleIncrement = props.getScaleIncrement();

    //todo : adjust chart space in order to correctly render title & legend
    Rectangle chartSpace = new Rectangle( getImageWidth(), getImageHeight() );

    center = new Point2D.Double(
      chartSpace.getWidth() / 2 - chartSpace.getX(),
      chartSpace.getHeight() / 2 - chartSpace.getY() );
    radius = Math.min( chartSpace.getWidth(), chartSpace.getHeight() );
    radius = ( radius - ( radius * 10 ) / 100 ) / 2;
    step = 2 * Math.PI / iRadarChartDataSet.getNumberOfDataItems();

    if( props.getShowGridLines() )
    {
View Full Code Here

    public Rectangle getBounds() {
        if (bounds != null) {
            return bounds;
        }
        if (npoints == 0) {
            return new Rectangle();
        }

        int bx1 = xpoints[0];
        int by1 = ypoints[0];
        int bx2 = bx1;
        int by2 = by1;

        for (int i = 1; i < npoints; i++) {
            int x = xpoints[i];
            int y = ypoints[i];
            if (x < bx1) {
                bx1 = x;
            } else if (x > bx2) {
                bx2 = x;
            }
            if (y < by1) {
                by1 = y;
            } else if (y > by2) {
                by2 = y;
            }
        }

        return bounds = new Rectangle(bx1, by1, bx2 - bx1, by2 - by1);
    }
View Full Code Here

                + ")";
        return str;
    }

    public Rectangle getMaxCharBounds() {
        return new Rectangle(xMin, yMin, xMax - xMin, yMax - yMin);
    }
View Full Code Here

        // do nothing by def
    }

    protected static Rectangle getSourceRegion(final ImageReadParam param,
                    final int srcWidth, final int srcHeight) {
        final Rectangle r = new Rectangle(0, 0, srcWidth, srcHeight);

        if (param != null) {
            final int x;
            final int y;
            final Rectangle sr = param.getSourceRegion();

            if (sr != null) {
                r.setBounds(r.intersection(sr));
            }
View Full Code Here

        destRegion.width = srcRegion.width / xCols;
        destRegion.height = srcRegion.height / yCols;

        if (image != null) {
            destRegion.setBounds(destRegion.intersection(new Rectangle(0, 0,
                            image.getWidth(), image.getHeight())));
        }
    }
View Full Code Here

        this.bounds = bounds;

        // this assumes you use MM_ANISOTROPIC or MM_ISOTROPIC as MapMode
        double pixelWidth = (double) screenMM.width / device.width;
        double pixelHeight = (double) screenMM.height / device.height;
        this.frame = new Rectangle((int) (bounds.x * 100 * pixelWidth),
                (int) (bounds.y * 100 * pixelHeight),
                (int) (bounds.width * 100 * pixelWidth),
                (int) (bounds.height * 100 * pixelHeight));

        this.signature = " EMF";
View Full Code Here

        if ((long) (width * height) > (long) Integer.MAX_VALUE) {
            throw new IllegalArgumentException(
                            "width * height > Integer.MAX_VALUE!"); //$NON-NLS-1$
        }

        final Rectangle dst;
        ImageTypeSpecifier its = null;

        if (param != null) {
            final BufferedImage img = param.getDestination();

            if (img != null) {
                return img;
            }

            its = param.getDestinationType();
        }

        try {
            isValid: if (its != null) {
                while (imageTypes.hasNext()) {
                    if (its.equals((ImageTypeSpecifier) imageTypes.next())) {
                        break isValid;
                    }
                }
                throw new IIOException(Messages.getString("imageio.3", its)); //$NON-NLS-1$
            } else {
                its = imageTypes.next();
            }
        } catch (final ClassCastException ex) {
            throw new IllegalArgumentException(ex);
        }

        dst = new Rectangle(0, 0, 0, 0);
        computeRegions(param, width, height, null, new Rectangle(0, 0, 0, 0),
            dst);
        return its.createBufferedImage(dst.width, dst.height);
    }
View Full Code Here

    public Rectangle readRECTL() throws IOException {
        int x = readLONG();
        int y = readLONG();
        int w = readLONG() - x;
        int h = readLONG() - y;
        return new Rectangle(x, y, w, h);
    }
View Full Code Here

TOP

Related Classes of com.google.code.appengine.awt.Rectangle

Copyright © 2018 www.massapicom. 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.