- From: Tab Atkins Jr. <jackalmage@gmail.com>
- Date: Fri, 20 Sep 2013 10:11:34 -0700
- To: "Robert O'Callahan" <robert@ocallahan.org>
- Cc: Simon Pieters <simonp@opera.com>, Simon Fraser <smfr@me.com>, Andrew Dupont <w3@andrewdupont.net>, www-style <www-style@w3.org>
On Thu, Sep 19, 2013 at 8:30 PM, Robert O'Callahan <robert@ocallahan.org> wrote: > For DOMRect I suggest: > [Constructor(double left, double top, double width, double height)] > For DOMQuad: > [Constructor(DOMRect rect), > Constructor(DOMPoint p1, DOMPoint p2, DOMPoint p3, DOMPoint p4)] Yeah, these are all good. > One question about the DOMRect constructor: Should we allow negative > width/height? I think not. (And APIs should never create DOMRects with > negative width/height.) We should "allow", where that means at least "not throw". I'm undecided on whether it should clamp to zero, or just construct the appropriate rectangle (with a top/left different from what you passed in). Or just go ahead and allow negative width/height directly, with the obvious mapping to a quad? That would mean that the top/left properties aren't actually the top left corner of the shape, though. > For DOMQuad, should we allow self-intersecting quads? I can't see a reason > not to. I don't see a good reason not to either, but it's easy to assume that a quad defines a convex hull, but the rare self-intersecting ones won't. We can probably leave that alone for now, and maybe add a convenience function to obtain a convex hull later. On Thu, Sep 19, 2013 at 8:35 PM, Robert O'Callahan <robert@ocallahan.org> wrote: > On Fri, Sep 20, 2013 at 3:30 PM, Robert O'Callahan <robert@ocallahan.org> > wrote: >> For DOMQuad: >> [Constructor(DOMRect rect), >> Constructor(DOMPoint p1, DOMPoint p2, DOMPoint p3, DOMPoint p4)] > > For this constructor we have to decide whether the DOMPoints are adopted or > copied, i.e. whether (new DOMQuad(a,b,c,d)).p1 == a. I say copied, i.e. not > equal, but I don't have a strong feeling about it. Yeah, copied. Unless there's a performance reason to have them be the same, so you don't generate extra objects?
Received on Friday, 20 September 2013 17:12:21 UTC