add width()/height() getters

git-svn-id: http://skia.googlecode.com/svn/trunk@226 2bbb7eff-a529-9590-31e7-b0007b416f81
This commit is contained in:
reed@android.com 2009-06-20 02:34:55 +00:00
parent 90e764e3d9
commit 086f2896e0

View File

@ -27,6 +27,9 @@ template <typename T> struct SkTSize {
void setEmpty() {
fWidth = fHeight = 0;
}
T width() const { return fWidth; }
T height() const { return fHeight; }
/** If width or height is < 0, it is set to 0 */
void clampNegToZero() {