Examples of scale()


Examples of org.mt4j.components.visibleComponents.shapes.MTRectangle.scale()

        assertTrue(rect1.getWidthXY(TransformSpace.RELATIVE_TO_PARENT) - width3 <= epsilon);
        assertTrue(rect1.getHeightXY(TransformSpace.RELATIVE_TO_PARENT) - height3 <= epsilon);
       
       
        float width4 = width3*2;
        rect1.scale(2, 2, 1, new Vector3D(0,0,0));
        assertTrue(rect1.getWidthXY(TransformSpace.RELATIVE_TO_PARENT) - width4 <= epsilon);
       
        float width5 = width4*2;
        parent.scale(2, 2, 1, new Vector3D(0,0,0));
        assertTrue(rect1.getWidthXY(TransformSpace.GLOBAL) - width5 <= epsilon);
View Full Code Here

Examples of org.mt4j.components.visibleComponents.widgets.MTImage.scale()

                          for (int i = 0; i < fotos.length; i++) {
                            MTImage card = fotos[i];
                            card.setUseDirectGL(true);
                            card.setDisplayCloseButton(true);
                            card.setPositionGlobal(new Vector3D(ToolsMath.getRandom(10, MT4jSettings.getInstance().getWindowWidth()-100), ToolsMath.getRandom(10, MT4jSettings.getInstance().getWindowHeight()-50),0 )  );
                            card.scale(0.6f, 0.6f, 0.6f, card.getCenterPointLocal(), TransformSpace.LOCAL);
                            card.addGestureListener(DragProcessor.class, new InertiaDragAction());
                            lassoProcessor.addClusterable(card); //make fotos lasso-able
                            pictureLayer.addChild(card);
                          }
                          progressBar.setVisible(false);
View Full Code Here

Examples of org.mt4j.components.visibleComponents.widgets.buttons.MTImageButton.scale()

          break;
        }
      }
    });
    getCanvas().addChild(previousSceneButton);
    previousSceneButton.scale(-1, 1, 1, previousSceneButton.getCenterPointLocal(), TransformSpace.LOCAL);
    previousSceneButton.setPositionGlobal(new Vector3D(previousSceneButton.getWidthXY(TransformSpace.GLOBAL) + 5, mtApp.height - previousSceneButton.getHeightXY(TransformSpace.GLOBAL) - 5, 0));
   
    //Button to get to the next scene
    MTImageButton nextSceneButton = new MTImageButton(arrow, mtApplication);
    nextSceneButton.setNoStroke(true);
View Full Code Here

Examples of org.mt4j.components.visibleComponents.widgets.buttons.MTSvgButton.scale()

          keyb.addTextInputListener(t);
             
              //Flickr Button for the keyboard
              MTSvgButton flickrButton = new MTSvgButton( "advanced" + MTApplication.separator +  "flickrMT" + MTApplication.separator + "data" + MTApplication.separator
              + "Flickr_Logo.svg", app);
              flickrButton.scale(0.4f, 0.4f, 1, new Vector3D(0,0,0), TransformSpace.LOCAL);
              flickrButton.translate(new Vector3D(0, 15,0));
              flickrButton.setBoundsPickingBehaviour(AbstractShape.BOUNDS_ONLY_CHECK);
             
              //Add actionlistener to flickr button
              flickrButton.addActionListener(new ActionListener() {
View Full Code Here

Examples of org.mt4j.util.math.Matrix.scale()

    //can we use 3x3 otrhogonalization on a 4x4 matrix just using the middle part?
    //-seems yes
    m.orthonormalizeUpperLeft();
        //Re-Apply scale because its removed at orthonormalization
//        m.mult(Matrix.getScalingMatrix(Vector3D.ZERO_VECTOR, scale.x, scale.y, scale.z), m);
        m.scale(scale);
        //Automatically inverts() the localMatrix, so exact inverse again! :)
        this.setLocalMatrix(m);
       
//        v2.transform(this.getLocalMatrix());
//        System.out.println("Diff: " + v2.getSubtracted(v1));
View Full Code Here

Examples of org.omg.CORBA.FixedDef.scale()

    protected IRFixed(org.omg.CORBA.IRObject irObject)
    {
  super(irObject);
  FixedDef fixedDef = FixedDefHelper.narrow((org.omg.CORBA.Object)irObject);
        digits = fixedDef.digits();
        scale = fixedDef.scale();
        //  setAssociatedTypeSystemNode(RemoteTypeSystem.createTypeSystemNode(aliasDef.original_type_def()));
    }

    /**
     * @return java.lang.String
View Full Code Here

Examples of org.sourceforge.jlibeps.epsgraphics.EpsGraphics2D.scale()

    // Within jlibeps, graphics are defined using 72 DPI (72/2.54=28,3465 PPC), but latexdraw uses 50 PPC.
    // That's why, we need the scale the graphics to have a 50 PPC eps picture.
    final double scale = 72. / PSTricksConstants.INCH_VAL_CM / IShape.PPC;// 72 DPI / 2.54 / 50 PPC
    try(FileOutputStream finalImage = new FileOutputStream(file)){
      final EpsGraphics2D g = new EpsGraphics2D("LaTeXDrawPicture", finalImage, 0, 0, (int)(getWidth()*scale), (int)(getHeight()*scale));//$NON-NLS-1$
      g.scale(scale, scale);
      g.drawImage(image, 0, 0, null);
      g.flush();
      g.close();
    }
  }
View Full Code Here

Examples of org.teavm.dom.canvas.CanvasRenderingContext2D.scale()

        context.setFillStyle("white");
        context.setStrokeStyle("grey");
        context.fillRect(0, 0, 600, 600);
        context.save();
        context.translate(0, 600);
        context.scale(1, -1);
        context.scale(100, 100);
        context.setLineWidth(0.01);
        for (Body body = scene.getWorld().getBodyList(); body != null; body = body.getNext()) {
            Vec2 center = body.getPosition();
            context.save();
View Full Code Here

Examples of org.xhtmlrenderer.extend.FSImage.scale()

    String nodeName = e.getNodeName();
    if (nodeName.equals("img")) {
      FSImage fsImage = uac.getImageResource(e.getAttribute("src")).getImage();
      if (fsImage != null) {
        if (cssWidth != -1 || cssHeight != -1) {
          fsImage.scale(cssWidth, cssHeight);
        }
        return new ITextImageElement(fsImage);
      }
    /*
    } else if (nodeName.equals("input")) {
View Full Code Here

Examples of org.xhtmlrenderer.pdf.ITextFSImage.scale()

                float factor = layoutContext.getDotsPerPixel();
                image.scaleAbsolute(image.getPlainWidth() * factor, image.getPlainHeight() * factor);
                FSImage fsImage = new ITextFSImage(image);
               
                if(cssHeight > -1 && cssWidth > -1) {
                    fsImage.scale(cssWidth, cssHeight);
                }
               
                return new ITextImageElement(fsImage);
            } catch (Exception e) {
                Log.error(Geonet.GEONETWORK, "Error writing metadata to PDF", e);
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.