Examples of scale()


Examples of org.apache.hadoop.hive.serde2.typeinfo.DecimalTypeInfo.scale()

        }
        return Boolean.parseBoolean( pigObj.toString() );
      case DECIMAL:
        BigDecimal bd = (BigDecimal)pigObj;
        DecimalTypeInfo dti = (DecimalTypeInfo)hcatFS.getTypeInfo();
        if(bd.precision() > dti.precision() || bd.scale() > dti.scale()) {
          handleOutOfRangeValue(pigObj, hcatFS);
          return null;
        }
        return HiveDecimal.create(bd);
      case CHAR:
View Full Code Here

Examples of org.apache.harmony.awt.gl.font.LineMetricsImpl.scale()

    public LineMetrics getLineMetrics(String str, FontRenderContext frc, AffineTransform at) {
        LineMetricsImpl lm = getDefaultLineMetrics();
        lm.setNumChars(str.length());

        if ((at != null) && (!at.isIdentity())){
            lm.scale((float)at.getScaleX(), (float)at.getScaleY());
        }

        return lm;
    }
View Full Code Here

Examples of org.eclipse.birt.chart.model.attribute.Bounds.scale()

      IDeviceRenderer deviceRenderer = null;
      try {
        deviceRenderer = PluginSettings.instance().getDevice("dv.SWT"); //$NON-NLS-1$
        deviceRenderer.setProperty(IDeviceRenderer.GRAPHICS_CONTEXT, gc);
        bo.scale(72d / deviceRenderer.getDisplayServer().getDpiResolution()); // CONVERT
        // TO
        // POINTS

        // GENERATE AND RENDER THE CHART
        final Generator gr = Generator.instance();
View Full Code Here

Examples of org.eclipse.draw2d.geometry.Dimension.scale()

    textLocation = new org.eclipse.draw2d.geometry.Point();
    Dimension offset = getSize().getDifference(getTextSize());
    offset.width += getTextSize().width - getSubStringTextSize().width;
    switch (getLabelAlignment()) {
    case CENTER:
      offset.scale(0.5f);
      break;
    case LEFT:
      offset.scale(0.0f);
      break;
    case RIGHT:
View Full Code Here

Examples of org.eclipse.draw2d.geometry.Point.scale()

    double middley = zoomedBounds.y + (zoomedBounds.height / 2);

    PointList ret = new PointList();
    for (int i = 0; i < points.size(); i++) {
      Point point = points.getPoint(i);
      point.scale(zoom);

      // translate all points towards the middle depending on the
      // line-width, so that the polyline remains inside the bounds
      // Note, that the delta has to be rounded up/down depending on the
      // relative location from point to middle.
View Full Code Here

Examples of org.eclipse.draw2d.geometry.Rectangle.scale()

    double zoom = getZoomLevel();
    int lw = shrinkLines * ((int) (getDeclaration().getPadLineWidth() * zoom));

    Rectangle target = new Rectangle(source.x, source.y, source.width, source.height);
    target.scale(zoom);
    // shrink, but take care not to end up with a negative width or height
    int widthShrink = Math.min(target.width / 2, lw);
    int heightShrink = Math.min(target.height / 2, lw);
    target.shrink(widthShrink, heightShrink);
    return target;
View Full Code Here

Examples of org.eclipse.swt.graphics.Transform.scale()

  public void scale(double scaleX, double scaleY) {
    Transform transform = new Transform(gc.getDevice());
    Transform transform2 = new Transform(gc.getDevice());
    gc.getTransform(transform);
    transform2.scale((float) scaleX, (float) scaleY);
    transform.multiply(transform2);
    gc.setTransform(transform);
  }

  public void bezierVertex(double cx1, double cy1, double cx2, double cy2,
View Full Code Here

Examples of org.ejml.simple.SimpleMatrix.scale()

  SimpleMatrix randomTransformMatrix() {
    SimpleMatrix binary = new SimpleMatrix(numHid, numHid * 2 + 1);
    // bias column values are initialized zero
    binary.insertIntoThis(0, 0, randomTransformBlock());
    binary.insertIntoThis(0, numHid, randomTransformBlock());
    return binary.scale(op.trainOptions.scalingForInit);
  }

  SimpleMatrix randomTransformBlock() {
    double range = 1.0 / (Math.sqrt((double) numHid) * 2.0);
    return SimpleMatrix.random(numHid,numHid,-range,range,rand).plus(identity);
View Full Code Here

Examples of org.geomajas.gwt.client.map.MapView.scale()

    MapView mapView = mapWidget.getMapModel().getMapView();
    WorldViewTransformer transformer = mapView.getWorldViewTransformer();
    Coordinate viewPosition = getScreenPosition(event);
    Coordinate worldPosition = transformer.viewToWorld(viewPosition);
    mapView.setCenterPosition(worldPosition);
    mapView.scale(zoomFactor, MapView.ZoomOption.LEVEL_CHANGE);
  }

  /**
   * Set zoom factor. Should be a positive number, &gt;1 for zooming in, &lt;1 for zooming out.
   *
 
View Full Code Here

Examples of org.geotools.geometry.iso.coordinate.DirectPositionImpl.scale()

      this.totalLength += segmentLen;
     
      DirectPositionImpl tempMid = dpAct.clone();
      tempMid.add( directPositionNext);
      tempMid.divideBy(2);
      tempMid.scale(segmentLen);
      this.centSum.add(tempMid);
     
      dpAct = directPositionNext;
    }
  }
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.