desktoppanepainter.java

来自「Mobile 应用程序使用 Java Micro Edition (Java M」· Java 代码 · 共 334 行 · 第 1/2 页

JAVA
334
字号
        path.lineTo(decodeX(2.0f), decodeY(1.1982758f));        path.curveTo(decodeAnchorX(2.0f, 0.0f), decodeAnchorY(1.1982758045196533f, 0.0f), decodeAnchorX(1.806666612625122f, 27.5f), decodeAnchorY(1.5043103694915771f, -38.5f), decodeX(1.8066666f), decodeY(1.5043104f));        path.curveTo(decodeAnchorX(1.806666612625122f, -27.5f), decodeAnchorY(1.5043103694915771f, 38.5f), decodeAnchorX(1.6766667366027832f, 0.0f), decodeAnchorY(1.778017282485962f, 0.0f), decodeX(1.6766667f), decodeY(1.7780173f));        path.lineTo(decodeX(1.5683334f), decodeY(1.5797414f));        path.closePath();        return path;    }    private Path2D decodePath6() {        path.reset();        path.moveTo(decodeX(1.5216666f), decodeY(2.0f));        path.curveTo(decodeAnchorX(1.5216666460037231f, 0.0f), decodeAnchorY(2.0f, 0.0f), decodeAnchorX(1.5550000667572021f, -2.0f), decodeAnchorY(1.778017282485962f, 22.5f), decodeX(1.5550001f), decodeY(1.7780173f));        path.curveTo(decodeAnchorX(1.5550000667572021f, 2.0f), decodeAnchorY(1.778017282485962f, -22.5f), decodeAnchorX(1.568333387374878f, 0.0f), decodeAnchorY(1.576508641242981f, 0.0f), decodeX(1.5683334f), decodeY(1.5765086f));        path.lineTo(decodeX(1.6775f), decodeY(1.7747846f));        path.curveTo(decodeAnchorX(1.6775000095367432f, 0.0f), decodeAnchorY(1.7747845649719238f, 0.0f), decodeAnchorX(1.6508333683013916f, 6.0f), decodeAnchorY(1.892241358757019f, -14.0f), decodeX(1.6508334f), decodeY(1.8922414f));        path.curveTo(decodeAnchorX(1.6508333683013916f, -6.0f), decodeAnchorY(1.892241358757019f, 14.0f), decodeAnchorX(1.6083333492279053f, 0.0f), decodeAnchorY(2.0f, 0.0f), decodeX(1.6083333f), decodeY(2.0f));        path.lineTo(decodeX(1.5216666f), decodeY(2.0f));        path.closePath();        return path;    }    private Path2D decodePath7() {        path.reset();        path.moveTo(decodeX(1.6066667f), decodeY(2.0f));        path.curveTo(decodeAnchorX(1.6066666841506958f, 0.0f), decodeAnchorY(2.0f, 0.0f), decodeAnchorX(1.6399999856948853f, -7.0f), decodeAnchorY(1.8814654350280762f, 17.0f), decodeX(1.64f), decodeY(1.8814654f));        path.curveTo(decodeAnchorX(1.6399999856948853f, 7.0f), decodeAnchorY(1.8814654350280762f, -17.0f), decodeAnchorX(1.6775000095367432f, 0.0f), decodeAnchorY(1.7747845649719238f, 0.0f), decodeX(1.6775f), decodeY(1.7747846f));        path.curveTo(decodeAnchorX(1.6775000095367432f, 0.0f), decodeAnchorY(1.7747845649719238f, 0.0f), decodeAnchorX(1.7416666746139526f, -11.0f), decodeAnchorY(1.8836207389831543f, -15.0f), decodeX(1.7416667f), decodeY(1.8836207f));        path.curveTo(decodeAnchorX(1.7416666746139526f, 11.0f), decodeAnchorY(1.8836207389831543f, 15.0f), decodeAnchorX(1.81333327293396f, 0.0f), decodeAnchorY(2.0f, -0.5f), decodeX(1.8133333f), decodeY(2.0f));        path.curveTo(decodeAnchorX(1.81333327293396f, 0.0f), decodeAnchorY(2.0f, 0.5f), decodeAnchorX(1.6066666841506958f, 0.0f), decodeAnchorY(2.0f, 0.0f), decodeX(1.6066667f), decodeY(2.0f));        path.closePath();        return path;    }    private Path2D decodePath8() {        path.reset();        path.moveTo(decodeX(1.2733333f), decodeY(2.0f));        path.curveTo(decodeAnchorX(1.2733333110809326f, 0.0f), decodeAnchorY(2.0f, 0.0f), decodeAnchorX(1.2633333206176758f, 5.0f), decodeAnchorY(1.659482717514038f, 37.0f), decodeX(1.2633333f), decodeY(1.6594827f));        path.curveTo(decodeAnchorX(1.2633333206176758f, -5.0f), decodeAnchorY(1.659482717514038f, -37.0f), decodeAnchorX(1.193333387374878f, 9.0f), decodeAnchorY(1.2241379022598267f, 33.5f), decodeX(1.1933334f), decodeY(1.2241379f));        path.curveTo(decodeAnchorX(1.193333387374878f, -9.0f), decodeAnchorY(1.2241379022598267f, -33.5f), decodeAnchorX(1.1333333253860474f, 0.0f), decodeAnchorY(1.0f, 0.0f), decodeX(1.1333333f), decodeY(1.0f));        path.lineTo(decodeX(1.0f), decodeY(1.0f));        path.lineTo(decodeX(1.0f), decodeY(1.6120689f));        path.curveTo(decodeAnchorX(1.0f, 0.0f), decodeAnchorY(1.6120688915252686f, 0.0f), decodeAnchorX(1.149999976158142f, 0.0f), decodeAnchorY(2.0f, -0.5f), decodeX(1.15f), decodeY(2.0f));        path.curveTo(decodeAnchorX(1.149999976158142f, 0.0f), decodeAnchorY(2.0f, 0.5f), decodeAnchorX(1.2733333110809326f, 0.0f), decodeAnchorY(2.0f, 0.0f), decodeX(1.2733333f), decodeY(2.0f));        path.closePath();        return path;    }    private Path2D decodePath9() {        path.reset();        path.moveTo(decodeX(1.0f), decodeY(2.0f));        path.lineTo(decodeX(1.0f), decodeY(1.5969827f));        path.curveTo(decodeAnchorX(1.0f, 0.0f), decodeAnchorY(1.596982717514038f, 0.0f), decodeAnchorX(1.0733333826065063f, -10.0f), decodeAnchorY(1.7974138259887695f, -19.5f), decodeX(1.0733334f), decodeY(1.7974138f));        path.curveTo(decodeAnchorX(1.0733333826065063f, 10.0f), decodeAnchorY(1.7974138259887695f, 19.5f), decodeAnchorX(1.1666666269302368f, 0.0f), decodeAnchorY(2.0f, -0.5f), decodeX(1.1666666f), decodeY(2.0f));        path.curveTo(decodeAnchorX(1.1666666269302368f, 0.0f), decodeAnchorY(2.0f, 0.5f), decodeAnchorX(1.0f, 0.0f), decodeAnchorY(2.0f, 0.0f), decodeX(1.0f), decodeY(2.0f));        path.closePath();        return path;    }

    private Paint decodeGradient1(Shape s) {        Rectangle2D bounds = s.getBounds2D();        float x = (float)bounds.getX();        float y = (float)bounds.getY();        float w = (float)bounds.getWidth();        float h = (float)bounds.getHeight();        return decodeGradient((0.25f * w) + x, (0.0f * h) + y, (0.75f * w) + x, (1.0f * h) + y,                new float[] { 0.0f,0.5f,1.0f },                new Color[] { color1,                            decodeColor(color1,color2,0.5f),                            color2});    }    private Paint decodeGradient2(Shape s) {        Rectangle2D bounds = s.getBounds2D();        float x = (float)bounds.getX();        float y = (float)bounds.getY();        float w = (float)bounds.getWidth();        float h = (float)bounds.getHeight();        return decodeGradient((0.9567308f * w) + x, (0.06835443f * h) + y, (0.75f * w) + x, (1.0f * h) + y,                new float[] { 0.0f,0.5f,1.0f },                new Color[] { color3,                            decodeColor(color3,color4,0.5f),                            color4});    }    private Paint decodeGradient3(Shape s) {        Rectangle2D bounds = s.getBounds2D();        float x = (float)bounds.getX();        float y = (float)bounds.getY();        float w = (float)bounds.getWidth();        float h = (float)bounds.getHeight();        return decodeGradient((0.25f * w) + x, (0.0f * h) + y, (0.83536583f * w) + x, (0.9522059f * h) + y,                new float[] { 0.0f,0.5f,1.0f },                new Color[] { color6,                            decodeColor(color6,color7,0.5f),                            color7});    }    private Paint decodeGradient4(Shape s) {        Rectangle2D bounds = s.getBounds2D();        float x = (float)bounds.getX();        float y = (float)bounds.getY();        float w = (float)bounds.getWidth();        float h = (float)bounds.getHeight();        return decodeGradient((0.8659696f * w) + x, (0.011049724f * h) + y, (0.24809887f * w) + x, (0.95027626f * h) + y,                new float[] { 0.0f,0.5f,1.0f },                new Color[] { color6,                            decodeColor(color6,color8,0.5f),                            color8});    }    private Paint decodeGradient5(Shape s) {        Rectangle2D bounds = s.getBounds2D();        float x = (float)bounds.getX();        float y = (float)bounds.getY();        float w = (float)bounds.getWidth();        float h = (float)bounds.getHeight();        return decodeGradient((0.3511236f * w) + x, (0.09326425f * h) + y, (0.33426967f * w) + x, (0.9846154f * h) + y,                new float[] { 0.0f,0.5f,1.0f },                new Color[] { color9,                            decodeColor(color9,color10,0.5f),                            color10});    }    private Paint decodeGradient6(Shape s) {        Rectangle2D bounds = s.getBounds2D();        float x = (float)bounds.getX();        float y = (float)bounds.getY();        float w = (float)bounds.getWidth();        float h = (float)bounds.getHeight();        return decodeGradient((0.3548387f * w) + x, (0.114285715f * h) + y, (0.48387095f * w) + x, (0.9809524f * h) + y,                new float[] { 0.0f,0.5f,1.0f },                new Color[] { color11,                            decodeColor(color11,color4,0.5f),                            color4});    }    private Paint decodeGradient7(Shape s) {        Rectangle2D bounds = s.getBounds2D();        float x = (float)bounds.getX();        float y = (float)bounds.getY();        float w = (float)bounds.getWidth();        float h = (float)bounds.getHeight();        return decodeGradient((0.25f * w) + x, (0.0f * h) + y, (0.75f * w) + x, (1.0f * h) + y,                new float[] { 0.0f,0.5f,1.0f },                new Color[] { color1,                            decodeColor(color1,color12,0.5f),                            color12});    }    private Paint decodeGradient8(Shape s) {        Rectangle2D bounds = s.getBounds2D();        float x = (float)bounds.getX();        float y = (float)bounds.getY();        float w = (float)bounds.getWidth();        float h = (float)bounds.getHeight();        return decodeGradient((0.25f * w) + x, (0.0f * h) + y, (0.75f * w) + x, (1.0f * h) + y,                new float[] { 0.0f,0.5f,1.0f },                new Color[] { color13,                            decodeColor(color13,color14,0.5f),                            color14});    }
}

⌨️ 快捷键说明

复制代码Ctrl + C
搜索代码Ctrl + F
全屏模式F11
增大字号Ctrl + =
减小字号Ctrl + -
显示快捷键?