Package com.tinyline.tiny2d

Examples of com.tinyline.tiny2d.TinyRect


        pixbuf.height = tile.height;
        pixbuf.pixels32 = tile.pixels32;

        Tiny2D t2d = new Tiny2D(pixbuf);
        t2d.antialias = true;
        TinyRect clip = t2d.getClip();
        t2d.devClip = clip;
        t2d.clearRect(clip);
        t2d.invalidate();
        return t2d;
    }
View Full Code Here


        int stoneSize = daWidth(tile);
        int fontSize = stoneSize;
        TinyFont font = MyArial.getFont();

        char[] text = label.toCharArray();
        TinyRect cbox;
        // calculate fontSize, so the number fits into stone
        while (true) {
            cbox = Tiny2D.charsBounds(font, fontSize, text, 0, text.length, Tiny2D.TEXT_DIR_LR);
            // add one pixel from each side, so the number won't blent with stone border
            if (cbox.xmax - cbox.xmin + ONE * 2 >= stoneSize)
View Full Code Here

                do {
                    boolean drawChars = len == text.length;

                    if (!drawChars) {
                        TinyRect cbox = Tiny2D.charsBounds(font, commentFontSize,
                                text, off, len, Tiny2D.TEXT_DIR_LR);
                        if (X + cbox.xmax - cbox.xmin + ONE > daWidth(tile)) {
                            len--;
                            drawChars = true;
                        }
View Full Code Here

   
    SVGEvent theEvent = (SVGEvent) evt;
    SVGRect view,origview;
    SVGDocument document;
    TinyPoint point;
    TinyRect  rect;
    SVGEvent event;
    String url;
   
    switch(theEvent.id)
    {
View Full Code Here

TOP

Related Classes of com.tinyline.tiny2d.TinyRect

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.