Package com.tinyline.tiny2d

Examples of com.tinyline.tiny2d.TinyColor


        return t2d;
    }

    private void setT2DPureMark(Tiny2D t2d, final Tile tile, boolean black) {
        t2d.strokeWidth = Math.max(ONE, (ONE * tile.width) >> 4);
        t2d.strokeColor = new TinyColor(black ? blackMarkColor : whiteMarkColor);
        t2d.fillColor = TinyColor.NONE;
    }
View Full Code Here


    }

    void drawStone(final Tile tile, boolean black) {
        Tiny2D t2d = getT2D(tile);

        t2d.strokeColor = new TinyColor(blackStoneColor);
        t2d.strokeWidth = ONE;
        if (black)
            t2d.fillColor = t2d.strokeColor;
        else
            t2d.fillColor = new TinyColor(whiteStoneColor);

        t2d.drawOval(daAnchorX, daAnchorY, daWidth(tile), daHeight(tile));
        //t2d.drawLine(arg0, arg1, arg2, arg3)
    }
View Full Code Here

    void drawSelected(final Tile tile, boolean black) {
        Tiny2D t2d = getT2D(tile);
        //t2d.strokeWidth = ONE;
        //t2d.strokeColor = new TinyColor(selectedColor);
        t2d.fillColor = new TinyColor(selectedColor);

        int wH = daWidth(tile) >> 1;
        int hH = daHeight(tile) >> 1;
        int wQ = wH >> 1;
        int hQ = hH >> 1;
View Full Code Here

                Tiny2D.TEXT_ANCHOR_START);
    }

    void drawLabelBackground(final Tile tile) {
        Tiny2D t2d = getT2D(tile);
        t2d.fillColor = new TinyColor(gobanColor);
        t2d.drawOval(daAnchorX, daAnchorY, daWidth(tile), daHeight(tile));
    }
View Full Code Here

    }

    void drawTerritory(final Tile tile, boolean black) {
        Tiny2D t2d = getT2D(tile);
        int color = black ? moyoBlackColor : moyoWhiteColor;
        t2d.fillColor = new TinyColor(color);

        int wH = daWidth(tile) >> 1;
        int hH = daHeight(tile) >> 1;
        int wQ = wH >> 1;
        int hQ = hH >> 1;
View Full Code Here

    }

    void drawVariant(final Tile tile) {
        Tiny2D t2d = getT2D(tile);
        //t2d.strokeColor = TinyColor.NONE;
        t2d.fillColor = new TinyColor(variantColor);
        t2d.drawOval(daAnchorX, daAnchorY, daWidth(tile), daHeight(tile));
    }
View Full Code Here

    }

    void drawVariant(final Tile tile, boolean good) {
        Tiny2D t2d = getT2D(tile);
        //t2d.strokeColor = new TinyColor(good ? goodMoveColor : badMoveColor);
        t2d.fillColor = new TinyColor(good ? goodMoveColor : badMoveColor);
        t2d.drawOval(daAnchorX, daAnchorY, daWidth(tile), daHeight(tile));
    }
View Full Code Here

        Tiny2D t2d = getT2D(tile);
        TinyFont font = MyArial.getFont();
        int commentFontSize = daHeight(tile) / commentLines;
        //int commentFontDescent = commentFontSize * font.descent / font.unitsPerEm;
        int commentFontAscent = commentFontSize * font.ascent / font.unitsPerEm;
        TinyColor fgColor = new TinyColor(commentFgColor);

        for (int i = 0; i < tile.pixels32.length; i++)
            tile.pixels32[i] = commentBgColor;

        int Y = 0; // y position to draw

        if (moveStatus != null) {
            char[] text = moveStatus.toCharArray();
            //#ifdef debug
            System.out.println("\t" + moveStatus);
            //#endif
            int X = daWidth(tile) / 2;
            t2d.strokeColor = TinyColor.NONE;
            t2d.fillColor = fgColor;
            t2d.drawChars(font, commentFontSize, text, 0, text.length, X, Y + commentFontAscent, Tiny2D.TEXT_ANCHOR_MIDDLE);
            Y += commentFontSize;
            commentLines--;
        }

        if (commentLines > 0) {
            int X = ONE * 2;

            // draw move indicator
            if (drawSolvedFailedIndicator || drawColorToPlayIndicator) {
                t2d.strokeWidth = ONE;
                t2d.strokeColor = fgColor;
                if (drawSolvedFailedIndicator)
                    t2d.fillColor = new TinyColor(goodMove ? goodMoveColor : badMoveColor);
                else if (drawColorToPlayIndicator)
                    t2d.fillColor = new TinyColor(black ? blackStoneColor : whiteStoneColor);
                t2d.drawOval(X, Y + ONE, commentFontSize - ONE * 2, commentFontSize - ONE * 2);
                X = commentFontSize + commentFontSize / 4;
            }

            if (comment != null) {
View Full Code Here

TOP

Related Classes of com.tinyline.tiny2d.TinyColor

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.