public GuideDrawable(float x, float y, float w, float h) {
float density = getResources().getDisplayMetrics().density;
mClipPath = new Path();
mClipPath.addRect(x, y, x + w, y + h, Path.Direction.CW);
mBorderPath = new Path();
mBorderPath.addRect(x - density, y - density, x + w + density, y + h + density, Path.Direction.CW);
mShadowPath = new Path();
mShadowPath.addRect(x - 3 * density, y - 3 * density, x + w + 3 * density, y + h + 3 * density, Path.Direction.CW);
mScale = new RectF(x + w / 2, y + h / 2, 1 + 8 * density / w, 1 + 8 * density / h);
mPaint = new Paint(Paint.ANTI_ALIAS_FLAG);
mPaint.setColor(getResources().getColor(R.color.state_button_light));
mPaint2 = new Paint(Paint.ANTI_ALIAS_FLAG);
mPaint2.setColor(getResources().getColor(R.color.state_button_light_alpha));
mPaint2.setMaskFilter(new BlurMaskFilter(density * 3, BlurMaskFilter.Blur.NORMAL));
}
ConfigGuide.java 文件源码
java
阅读 30
收藏 0
点赞 0
评论 0
项目:PowerToggles
作者:
评论列表
文章目录