PageWidget.java 文件源码

java
阅读 58 收藏 0 点赞 0 评论 0

项目:GitHub 作者:
public PageWidget(Context context, String bookId,
                  List<BookMixAToc.mixToc.Chapters> chaptersList,
                  OnReadStateChangeListener listener) {
    super(context, bookId, chaptersList, listener);
    mPath0 = new Path();
    mPath1 = new Path();
    mMaxLength = (float) Math.hypot(mScreenWidth, mScreenHeight);
    mPaint = new Paint();
    mPaint.setStyle(Paint.Style.FILL);

    createDrawable();

    ColorMatrix cm = new ColorMatrix();//设置颜色数组
    float array[] = {0.55f, 0, 0, 0, 80.0f, 0, 0.55f, 0, 0, 80.0f, 0, 0, 0.55f, 0, 80.0f, 0, 0, 0, 0.2f, 0};
    cm.set(array);
    mColorMatrixFilter = new ColorMatrixColorFilter(cm);
    mMatrix = new Matrix();

    mTouch.x = 0.01f; // 不让x,y为0,否则在点计算时会有问题
    mTouch.y = 0.01f;
}
评论列表
文章目录


问题


面经


文章

微信
公众号

扫码关注公众号