Bug 1077119 - Remove the gfxContext methods for getting various types of path extents. r=Bas
--- a/gfx/thebes/gfxContext.cpp
+++ b/gfx/thebes/gfxContext.cpp
@@ -1154,48 +1154,16 @@ bool
gfxContext::PointInStroke(const gfxPoint& pt)
{
EnsurePath();
return mPath->StrokeContainsPoint(CurrentState().strokeOptions,
ToPoint(pt),
Matrix());
}
-gfxRect
-gfxContext::GetUserPathExtent()
-{
- if (mPathIsRect) {
- return ThebesRect(mTransform.TransformBounds(mRect));
- }
- EnsurePath();
- return ThebesRect(mPath->GetBounds());
-}
-
-gfxRect
-gfxContext::GetUserFillExtent()
-{
- if (mPathIsRect) {
- return ThebesRect(mTransform.TransformBounds(mRect));
- }
- EnsurePath();
- return ThebesRect(mPath->GetBounds());
-}
-
-gfxRect
-gfxContext::GetUserStrokeExtent()
-{
- if (mPathIsRect) {
- Rect rect = mRect;
- rect.Inflate(CurrentState().strokeOptions.mLineWidth / 2);
- return ThebesRect(mTransform.TransformBounds(rect));
- }
- EnsurePath();
- return ThebesRect(mPath->GetStrokedBounds(CurrentState().strokeOptions, mTransform));
-}
-
bool
gfxContext::HasError()
{
// As far as this is concerned, an Azure context is never in error.
return false;
}
void
--- a/gfx/thebes/gfxContext.h
+++ b/gfx/thebes/gfxContext.h
@@ -597,23 +597,16 @@ public:
PopGroupToSurface(mozilla::gfx::Matrix* aMatrix);
/**
** Hit Testing - check if given point is in the current path
**/
bool PointInFill(const gfxPoint& pt);
bool PointInStroke(const gfxPoint& pt);
- /**
- ** Extents - returns user space extent of current path
- **/
- gfxRect GetUserPathExtent();
- gfxRect GetUserFillExtent();
- gfxRect GetUserStrokeExtent();
-
mozilla::gfx::Point GetDeviceOffset() const;
/**
** Flags
**/
enum {
/* If this flag is set, operators other than CLEAR, SOURCE, or