Examples of Scaling


Examples of ch.sahits.game.image.Scaling

   */
  private void resetDialog() {
    Dimension targetDim = new Dimension(getBounds().width*2/3, 600);
    BufferedImage tmpImg = loader.getImage(imageNames[0]); // fringe
    ImageScaleState state = new ImageScaleState(new Dimension(tmpImg.getWidth(), tmpImg.getHeight()), targetDim);
    Scaling scaling = imageUtils.computeScaleFactor(targetDim, new Dimension(tmpImg.getWidth(), tmpImg.getHeight()), EScaling.DOWN);
    state.setScaleFactor(scaling.getScaleFactor());
    BufferedImage frame = imageUtils.scale(tmpImg, state);
    loader.replaceSingleImage(imageNames[0], frame);
   
    tmpImg = loader.getImage(imageNames[1]); // wax seal
    loader.replaceSingleImage(imageNames[1], imageUtils.scale(tmpImg, state));
View Full Code Here

Examples of ch.sahits.game.image.Scaling

   * @param targetDim
   */
  private void replaceImage(String imgName, Dimension targetDim){
    BufferedImage tmpImg = loader.getImage(imgName); // coin
    ImageScaleState state = new ImageScaleState(new Dimension(tmpImg.getWidth(), tmpImg.getHeight()), targetDim);
    Scaling scaling = imageUtils.computeScaleFactor(targetDim, new Dimension(tmpImg.getWidth(), tmpImg.getHeight()), EScaling.DOWN);
    state.setScaleFactor(scaling.getScaleFactor());
    tmpImg = imageUtils.scale(tmpImg, state);
    loader.replaceSingleImage(imgName, tmpImg);
  }
View Full Code Here

Examples of com.opengamma.engine.calcnode.msg.Scaling

        statistics.recordInvocation(function.getCount(), function.getInvocation(), function.getDataInput(), function.getDataOutput());
        remoteInvocationCost += function.getInvocation() / function.getCount();
      }
    }
    if (remoteInvocationCost > 0) {
      return new Scaling(localInvocationCost / remoteInvocationCost);
    } else {
      return null;
    }
  }
View Full Code Here

Examples of com.sencha.gxt.chart.client.draw.Scaling

   * Sets the {@link Scaling} using the given scale value.
   *
   * @param scale the scale value
   */
  public void setScaling(double scale) {
    setScaling(new Scaling(scale, scale));
  }
View Full Code Here

Examples of com.sencha.gxt.chart.client.draw.Scaling

   * @param y the scale on the y axis
   * @param centerX x-coordinate of the origin
   * @param centerY y-coordinate of the origin
   */
  public void setScaling(double x, double y, double centerX, double centerY) {
    setScaling(new Scaling(x, y, centerX, centerY));
  }
View Full Code Here

Examples of com.sencha.gxt.chart.client.draw.Scaling

    }
    if (sprite.rotation != null) {
      setRotation(new Rotation(sprite.rotation));
    }
    if (sprite.scaling != null) {
      setScaling(new Scaling(sprite.scaling));
    }
    setClipRectangle(sprite.clipRectangle);
    setZIndex(sprite.zIndex);
    setHidden(sprite.hidden);
  }
View Full Code Here

Examples of com.sencha.gxt.chart.client.draw.Scaling

public class ScatterHighlighter implements SeriesHighlighter {

  @Override
  public void highlight(Sprite sprite) {
    if (sprite.getComponent().isAnimated()) {
      DrawFx.createScalingAnimator(sprite, new Scaling(1.2, 1.2, 0, 0)).run(250);
    } else {
      sprite.setScaling(new Scaling(1.2, 1.2, 0, 0));
      sprite.redraw();
    }
  }
View Full Code Here

Examples of com.sencha.gxt.chart.client.draw.Scaling

  }

  @Override
  public void unHighlight(Sprite sprite) {
    if (sprite.getComponent().isAnimated()) {
      DrawFx.createScalingAnimator(sprite, new Scaling(1, 1, 0, 0)).run(250);
    } else {
      sprite.setScaling(new Scaling(1, 1, 0, 0));
      sprite.redraw();
    }
  }
View Full Code Here

Examples of com.sencha.gxt.chart.client.draw.Scaling

        y -= (this.height - height * relativeWidth) / 2.0 / relativeWidth;
      }

      double size = 1.0 / Math.max(width / this.width, height / this.height);
      // Scale and translate group
      viewBoxShift = new Scaling(size, size, -x, -y);
      for (Sprite sprite : sprites) {
        transform(sprite);
      }
    }
  }
View Full Code Here

Examples of com.sencha.gxt.chart.client.draw.Scaling

    double deltaDegrees = 0;
    double deltaScaleX = 1;
    double deltaScaleY = 1;
    Matrix matrix = new Matrix();
    Rotation rotation = sprite.getRotation();
    Scaling scaling = sprite.getScaling();
    Translation translation = sprite.getTranslation();
    XElement element = getElement(sprite);
    Style style = element.getStyle();
    Element skew = element.getPropertyJSO("skew").cast();

    if (rotation != null) {
      matrix.rotate(rotation.getDegrees(), rotation.getX(), rotation.getY());
      deltaDegrees += rotation.getDegrees();
    }
    if (scaling != null) {
      matrix.scale(scaling.getX(), scaling.getY(), scaling.getCenterX(), scaling.getCenterY());
      deltaScaleX *= scaling.getX();
      deltaScaleY *= scaling.getY();
    }
    if (translation != null) {
      matrix.translate(translation.getX(), translation.getY());
    }
    if (viewBoxShift != null) {
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.