Package org.apache.batik.bridge

Examples of org.apache.batik.bridge.SVGTextElementBridge


    public void registerSVGBridges() {
        super.registerSVGBridges();

        if (fontInfo != null) {
            TextPainter textPainter = new PSTextPainter(fontInfo);
            SVGTextElementBridge textElementBridge = new PSTextElementBridge(textPainter);
            putBridge(textElementBridge);

            //Batik flow text extension (may not always be available)
            //putBridge(new PDFBatikFlowTextElementBridge(fontInfo);
            putElementBridgeConditional(
View Full Code Here


    public void registerSVGBridges() {
        super.registerSVGBridges();

        if (fontInfo != null) {
            TextPainter textPainter = new PSTextPainter(fontInfo);
            SVGTextElementBridge textElementBridge = new PSTextElementBridge(textPainter);
            putBridge(textElementBridge);

            //Batik flow text extension (may not always be available)
            //putBridge(new PDFBatikFlowTextElementBridge(fontInfo);
            putElementBridgeConditional(
View Full Code Here

    public void registerSVGBridges() {
        super.registerSVGBridges();

        if (fontInfo != null) {
            TextPainter textPainter = new PDFTextPainter(fontInfo);
            SVGTextElementBridge textElementBridge = new PDFTextElementBridge(textPainter);
            putBridge(textElementBridge);

            //Batik flow text extension (may not always be available)
            //putBridge(new PDFBatikFlowTextElementBridge(fontInfo);
            putElementBridgeConditional(
View Full Code Here

    public void registerSVGBridges() {
        super.registerSVGBridges();

        if (fontInfo != null) {
            TextPainter textPainter = new PDFTextPainter(fontInfo);
            SVGTextElementBridge textElementBridge = new PDFTextElementBridge(textPainter);
            putBridge(textElementBridge);

            //Batik flow text extension (may not always be available)
            //putBridge(new PDFBatikFlowTextElementBridge(fontInfo);
            putElementBridgeConditional(
View Full Code Here

          //TODO USE?
          textElement.getTextLength();
          textElement.getRotate();
           */
          if (textElement.getSVGContext() instanceof SVGTextElementBridge){
            SVGTextElementBridge b = (SVGTextElementBridge)textElement.getSVGContext();
            GraphicsNode gr = b.createGraphicsNode(ctx, textElement);
            TextNode tNode = (TextNode)gr;
            b.buildGraphicsNode(ctx, textElement, tNode);
            List<?> textRuns = tNode.getTextRuns();
            logger.debug("Text runs: " + textRuns);
            //Get font size
            float fontSize = b.getFontSize();

            logger.debug("Text:" " x:" + xValues.get(0) + " y:" + yValues.get(0) + " FontSize: " + fontSize +  " Text: '" + textContent + "'");

            //Get font FILL
            Value fillOpacValue = CSSUtilities.getComputedStyle(textElement, SVGCSSEngine.FILL_OPACITY_INDEX);
View Full Code Here

TOP

Related Classes of org.apache.batik.bridge.SVGTextElementBridge

Copyright © 2018 www.massapicom. 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.