Closed
Bug 1090934
Opened 10 years ago
Closed 10 years ago
Calculate the bounds of SVG line elements using Math
Categories
(Core :: SVG, defect)
Core
SVG
Tracking
()
RESOLVED
FIXED
mozilla38
People
(Reporter: jwatt, Assigned: longsonr)
References
(Blocks 1 open bug)
Details
Attachments
(1 file, 6 obsolete files)
(deleted),
patch
|
jwatt
:
review+
|
Details | Diff | Splinter Review |
No description provided.
Assignee | ||
Comment 1•10 years ago
|
||
Are you working on this Jonathan?
Reporter | ||
Comment 2•10 years ago
|
||
No, feel free to take it.
Assignee | ||
Comment 3•10 years ago
|
||
Assignee: jwatt → longsonr
Attachment #8527352 -
Flags: review?(jwatt)
Assignee | ||
Updated•10 years ago
|
Attachment #8527352 -
Attachment is obsolete: true
Attachment #8527352 -
Flags: review?(jwatt)
Assignee | ||
Comment 4•10 years ago
|
||
Attachment #8532818 -
Flags: review?(jwatt)
Assignee | ||
Comment 5•10 years ago
|
||
Attachment #8532818 -
Attachment is obsolete: true
Attachment #8532818 -
Flags: review?(jwatt)
Attachment #8532822 -
Flags: review?(jwatt)
Assignee | ||
Comment 6•10 years ago
|
||
Attachment #8532822 -
Attachment is obsolete: true
Attachment #8532822 -
Flags: review?(jwatt)
Attachment #8532897 -
Flags: review?(jwatt)
Assignee | ||
Comment 7•10 years ago
|
||
Attachment #8532897 -
Attachment is obsolete: true
Attachment #8532897 -
Flags: review?(jwatt)
Attachment #8532899 -
Flags: review?(jwatt)
Assignee | ||
Comment 8•10 years ago
|
||
Attachment #8532899 -
Attachment is obsolete: true
Attachment #8532899 -
Flags: review?(jwatt)
Attachment #8532928 -
Flags: review?(jwatt)
Assignee | ||
Comment 9•10 years ago
|
||
Attachment #8532928 -
Attachment is obsolete: true
Attachment #8532928 -
Flags: review?(jwatt)
Attachment #8532957 -
Flags: review?(jwatt)
Reporter | ||
Comment 10•10 years ago
|
||
Comment on attachment 8532957 [details] [diff] [review]
math.txt
Review of attachment 8532957 [details] [diff] [review]:
-----------------------------------------------------------------
::: dom/svg/SVGLineElement.cpp
@@ +144,5 @@
> + if (!hasStroke) {
> + *aBounds = Rect(aTransform * Point(x1, y1), Size());
> + aBounds->ExpandToEnclose(aTransform * Point(x2, y2));
> + return true;
> + }
Seems like this is valid whether or not !aTransform.IsRectilinear() so this could happen at the top, and just be if |aStrokeWidth <= 0|, avoiding the need for |hasStroke|.
@@ +146,5 @@
> + aBounds->ExpandToEnclose(aTransform * Point(x2, y2));
> + return true;
> + }
> +
> + if (aCapStyle == CapStyle::ROUND) {
You could then move the !aTransform.IsRectilinear() check in here.
@@ +166,5 @@
> + Float ratio = aStrokeWidth / 2.f / length;
> + xDelta = ratio * (y2 - y1);
> + yDelta = ratio * (x2 - x1);
> + }
> + } else {
MOZ_ASSERT(aCapStyle == CapStyle::SQUARE) here.
Attachment #8532957 -
Flags: review?(jwatt) → review+
Assignee | ||
Comment 11•10 years ago
|
||
Assignee | ||
Comment 12•10 years ago
|
||
Flags: in-testsuite-
Status: NEW → RESOLVED
Closed: 10 years ago
Resolution: --- → FIXED
Target Milestone: --- → mozilla38
You need to log in
before you can comment on or make changes to this bug.
Description
•