1、首先说一下canvas类: Class Overview The Canvas class holds the "draw" calls. To draw something, you need 4 basic components: A Bitmap to hold the pixels, a...
分类:
移动开发 时间:
2014-09-22 14:07:32
阅读次数:
317
首先需要明白dip和px代表什么意思。dip:device independent pixels(设备独立像素). 不同设备有不同的显示效果,这个和设备硬件有关。px:pixels(像素),不同的设备不同的显示屏显示效果是相同的,这是绝对像素,是多少就永远是多少不会改变。dip的换算:dip = (...
分类:
移动开发 时间:
2014-09-10 09:32:30
阅读次数:
231
getWidth():
public final int getWidth ()
Added in API level 1
Return the width of the your view.
Returns
The width of your view, in pixels....
分类:
移动开发 时间:
2014-09-08 08:32:56
阅读次数:
224
本文由PurpleSword(jzj1993)原创,转载请注明
原文网址 http://blog.csdn.net/jzj1993
1.px = Pixels,像素值
2.dp = dip = device independent pixel,设备独立像素(安卓专用虚拟像素单位)
3.density,屏幕密度
(1)近似换算关系 px = dip*...
分类:
移动开发 时间:
2014-09-04 22:22:50
阅读次数:
291
响应式理念:响应式网页不仅仅是响应不同类型的设备,而且需要响应不同的用户需求。响应式的初衷是为了让信息更好的传递交流,让所有人无障碍的获取信息,同时这也是 Web 的初衷。一、rem的定义 网页中常用的文字大小单位是 px(Pixels),em,现在新增了 rem 这个单位。 「rem」是指...
分类:
其他好文 时间:
2014-09-04 16:35:49
阅读次数:
247
Description
Shuffling the pixels in a bitmap image sometimes yields random looking images. However, by repeating the shuffling enough times, one finally recovers the original images. This should ...
分类:
其他好文 时间:
2014-09-01 15:39:53
阅读次数:
230
三者均用于获取一个Dom节点的高度,不过他们的含义并不相同。clientHeight :MDN对该属性的描述如下:TheElement.clientHeightread-only property returns the inner height of an element in pixels, i...
分类:
编程语言 时间:
2014-08-30 22:52:40
阅读次数:
312
一种是直接对Bitmap的像素进行操作,如:叠加、边框、怀旧、(高斯)模糊、锐化(拉普拉斯变换)。Bitmap.getPixels(srcPixels, 0, width, 0, 0, width, height); newR = (int) (pixR * alpha + layR * (1 -....
分类:
编程语言 时间:
2014-08-29 21:20:58
阅读次数:
382
有几个概念以及相关公式先理解下:1、dp:device independent pixels(设备独立像素),是像素和密度的比dp = px / density2、dpi(dot per inch每英寸的点数)和ppi相等,是屏幕对角线的像素数和屏幕尺寸的比例dpi = ppi = (√(scree...
分类:
移动开发 时间:
2014-08-22 16:06:58
阅读次数:
250
Given a infinite number of quarters(25cents), dimens(10cents), nickels(5cents) and pennies(1cent), write code to calculate the number of ways of repre...
分类:
其他好文 时间:
2014-08-21 12:56:04
阅读次数:
260