Examples of GraphicsConfiguration


Examples of ae.java.awt.GraphicsConfiguration

        public boolean isAccelerated() {
            // Note that when img.getAccelerationPriority() gets set to 0
            // we remove SurfaceDataProxy objects from the cache and the
            // answer will be false.
            GraphicsConfiguration tmpGc = gc;
            if (tmpGc == null) {
                tmpGc = GraphicsEnvironment.getLocalGraphicsEnvironment().
                    getDefaultScreenDevice().getDefaultConfiguration();
            }
            if (tmpGc instanceof ProxiedGraphicsConfig) {
View Full Code Here

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

    @Override
    public FontRenderContext getFontRenderContext() {
        AffineTransform at;
        if (frc == null){
            GraphicsConfiguration gc = getDeviceConfiguration();
            if (gc != null){
                at = gc.getDefaultTransform();
                at.concatenate(gc.getNormalizingTransform());
            }
            else
                at = null;

            boolean isAa = (hints.get(RenderingHints.KEY_TEXT_ANTIALIASING) ==
View Full Code Here

Examples of com.jgraph.gaeawt.java.awt.GraphicsConfiguration

  public FontRenderContext getFontRenderContext()
  {
    AffineTransform at;
    if (frc == null)
    {
      GraphicsConfiguration gc = getDeviceConfiguration();
      if (gc != null)
      {
        at = gc.getDefaultTransform();
        at.concatenate(gc.getNormalizingTransform());
      }
      else
        at = null;

      boolean isAa = (hints.get(RenderingHints.KEY_TEXT_ANTIALIASING) == RenderingHints.VALUE_TEXT_ANTIALIAS_ON);
View Full Code Here

Examples of java.awt.GraphicsConfiguration

          .getLocalGraphicsEnvironment();
      // dual head, use first screen
      if (ge.getScreenDevices().length > 1) {
        try {
          GraphicsDevice gd = ge.getDefaultScreenDevice();
          GraphicsConfiguration config = gd.getConfigurations()[0];
          frameD = config.getBounds().getSize();
          framePos = config.getBounds().getLocation();
        } catch (RuntimeException e) {
          frameD = Toolkit.getDefaultToolkit().getScreenSize();
          framePos = new Point(0, 0);
        }
      }
View Full Code Here

Examples of java.awt.GraphicsConfiguration

     *
     * @param bounds
     * @return BufferedImage
     */
    private BufferedImage getImage(Rectangle bounds) {
      GraphicsConfiguration gc = getGraphicsConfiguration();
      BufferedImage textImage = gc.createCompatibleImage(bounds.width, bounds.height, Transparency.TRANSLUCENT);
      return textImage;
    }
View Full Code Here

Examples of java.awt.GraphicsConfiguration

   * only if the given component is on the same screen as the cursor. Return
   * null otherwise.
   */
  private static Point getPointerLocation(final Component component) {
    try {
      final GraphicsConfiguration config = component.getGraphicsConfiguration();
      if (config != null) {
        PointerInfo pointer_info = AccessController.doPrivileged(new PrivilegedExceptionAction<PointerInfo>() {
          public PointerInfo run() throws Exception {
            return MouseInfo.getPointerInfo();
          }
        });
        GraphicsDevice device = pointer_info.getDevice();
        if (device == config.getDevice()) {
          return pointer_info.getLocation();
        }
        return null;
      }
    } catch (Exception e) {
View Full Code Here

Examples of java.awt.GraphicsConfiguration

  }
   
    public static int getPreferedBufferedImageType(){
    GraphicsDevice[] graphicsDevices = GraphicsEnvironment.getLocalGraphicsEnvironment().getScreenDevices();
    GraphicsDevice graphicsDevice = graphicsDevices[0];
    GraphicsConfiguration graphicsConfiguration = graphicsDevice.getConfigurations()[0];
    return graphicsConfiguration.createCompatibleImage(1, 1).getType();
  }
View Full Code Here

Examples of java.awt.GraphicsConfiguration

    }
   
    private void renderVolatileImage(BufferedImage bufferedImage) {
        do {
            int w = bufferedImage.getWidth(), h = bufferedImage.getHeight();
            GraphicsConfiguration gc = getGraphicsConfiguration();
            if (volatileImage == null || volatileImage.getWidth() != w
                    || volatileImage.getHeight() != h
                    || volatileImage.validate(gc) == VolatileImage.IMAGE_INCOMPATIBLE) {
                if (volatileImage != null) {
                    volatileImage.flush();
                }
                volatileImage = gc.createCompatibleVolatileImage(w, h);
                volatileImage.setAccelerationPriority(1.0f);
            }
            //
            // Now paint the BufferedImage into the accelerated image
            //
View Full Code Here

Examples of java.awt.GraphicsConfiguration

            if (alpha < 1.0f) {
                g2d.setComposite(AlphaComposite.getInstance(AlphaComposite.SRC_OVER, alpha));
            }

            if (currentImage != null) {
                GraphicsConfiguration gc = getGraphicsConfiguration();
                // If the GraphicsConfig changed, then change the hints being used
                if (gc.getClass() != graphicsConfigClass) {
                    graphicsConfigClass = gc.getClass();
                    updateRenderingHints(graphicsConfigClass);
                }
                if (!renderingHints.isEmpty()) {
                    g2d.setRenderingHints(renderingHints);
                }
View Full Code Here

Examples of java.awt.GraphicsConfiguration

                boolean hasAlpha)
        {
            GraphicsEnvironment ge = GraphicsEnvironment
                    .getLocalGraphicsEnvironment();
            GraphicsDevice gd = ge.getDefaultScreenDevice();
            GraphicsConfiguration gc = gd.getDefaultConfiguration();
            return gc.createCompatibleImage(width, height,
                    Transparency.TRANSLUCENT);
        }
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.