Examples of translate()


Examples of org.antlr.grammar.v3.ActionTranslator.translate()

    generator.genRecognizer(); // forces load of templates
    ActionTranslator translator = new ActionTranslator(generator,
                                  "rule",
                                  new CommonToken(ANTLRParser.ACTION,action),1);
    String rawTranslation =
      translator.translate();

    int expectedMsgID = ErrorManager.MSG_WRITE_TO_READONLY_ATTR;
    Object expectedArg = "other";
    Object expectedArg2 = "tree";
    GrammarSemanticsMessage expectedMessage =
View Full Code Here

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

        // Modif 2bis
        gc.setClip(new Rectangle(30, 30, 60, 60));

        // Modif 3
        gc.translate(45, 45);

        GraphicContext gc2 = (GraphicContext)gc.clone();
        DOMGroupManager domGroupManager2
            = new DOMGroupManager(gc2, domTreeManager);
View Full Code Here

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

      g2d.setRenderingHint(RenderingHints.KEY_TEXT_ANTIALIASING, RenderingHints.VALUE_TEXT_ANTIALIAS_DEFAULT);
      g2d.setRenderingHint(RenderingHints.KEY_ANTIALIASING, RenderingHints.VALUE_ANTIALIAS_DEFAULT);
      view.preparePrinting();
      final Rectangle innerBounds = view.getInnerBounds();
      g2d.setSVGCanvasSize(new Dimension(innerBounds.width, innerBounds.height));
      g2d.translate(-innerBounds.x, -innerBounds.y);
      view.print(g2d);
      view.endPrinting();
      return g2d;
    }
    finally
View Full Code Here

Examples of org.apache.commons.lang3.text.translate.CharSequenceTranslator.translate()

    public void testEscapeXmlSupplementaryCharacters() {
        CharSequenceTranslator escapeXml =
            StringEscapeUtils.ESCAPE_XML.with( NumericEntityEscaper.between(0x7f, Integer.MAX_VALUE) );

        assertEquals("Supplementary character must be represented using a single escape", "𣎴",
                escapeXml.translate("\uD84C\uDFB4"));
    }
   
    /**
     * Reverse of the above.
     *
 
View Full Code Here

Examples of org.apache.commons.math3.geometry.euclidean.threed.Plane.translate()

        Vector3D p1 = new Vector3D(1.2, 3.4, -5.8);
        Vector3D p2 = new Vector3D(3.4, -5.8, 1.2);
        Vector3D p3 = new Vector3D(-2.0, 4.3, 0.7);
        Plane    p  = new Plane(p1, p2, p3, 1.0e-10);

        p = p.translate(new Vector3D(2.0, p.getU(), -1.5, p.getV()));
        Assert.assertTrue(p.contains(p1));
        Assert.assertTrue(p.contains(p2));
        Assert.assertTrue(p.contains(p3));

        p = p.translate(new Vector3D(-1.2, p.getNormal()));
View Full Code Here

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

            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.PDFDocumentGraphics2D.translate()

            //Set up the document size
            Dimension pageSize = new Dimension(
                    (int)Math.ceil(UnitConv.mm2pt(210)),
                    (int)Math.ceil(UnitConv.mm2pt(297))); //page size A4 (in pt)
            g2d.setupDocument(out, pageSize.width, pageSize.height);
            g2d.translate(144, 72); //Establish some page borders

            //A few rectangles rotated and with different color
            Graphics2D copy = (Graphics2D)g2d.create();
            int c = 12;
            for (int i = 0; i < c; i++) {
View Full Code Here

Examples of org.apache.harmony.awt.gl.MultiRectArea.translate()

        }
        r.translate(x, y);
        MultiRectArea ret = parent.getObscuredRegion(r);
        if (ret != null) {
            parent.addObscuredRegions(ret, this);
            ret.translate(-x, -y);
            ret.intersect(new Rectangle(0, 0, w, h));
        }
        return ret;
    }
View Full Code Here

Examples of org.apache.hivemind.schema.Translator.translate()

        m.getTranslator("cartoon");
        control.setReturnValue(t);

        Object flintstoneKey = new Object();
        t.translate(m, Object.class, "flintstone", element.getLocation());
        tControl.setReturnValue(flintstoneKey);

        replayControls();

        p.process(elements, m);
View Full Code Here

Examples of org.apache.hivemind.schema.rules.BooleanTranslator.translate()

    public void testNull()
    {
        BooleanTranslator t = new BooleanTranslator();

        assertEquals(Boolean.FALSE, t.translate(null, null, null));
    }

    public void testInitializer()
    {
        BooleanTranslator t = new BooleanTranslator("default=true");
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.