Examples of scale()


Examples of net.rim.device.api.math.Vector3f.scale()

                final Vector3f max = new Vector3f();
                tileBounds.getMin(min);
                tileBounds.getMax(max);
                final Vector3f blockCenter = new Vector3f(min);
                blockCenter.add(max);
                blockCenter.scale(0.5f);

                // Get character scale
                final Vector3f s = new Vector3f();
                _character._transform.getScale(s);
View Full Code Here

Examples of net.sf.fysix.math.Vector2d.scale()

  public Vector2d getGravity(Vector2d pos) {
    Vector2d dist = new Vector2d(centerPoint.getX(), centerPoint.getY());
    dist.sub(pos);
    if (dist.length() > 0 && dist.length() < 250) {
      dist.scale(100.0/dist.length());
      return dist;
    } else {
      return new Vector2d(0, 0);
    }   
  }
View Full Code Here

Examples of net.sf.jsignpdf.types.RelRect.scale()

      final BufferedImage buffImg = p2i.getImageForPage(pageNr.intValue());
      if (buffImg != null) {
        final RelRect tmpRect = selectionImage.getRelRect();
        previewListenerDisabled = true;
        try {
          tmpRect.scale(getInt(pdfPageSize.getX()), getInt(pdfPageSize.getY()));
          tmpRect.setStartPoint(new FloatPoint(Float.parseFloat(tfPosLLX.getText()) / pdfPageSize.getX(), 1f
              - Float.parseFloat(tfPosLLY.getText()) / pdfPageSize.getY()));
          tmpRect.setEndPoint(new FloatPoint(Float.parseFloat(tfPosURX.getText()) / pdfPageSize.getX(), 1f
              - Float.parseFloat(tfPosURY.getText()) / pdfPageSize.getY()));
        } catch (Exception e) {
View Full Code Here

Examples of net.sf.latexdraw.parsers.svg.SVGMatrix.scale()

  @Test
  public void testScale() {
    SVGMatrix m = new SVGMatrix();
    double s = 5.877423;

    m.scale(s);
    assertEquals(m.getA(), s, 0.0001);
    assertEquals(m.getB(), 0., 0.0001);
    assertEquals(m.getC(), 0., 0.0001);
    assertEquals(m.getD(), s, 0.0001);
    assertEquals(m.getE(), 0., 0.0001);
View Full Code Here

Examples of nu3a.math.N3Matrix4D.scale()

  public void update() {
    if (needScale || needRotation || needTranslation) {
      lastMatrix.setData(matrix);
      if (needScale) {
        N3Matrix4D scaleMatrix = new N3Matrix4D();
        scaleMatrix.scale(scale);
        matrix.mult(scaleMatrix);
        needScale = false;
      }
      if (needRotation) {
        N3Matrix4D rotationMatrix = new N3Matrix4D();
View Full Code Here

Examples of org.apache.batik.ext.awt.g2d.GraphicContext.scale()

    public void testSVGTransform() throws Exception {
        GraphicContext gc = new GraphicContext();
        gc.translate(20, 20);
        gc.rotate(Math.PI/4);
        gc.shear(.5, .5);
        gc.scale(20, 20);

        AffineTransform txf = new AffineTransform();
        txf.translate(60, 60);
        gc.transform(txf);
View Full Code Here

Examples of org.apache.batik.svggen.SVGGraphics2D.scale()

            graphics2D.setClip(0, 0, width + 10, height + 10);

            if(getScale() != 100.0)
            {
                graphics2D.scale(getScale() / 100.0, getScale() / 100.0);
            }

            controller.getGraphView().draw(graphics2D, false, false, false, true);

            try
View Full Code Here

Examples of org.apache.flex.compiler.internal.fxg.types.FXGMatrix.scale()

           
            List<ShapeRecord> clipRectRecords = ShapeHelper.rectangle(0.0, 0.0, defImage.getWidth(), defImage.getHeight());
            DefineShapeTag clipShape = createDefineShapeTag(null, clipRectRecords, new SolidColorFillNode(), null, context.getTransform());
            FXGMatrix bitmapMatrix = TypeHelper.bitmapFillMatrix(fillNode, defImage, edgeBounds);
            FXGMatrix clipMatrix = new FXGMatrix(bitmapMatrix.a, bitmapMatrix.b, bitmapMatrix.c, bitmapMatrix.d, 0, 0);
            clipMatrix.scale(1.0/ISWFConstants.TWIPS_PER_PIXEL, 1.0/ISWFConstants.TWIPS_PER_PIXEL);
            clipMatrix.translate(bitmapMatrix.tx, bitmapMatrix.ty);
            GraphicContext clipContext = new GraphicContext();
            clipContext.setTransform(clipMatrix);
            PlaceObject3Tag(clipShape, clipContext);
            spriteStack.pop();
View Full Code Here

Examples of org.apache.fop.svg.PDFGraphics2D.scale()

        if (!resolutionScaling.isIdentity()) {
            generator.comment("resolution scaling for " + uaResolution
                        + " -> " + deviceResolution + "\n");
            generator.add(
                    CTMHelper.toPDFString(resolutionScaling, false) + " cm\n");
            graphics.scale(1 / s, 1 / s);
        }

        generator.comment("SVG start");

        //Save state and update coordinate system for the SVG image
View Full Code Here

Examples of org.apache.hadoop.hive.common.type.HiveDecimal.scale()

      if (obj != null) {
        HiveDecimal decimal = ((HiveDecimalObjectInspector) inspector).
            getPrimitiveJavaObject(obj);
        SerializationUtils.writeBigInteger(valueStream,
            decimal.unscaledValue());
        scaleStream.write(decimal.scale());
        indexStatistics.updateDecimal(decimal);
      }
    }

    @Override
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.