add width()/height() getters
git-svn-id: http://skia.googlecode.com/svn/trunk@226 2bbb7eff-a529-9590-31e7-b0007b416f81
This commit is contained in:
parent
90e764e3d9
commit
086f2896e0
@ -28,6 +28,9 @@ template <typename T> struct SkTSize {
|
|||||||
fWidth = fHeight = 0;
|
fWidth = fHeight = 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
T width() const { return fWidth; }
|
||||||
|
T height() const { return fHeight; }
|
||||||
|
|
||||||
/** If width or height is < 0, it is set to 0 */
|
/** If width or height is < 0, it is set to 0 */
|
||||||
void clampNegToZero() {
|
void clampNegToZero() {
|
||||||
if (fWidth < 0) {
|
if (fWidth < 0) {
|
||||||
|
Loading…
Reference in New Issue
Block a user