mirror of
https://github.com/mozilla/gecko-dev.git
synced 2024-10-08 19:04:45 +00:00
Bug 1369904 - Bounding box should not include control points. r=lsalzman
This commit is contained in:
parent
8cda8dcb70
commit
f055bf18d2
@ -228,6 +228,11 @@
|
||||
stroke="black" stroke-width="8" stroke-linejoin="round" fill="lightcyan"
|
||||
clip-path="url('#circle7')" marker-mid="url(#m_atr)"/>
|
||||
|
||||
<path id="path13" d="M50,0 C 130,0 50,0 100,50
|
||||
C 100,130 100,50 50,100
|
||||
C -30,100 50,100 0,50
|
||||
C 0,-30 0,50 50,0Z" />
|
||||
|
||||
<!-- use -->
|
||||
<use id="use1" xlink:href="#rect-10" x="50" y="50" clip-path="url('#circle8')"/>
|
||||
<use id="use2" xlink:href="#rect-11" x="50" y="50" clip-path="url('#circle9')"/>
|
||||
|
Before Width: | Height: | Size: 20 KiB After Width: | Height: | Size: 20 KiB |
@ -162,6 +162,7 @@ function run()
|
||||
checkBBox("path10", opt, 10,25,100,75, 0);
|
||||
checkBBox("path11", opt, 160,25,100,75, 0);
|
||||
checkBBox("path12", opt, 10,125,100,75, 0);
|
||||
checkBBox("path13", opt, 0,0,100,100, 0);
|
||||
|
||||
opt = { fill: false, stroke: true, markers: false, clipped: false };
|
||||
checkBBox("path1", opt, 2,17,116,91, 0);
|
||||
|
@ -175,7 +175,7 @@ PathSkia::GetBounds(const Matrix &aTransform) const
|
||||
return Rect();
|
||||
}
|
||||
|
||||
Rect bounds = SkRectToRect(mPath.getBounds());
|
||||
Rect bounds = SkRectToRect(mPath.computeTightBounds());
|
||||
return aTransform.TransformBounds(bounds);
|
||||
}
|
||||
|
||||
@ -195,7 +195,7 @@ PathSkia::GetStrokedBounds(const StrokeOptions &aStrokeOptions,
|
||||
SkPath result;
|
||||
paint.getFillPath(mPath, &result);
|
||||
|
||||
Rect bounds = SkRectToRect(result.getBounds());
|
||||
Rect bounds = SkRectToRect(result.computeTightBounds());
|
||||
return aTransform.TransformBounds(bounds);
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user