Package org.apache.batik.gvt.text

Examples of org.apache.batik.gvt.text.TextSpanLayout.hitTestChar()


                            (StrokingTextPainter.TextRun)list.get(i);
                        AttributedCharacterIterator aci = run.getACI();
                        TextSpanLayout layout = run.getLayout();
                        float x = (float)coords.getX();
                        float y = (float)coords.getY();
                        TextHit textHit = layout.hitTestChar(x, y);
                        if (textHit != null && layout.getBounds2D().contains(x, y)) {
                            Object delimiter = aci.getAttribute
                                (GVTAttributedCharacterIterator.TextAttribute.TEXT_COMPOUND_DELIMITER);
                            if (delimiter instanceof Element) {
                                return (Element)delimiter;
View Full Code Here


        // for each text run, see if its been hit
        for (int i = 0; i < textRuns.size(); ++i) {
            TextRun textRun = (TextRun)textRuns.get(i);
            TextSpanLayout layout = textRun.getLayout();
            TextHit textHit = layout.hitTestChar((float) x, (float) y);
            if (textHit != null && layout.getBounds2D().contains(x,y)) {
                return new BasicTextPainter.BasicMark(node, textHit);
            }
        }
View Full Code Here

        // for each text run, see if its been hit
        for (int i = 0; i < textRuns.size(); ++i) {
            TextRun textRun = (TextRun)textRuns.get(i);
            TextSpanLayout layout = textRun.getLayout();
            TextHit textHit = layout.hitTestChar((float) x, (float) y);
            if (textHit != null && layout.getBounds2D().contains(x,y)) {
                return new BasicTextPainter.BasicMark(node, textHit);
            }
        }
View Full Code Here

                (StrokingTextPainter.TextRun)list.get(i);
            AttributedCharacterIterator aci = run.getACI();
            TextSpanLayout layout = run.getLayout();
            float x = (float)p.getX();
            float y = (float)p.getY();
            TextHit textHit = layout.hitTestChar(x, y);
            if (textHit != null && contains(p, layout.getBounds2D())) {
                return true;
            }
        }
        return false;
View Full Code Here

                            (StrokingTextPainter.TextRun)list.get(i);
                        AttributedCharacterIterator aci = run.getACI();
                        TextSpanLayout layout = run.getLayout();
                        float x = (float)coords.getX();
                        float y = (float)coords.getY();
                        TextHit textHit = layout.hitTestChar(x, y);
                        if (textHit != null && layout.getBounds2D().contains(x, y)) {
                            Object delimiter = aci.getAttribute
                                (GVTAttributedCharacterIterator.TextAttribute.TEXT_COMPOUND_DELIMITER);
                            if (delimiter instanceof Element) {
                                return (Element)delimiter;
View Full Code Here

        // for each text run, see if its been hit
        for (int i = 0; i < textRuns.size(); ++i) {
            TextRun textRun = (TextRun)textRuns.get(i);
            TextSpanLayout layout = textRun.getLayout();
            TextHit textHit = layout.hitTestChar((float) x, (float) y);
            if (textHit != null && layout.getBounds().contains(x,y)) {
                return new BasicTextPainter.BasicMark(node, layout, textHit);
            }
        }
View Full Code Here

                (StrokingTextPainter.TextRun)list.get(i);
            AttributedCharacterIterator aci = run.getACI();
            TextSpanLayout layout = run.getLayout();
            float x = (float)p.getX();
            float y = (float)p.getY();
            TextHit textHit = layout.hitTestChar(x, y);
            if (textHit != null && contains(p, layout.getBounds())) {
                return true;
            }
        }
        return false;
View Full Code Here

        // for each text run, see if its been hit
        for (int i = 0; i < textRuns.size(); ++i) {
            TextRun textRun = (TextRun)textRuns.get(i);
            TextSpanLayout layout = textRun.getLayout();
            TextHit textHit = layout.hitTestChar((float) x, (float) y);
            if (textHit != null && layout.getBounds().contains(x,y)) {
                return new BasicTextPainter.BasicMark(node, textHit);
            }
        }
View Full Code Here

                        (StrokingTextPainter.TextRun)list.get(i);
                    AttributedCharacterIterator aci = run.getACI();
                    TextSpanLayout layout = run.getLayout();
                    float x = (float)coords.getX();
                    float y = (float)coords.getY();
                    TextHit textHit = layout.hitTestChar(x, y);
                    if (textHit != null && layout.getBounds().contains(x, y)) {
                        Object delimiter = aci.getAttribute
                            (GVTAttributedCharacterIterator.TextAttribute.TEXT_COMPOUND_DELIMITER);
                        if (delimiter instanceof Element) {
                            return (Element)delimiter;
View Full Code Here

                            (StrokingTextPainter.TextRun)list.get(i);
                        AttributedCharacterIterator aci = run.getACI();
                        TextSpanLayout layout = run.getLayout();
                        float x = (float)coords.getX();
                        float y = (float)coords.getY();
                        TextHit textHit = layout.hitTestChar(x, y);
                        if (textHit != null && layout.getBounds().contains(x, y)) {
                            Object delimiter = aci.getAttribute
                                (GVTAttributedCharacterIterator.TextAttribute.TEXT_COMPOUND_DELIMITER);
                            if (delimiter instanceof Element) {
                                return (Element)delimiter;
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.