Summary: | Add helpers to FloatRect to compute bounding box from points | ||||||
---|---|---|---|---|---|---|---|
Product: | WebKit | Reporter: | Kenneth Russell <kbr> | ||||
Component: | Layout and Rendering | Assignee: | Kenneth Russell <kbr> | ||||
Status: | RESOLVED FIXED | ||||||
Severity: | Normal | CC: | cmarrin, jamesr, senorblanco, simon.fraser | ||||
Priority: | P2 | ||||||
Version: | 528+ (Nightly build) | ||||||
Hardware: | All | ||||||
OS: | All | ||||||
Bug Depends on: | |||||||
Bug Blocks: | 44729 | ||||||
Attachments: |
|
Description
Kenneth Russell
2010-08-31 19:15:13 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.
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.
(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. Committed r66611: <http://trac.webkit.org/changeset/66611> |