aboutsummaryrefslogtreecommitdiffhomepage
path: root/src/pathops/SkPathOpsRect.h
diff options
context:
space:
mode:
Diffstat (limited to 'src/pathops/SkPathOpsRect.h')
-rw-r--r--src/pathops/SkPathOpsRect.h9
1 files changed, 8 insertions, 1 deletions
diff --git a/src/pathops/SkPathOpsRect.h b/src/pathops/SkPathOpsRect.h
index 7b516a40f5..2c47f43b88 100644
--- a/src/pathops/SkPathOpsRect.h
+++ b/src/pathops/SkPathOpsRect.h
@@ -27,7 +27,6 @@ struct SkDRect {
}
}
- // FIXME: used by debugging only ?
bool contains(const SkDPoint& pt) const {
return approximately_between(fLeft, pt.fX, fRight)
&& approximately_between(fTop, pt.fY, fBottom);
@@ -46,6 +45,14 @@ struct SkDRect {
fTop = fBottom = pt.fY;
}
+ double width() const {
+ return fRight - fLeft;
+ }
+
+ double height() const {
+ return fBottom - fTop;
+ }
+
void setBounds(const SkDLine&);
void setBounds(const SkDCubic&);
void setBounds(const SkDQuad&);