scrollbarscrollbarthumbpainter.java

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

JAVA
363
字号
    private Path2D decodePath3() {        path.reset();        path.moveTo(decodeX(0.4f), decodeY(1.0f));        path.lineTo(decodeX(0.06666667f), decodeY(1.0f));        path.lineTo(decodeX(0.16060607f), decodeY(1.5090909f));        path.curveTo(decodeAnchorX(0.16060607135295868f, 0.0f), decodeAnchorY(1.5090909004211426f, 0.0f), decodeAnchorX(0.20000000298023224f, -0.9545454545454564f), decodeAnchorY(1.1363636255264282f, 1.5454545454545472f), decodeX(0.2f), decodeY(1.1363636f));        path.curveTo(decodeAnchorX(0.20000000298023224f, 0.9545454545454564f), decodeAnchorY(1.1363636255264282f, -1.5454545454545472f), decodeAnchorX(0.4000000059604645f, 0.0f), decodeAnchorY(1.0f, 0.0f), decodeX(0.4f), decodeY(1.0f));        path.closePath();        return path;    }    private Path2D decodePath4() {        path.reset();        path.moveTo(decodeX(2.4242425f), decodeY(1.5121212f));        path.lineTo(decodeX(2.4242425f), decodeY(1.5121212f));        path.closePath();        return path;    }    private Path2D decodePath5() {        path.reset();        path.moveTo(decodeX(2.9363637f), decodeY(1.0f));        path.lineTo(decodeX(2.6030304f), decodeY(1.0f));        path.curveTo(decodeAnchorX(2.6030304431915283f, 0.0f), decodeAnchorY(1.0f, 0.0f), decodeAnchorX(2.7787880897521973f, -0.6818181818181728f), decodeAnchorY(1.1333333253860474f, -1.227272727272727f), decodeX(2.778788f), decodeY(1.1333333f));        path.curveTo(decodeAnchorX(2.7787880897521973f, 0.6818181818181728f), decodeAnchorY(1.1333333253860474f, 1.227272727272727f), decodeAnchorX(2.8393938541412354f, 0.0f), decodeAnchorY(1.5060606002807617f, 0.0f), decodeX(2.8393939f), decodeY(1.5060606f));        path.lineTo(decodeX(2.9363637f), decodeY(1.0f));        path.closePath();        return path;    }    private Path2D decodePath6() {        path.reset();        path.moveTo(decodeX(2.9363637f), decodeY(1.0f));        path.lineTo(decodeX(2.5563636f), decodeY(1.0f));        path.curveTo(decodeAnchorX(2.556363582611084f, 0.0f), decodeAnchorY(1.0f, 0.0f), decodeAnchorX(2.7587878704071045f, -0.6818181818181728f), decodeAnchorY(1.1399999856948853f, -1.2272727272727266f), decodeX(2.7587879f), decodeY(1.14f));        path.curveTo(decodeAnchorX(2.7587878704071045f, 0.6818181818181728f), decodeAnchorY(1.1399999856948853f, 1.227272727272727f), decodeAnchorX(2.8393938541412354f, 0.0f), decodeAnchorY(1.5060606002807617f, 0.0f), decodeX(2.8393939f), decodeY(1.5060606f));        path.lineTo(decodeX(2.9363637f), decodeY(1.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.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[] { 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.5f * w) + x, (0.0f * h) + y, (0.5f * w) + x, (1.0f * h) + y,                new float[] { 0.038922157f,0.0508982f,0.06287425f,0.19610777f,0.32934132f,0.48952097f,0.6497006f,0.8248503f,1.0f },                new Color[] { color3,                            decodeColor(color3,color4,0.5f),                            color4,                            decodeColor(color4,color5,0.5f),                            color5,                            decodeColor(color5,color6,0.5f),                            color6,                            decodeColor(color6,color7,0.5f),                            color7});    }    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.06818182f * w) + x, (-0.005952381f * h) + y, (0.3689091f * w) + x, (0.23929171f * h) + y,                new float[] { 0.0f,0.5f,1.0f },                new Color[] { color8,                            decodeColor(color8,color9,0.5f),                            color9});    }    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.9409091f * w) + x, (0.035928145f * h) + y, (0.5954546f * w) + x, (0.26347303f * h) + y,                new float[] { 0.0f,0.5f,1.0f },                new Color[] { color8,                            decodeColor(color8,color11,0.5f),                            color11});    }    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.038922157f,0.0508982f,0.06287425f,0.19610777f,0.32934132f,0.48952097f,0.6497006f,0.8248503f,1.0f },                new Color[] { color12,                            decodeColor(color12,color13,0.5f),                            color13,                            decodeColor(color13,color14,0.5f),                            color14,                            decodeColor(color14,color15,0.5f),                            color15,                            decodeColor(color15,color16,0.5f),                            color16});    }    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[] { color17,                            decodeColor(color17,color18,0.5f),                            color18});    }    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.038922157f,0.0508982f,0.06287425f,0.19610777f,0.32934132f,0.48952097f,0.6497006f,0.8248503f,1.0f },                new Color[] { color19,                            decodeColor(color19,color20,0.5f),                            color20,                            decodeColor(color20,color21,0.5f),                            color21,                            decodeColor(color21,color22,0.5f),                            color22,                            decodeColor(color22,color23,0.5f),                            color23});    }    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.06818182f * w) + x, (-0.005952381f * h) + y, (0.3689091f * w) + x, (0.23929171f * h) + y,                new float[] { 0.0f,0.5f,1.0f },                new Color[] { color24,                            decodeColor(color24,color9,0.5f),                            color9});    }    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.9409091f * w) + x, (0.035928145f * h) + y, (0.37615633f * w) + x, (0.34910178f * h) + y,                new float[] { 0.0f,0.5f,1.0f },                new Color[] { color25,                            decodeColor(color25,color11,0.5f),                            color11});    }
}

⌨️ 快捷键说明

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