Package com.google.code.appengine.awt

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


    public void setSize(double width, double height) {
        setSize((int)Math.ceil(width), (int)Math.ceil(height));
    }

    public Dimension getSize() {
        return new Dimension(width, height);
    }
View Full Code Here


    IcnsContents contents = readImage(byteSource);
    ArrayList images = IcnsDecoder.decodeAllImages(contents.icnsElements);
    if (images.isEmpty())
      throw new ImageReadException("No icons in ICNS file");
    BufferedImage image0 = (BufferedImage) images.get(0);
    return new Dimension(image0.getWidth(), image0.getHeight());
  }
View Full Code Here

        FileInfo info = readHeader(byteSource);

        if (info == null)
            throw new ImageReadException("PNM: Couldn't read Header");

        return new Dimension(info.width, info.height);
    }
View Full Code Here

        if (segments.size() > 1)
            throw new ImageReadException("Redundant JFIF Data Found.");

        SOFNSegment fSOFNSegment = (SOFNSegment) segments.get(0);

        return new Dimension(fSOFNSegment.width, fSOFNSegment.height);
    }
View Full Code Here

        TiffDirectory directory = (TiffDirectory) contents.directories.get(0);

        int width = directory.findField(TIFF_TAG_IMAGE_WIDTH).getIntValue();
        int height = directory.findField(TIFF_TAG_IMAGE_LENGTH).getIntValue();

        return new Dimension(width, height);
    }
View Full Code Here

        if (chunks.size() > 1)
            throw new ImageReadException("PNG contains more than one Header");

        PNGChunkIHDR pngChunkIHDR = (PNGChunkIHDR) chunks.get(0);

        return new Dimension(pngChunkIHDR.width, pngChunkIHDR.height);
    }
View Full Code Here

public class EMFGraphics2DTest {

  @Test
  public void test() throws IOException {
    EMFGraphics2D g2d = new EMFGraphics2D(new File("target/test.emf"), new Dimension(500, 500));
    g2d.startExport();
    g2d.setColor(Color.BLUE);
    g2d.drawOval(0, 0, 500, 500);
    g2d.endExport();
  }
View Full Code Here

        sizes.put(SXGA_PLUS, new Dimension(1400, 1050));
        sizes.put(UXGA, new Dimension(1600, 1200));
    }

    public static Dimension getSize(String size) {
        Dimension d = (Dimension) sizes.get(size);
        return d != null ? d : UNDEFINED;
    }
View Full Code Here

     * Gets the dimension of this table
     *
     * @return  dimension
     */
    public Dimension getDimension() {
        return new Dimension(columns, size());
    }
View Full Code Here

    public boolean isEmpty() {
        return width <= 0 || height <= 0;
    }

    public Dimension getSize() {
        return new Dimension(width, height);
    }
View Full Code Here

TOP

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

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.