WebKit Bugzilla
New
Browse
Log In
×
Sign in with GitHub
or
Remember my login
Create Account
·
Forgot Password
Forgotten password account recovery
RESOLVED FIXED
Bug 45015
Add helpers to FloatRect to compute bounding box from points
https://bugs.webkit.org/show_bug.cgi?id=45015
Summary
Add helpers to FloatRect to compute bounding box from points
Kenneth Russell
Reported
2010-08-31 19:15:13 PDT
For some geometric algorithms, it is necessary to compute the bounding box of a set of points. Methods on FloatRect for this purpose would be very helpful.
Attachments
Patch
(5.46 KB, patch)
2010-08-31 19:19 PDT
,
Kenneth Russell
simon.fraser
: review+
kbr
: commit-queue-
Details
Formatted Diff
Diff
View All
Add attachment
proposed patch, testcase, etc.
Kenneth Russell
Comment 1
2010-08-31 19:19:59 PDT
Created
attachment 66159
[details]
Patch From the ChangeLog: Added fitToPoints, including a few overloaded variants for the cases of two, three and four points. I opted not to add a generalized version taking const FloatRect* or Vector<FloatRect> at the present time because for my own purposes they are unnecessary, and the specific versions can be more tightly coded. Also added left() and top() for symmetry with right() and bottom(). These changes have been tested with new code to be added later.
Simon Fraser (smfr)
Comment 2
2010-08-31 20:24:07 PDT
Comment on
attachment 66159
[details]
Patch r=me but please look at FloatQuad and see if any of the methods in there could be updated.
Kenneth Russell
Comment 3
2010-09-01 09:56:59 PDT
(In reply to
comment #2
)
> (From update of
attachment 66159
[details]
) > r=me but please look at FloatQuad and see if any of the methods in there could be updated.
I checked the FloatQuad class but none of these changes apply there.
Kenneth Russell
Comment 4
2010-09-01 09:59:24 PDT
Committed
r66611
: <
http://trac.webkit.org/changeset/66611
>
Note
You need to
log in
before you can comment on or make changes to this bug.
Top of Page
Format For Printing
XML
Clone This Bug