optionpanepainter.java

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

JAVA
567
字号
        path.curveTo(decodeAnchorX(1.4986978769302368f, 1.75f), decodeAnchorY(1.04296875f, 0.0f), decodeAnchorX(1.5546875f, 0.0f), decodeAnchorY(1.0950521230697632f, 0.0f), decodeX(1.5546875f), decodeY(1.0950521f));        path.lineTo(decodeX(1.9322917f), decodeY(1.8007812f));        path.curveTo(decodeAnchorX(1.9322917461395264f, 0.0f), decodeAnchorY(1.80078125f, 0.0f), decodeAnchorX(1.95703125f, 0.0f), decodeAnchorY(1.875f, -1.4375f), decodeX(1.9570312f), decodeY(1.875f));        path.curveTo(decodeAnchorX(1.95703125f, 0.0f), decodeAnchorY(1.875f, 1.4375f), decodeAnchorX(1.8841145038604736f, 0.0f), decodeAnchorY(1.9166667461395264f, 0.0f), decodeX(1.8841145f), decodeY(1.9166667f));        path.lineTo(decodeX(1.1002604f), decodeY(1.9166667f));        path.curveTo(decodeAnchorX(1.1002603769302368f, 0.0f), decodeAnchorY(1.9166667461395264f, 0.0f), decodeAnchorX(1.0455728769302368f, 0.0625f), decodeAnchorY(1.8723957538604736f, 1.625f), decodeX(1.0455729f), decodeY(1.8723958f));        path.curveTo(decodeAnchorX(1.0455728769302368f, -0.0625f), decodeAnchorY(1.8723957538604736f, -1.625f), decodeAnchorX(1.0755208730697632f, 0.0f), decodeAnchorY(1.7903645038604736f, 0.0f), decodeX(1.0755209f), decodeY(1.7903645f));        path.lineTo(decodeX(1.4414062f), decodeY(1.1028646f));        path.curveTo(decodeAnchorX(1.44140625f, 0.0f), decodeAnchorY(1.1028646230697632f, 0.0f), decodeAnchorX(1.4986978769302368f, -1.75f), decodeAnchorY(1.04296875f, 0.0f), decodeX(1.4986979f), decodeY(1.0429688f));        path.closePath();        return path;    }    private Path2D decodePath9() {        path.reset();        path.moveTo(decodeX(1.5f), decodeY(1.2291666f));        path.curveTo(decodeAnchorX(1.5f, 2.0f), decodeAnchorY(1.2291666269302368f, 0.0f), decodeAnchorX(1.5625f, 0.0f), decodeAnchorY(1.3125f, -2.0f), decodeX(1.5625f), decodeY(1.3125f));        path.curveTo(decodeAnchorX(1.5625f, 0.0f), decodeAnchorY(1.3125f, 2.0f), decodeAnchorX(1.5f, 1.3125f), decodeAnchorY(1.6666667461395264f, 0.0f), decodeX(1.5f), decodeY(1.6666667f));        path.curveTo(decodeAnchorX(1.5f, -1.3125f), decodeAnchorY(1.6666667461395264f, 0.0f), decodeAnchorX(1.4375f, 0.0f), decodeAnchorY(1.3125f, 2.0f), decodeX(1.4375f), decodeY(1.3125f));        path.curveTo(decodeAnchorX(1.4375f, 0.0f), decodeAnchorY(1.3125f, -2.0f), decodeAnchorX(1.5f, -2.0f), decodeAnchorY(1.2291666269302368f, 0.0f), decodeX(1.5f), decodeY(1.2291666f));        path.closePath();        return path;    }    private Ellipse2D decodeEllipse7() {        ellipse.setFrame(decodeX(1.4375f), //x                         decodeY(1.7291667f), //y                         decodeX(1.5625f) - decodeX(1.4375f), //width                         decodeY(1.8541667f) - decodeY(1.7291667f)); //height        return ellipse;    }

    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.5f * w) + x, (0.0f * h) + y, (0.5f * w) + x, (1.0f * h) + y,                new float[] { 0.0f,0.17258064f,0.3451613f,0.5145161f,0.683871f,0.9f,1.0f },                new Color[] { color2,                            decodeColor(color2,color3,0.5f),                            color3,                            decodeColor(color3,color4,0.5f),                            color4,                            decodeColor(color4,color5,0.5f),                            color5});    }    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.5f * w) + x, (0.0f * h) + y, (0.5f * w) + x, (1.0f * h) + y,                new float[] { 0.0f,0.5f,1.0f },                new Color[] { color9,                            decodeColor(color9,color10,0.5f),                            color10});    }    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.5f * w) + x, (0.0f * h) + y, (0.5f * w) + x, (1.0f * h) + y,                new float[] { 0.0f,0.24143836f,0.48287672f,0.7414384f,1.0f },                new Color[] { color11,                            decodeColor(color11,color12,0.5f),                            color12,                            decodeColor(color12,color13,0.5f),                            color13});    }    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.5f * w) + x, (0.0f * h) + y, (0.5f * w) + x, (1.0f * h) + y,                new float[] { 0.0f,0.14212328f,0.28424656f,0.39212328f,0.5f,0.60958904f,0.7191781f,0.85958904f,1.0f },                new Color[] { color14,                            decodeColor(color14,color15,0.5f),                            color15,                            decodeColor(color15,color16,0.5f),                            color16,                            decodeColor(color16,color17,0.5f),                            color17,                            decodeColor(color17,color18,0.5f),                            color18});    }    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.5f * w) + x, (0.0f * h) + y, (0.5f * w) + x, (1.0f * h) + y,                new float[] { 0.0f,0.5f,1.0f },                new Color[] { color19,                            decodeColor(color19,color20,0.5f),                            color20});    }    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.5f * w) + x, (0.0f * h) + y, (0.5f * w) + x, (1.0f * h) + y,                new float[] { 0.0f,0.5f,1.0f },                new Color[] { color21,                            decodeColor(color21,color22,0.5f),                            color22});    }    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.5f * w) + x, (0.0f * h) + y, (0.5f * w) + x, (1.0f * h) + y,                new float[] { 0.0f,0.15239726f,0.30479452f,0.47945207f,0.6541096f,0.8270548f,1.0f },                new Color[] { color23,                            decodeColor(color23,color24,0.5f),                            color24,                            decodeColor(color24,color25,0.5f),                            color25,                            decodeColor(color25,color26,0.5f),                            color26});    }    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.5f * w) + x, (0.0f * h) + y, (0.5f * w) + x, (1.0f * h) + y,                new float[] { 0.0f,0.5f,1.0f },                new Color[] { color28,                            decodeColor(color28,color29,0.5f),                            color29});    }    private Paint decodeGradient9(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.5f * w) + x, (0.0f * h) + y, (0.5f * w) + x, (1.0f * h) + y,                new float[] { 0.0f,0.1729452f,0.3458904f,0.49315068f,0.64041096f,0.7328767f,0.8253425f,0.9126712f,1.0f },                new Color[] { color30,                            decodeColor(color30,color31,0.5f),                            color31,                            decodeColor(color31,color32,0.5f),                            color32,                            decodeColor(color32,color33,0.5f),                            color33,                            decodeColor(color33,color34,0.5f),                            color34});    }    private Paint decodeGradient10(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.5f * w) + x, (0.0f * h) + y, (0.5f * w) + x, (1.0f * h) + y,                new float[] { 0.0f,0.5f,1.0f },                new Color[] { color35,                            decodeColor(color35,color36,0.5f),                            color36});    }
}

⌨️ 快捷键说明

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