Matrix类包含了一个3x3的矩阵用来改变坐标,它没有一个构造器来初始化它里边的内容,所以创建实例后需要调用reset()方法生成一个标准matrix,或者调用set..一类的函数,比如setTranslate, setRotate,,该函数将会决定matrix如何来改变坐标。SDK里边没有讲述M...
分类:
移动开发 时间:
2014-12-28 18:14:40
阅读次数:
199
图片的拖拉功能是处理图片进一个有用且常用的功能,由于手机屏幕尺寸的限制,往往无法在手机上一次性的显示一张比较大的图片,也就是
说,我们在手机上一次性只能看到图片的一部分,此时就可以使用图片的拖动功能来拖动图片,进而查看图片相应的部分。
scaleType的属性值有:matrix fitXY fitStart fitCenter fitEnd center centerCrop centerInside
它们之间的区别如下:
matrix 用矩阵来绘制(从左上角起始的矩阵区域)
fitX...
分类:
移动开发 时间:
2014-12-28 16:59:00
阅读次数:
266
TFT屏幕 TFT ( Thin Film Transistor 薄膜晶体管) ,是有源矩阵类型液晶显示器(AM-LCD)中的一种,TFT在液晶的背部设置特殊光管,能够“主动的”对屏幕上的各个独立的象素进行控制,这也就是所谓的主动矩阵TFT(aCTive matrix TFT)的来历,这样能够大大....
分类:
其他好文 时间:
2014-12-26 20:18:49
阅读次数:
269
题目描述:
Given an integer n, generate a square matrix filled with elements from 1 to n2 in spiral order.
For example,
Given n = 3,
You should return the following matrix:
[
[ 1, 2, 3 ],
[ 8,...
分类:
其他好文 时间:
2014-12-26 13:03:53
阅读次数:
169
题目描述:
Write an efficient algorithm that searches for a value in an m x n matrix. This matrix has the following properties:
Integers in each row are sorted from left to right.The first inte...
分类:
其他好文 时间:
2014-12-26 11:16:55
阅读次数:
127
运算符的重载。C++的开发人员应该很熟悉这个概念,但这对Java 和 VB 开发人员确实全新的。 对于一些数值间的运算,如果通过方法来指定运算规则的话,不免会繁琐,这时就可以利用运算符的重载。 例: Matrix a,b,c; //定义矩阵对象 Marix d=c*(a+b); 如果...
求在0-1矩阵中找出面积最大的全1矩阵
Given a 2D binary matrix filled with 0's and 1's, find the largest rectangle containing all ones and return its area.
首先,想使用遍历两次的暴力方法解决是不靠谱的,先打消这个念头。
这道题的解法灵感来自于 Larg...
分类:
编程语言 时间:
2014-12-25 22:07:52
阅读次数:
259
虽说以前学习过线性代数和图形学原理,但是在实际中碰到matrix还是疑惑了好一阵子,今天通过向同事请教终于找到一点门路,特总结如下:Matrix主要用于对平面进行缩放,平移,旋转以及倾斜操作,为简化矩阵变换,Android封装了一系列方法来进行矩阵变换,其中包括pre系列方法:preScale,pr...
分类:
移动开发 时间:
2014-12-25 16:07:08
阅读次数:
173
题目描述:
You are given an n x n 2D matrix representing an image.
Rotate the image by 90 degrees (clockwise).
Follow up:
Could you do this in-place?
思路:先将行顺序reverse,然后再对每个处于下三角区域的元素rotate。
...
分类:
其他好文 时间:
2014-12-25 11:18:52
阅读次数:
125
Given a matrix of lower alphabetsand a dictionary.Find all words in the dictionary that can be found in the matrix. A word can start from any position...
分类:
其他好文 时间:
2014-12-25 06:35:39
阅读次数:
169