那么,如何制作这样一个效果呢,关键点在哪里呢?
做法其实可以有多种,
1)可以直接继承ImageView,然后在ImageView的OnDraw函数中直接绘制圆形或者方形的高亮圈;
2)也可以直接继承View,自己将Bitmap给传进来,在onDraw函数中先绘制图片,接着利用Path来绘制这个圆形或者方形的选择区域,利用Region.OP.DIFFERENCE来反向获取蒙板层。
不过利用clipPath来实现这个蒙板层的绘制,画出来的圆形会有锯齿,这个目前我还没有找到比较好的办法去掉这个锯齿,不知道有没有...
分类:
其他好文 时间:
2015-02-28 18:37:55
阅读次数:
148
Both Digiprog 3 odometer programmer and Tacho pro 2008 are top selling mileage odometer corrections tool. Do they have same and difference functions?B...
分类:
其他好文 时间:
2015-02-26 18:13:53
阅读次数:
150
The difference here is that : char *s = "hello,world!";will place hello,world in read-only part of the memmory and makes s a pointer to that. makin...
分类:
其他好文 时间:
2015-02-24 22:13:31
阅读次数:
231
Given an integer array, adjust each integers so that the difference of every adjcent integers are not greater than a given number target.If the array ...
分类:
其他好文 时间:
2015-02-23 15:26:38
阅读次数:
115
【题意】:给出两个数 m n,第一个数是另外两个数a b的和,第二个数是a b的差的绝对值(absolute difference)。输出这两个数a b,大的在前。
【思路】:大的数等于 (m+n)/2,小的等于m-大的。
【注意】:impossible的判断。分两种,一种是m如果m+n为奇数,则a b不存在。
【AC代码】:
#include
#include
#include
#...
分类:
其他好文 时间:
2015-02-23 09:40:29
阅读次数:
118
For two rational numbers, your task is to implement the basic arithmetics, that is, to calculate their sum, difference, product and quotient. Input Sp...
分类:
其他好文 时间:
2015-02-20 20:51:10
阅读次数:
221
The difference of 0 & '0' & '\0'
------------------------------------------------------------
0 is a number(decimal).
------------------------------------------------------------
'0' is a char. It...
分类:
其他好文 时间:
2015-02-18 11:52:47
阅读次数:
104
新blog地址:http://hengyunabc.github.io/netstat-difference-proc-fd-socket-stat/最近,线上一个应用,发现socket数缓慢增长,并且不回收,超过警告线之后,被运维监控自动重启了。首先到zabbix上观察JVM历史记录,发现JVM-Perm space最近两周没有数据,猜测是程序从JDK7切换到JDK8了。问过开发人员之后,程序已经...
分类:
Web程序 时间:
2015-02-17 11:42:43
阅读次数:
685
原文链接:http://www.pixelstech.net/article/1372061371-Difference-between-Beijing-and-Silicon-Valley-on-innovation...
分类:
其他好文 时间:
2015-02-13 18:36:37
阅读次数:
167
Verilog Interiew Quetions Collection :What is the difference between $display and $monitor and $write and $strobe?What is the difference between code-...
分类:
其他好文 时间:
2015-02-12 10:28:33
阅读次数:
285