- From: Rik Cabanier <cabanier@gmail.com>
- Date: Sun, 16 Oct 2016 09:40:19 -0700
- To: Simon Fraser <smfr@me.com>
- Cc: "public-fx@w3.org" <public-fx@w3.org>
Received on Sunday, 16 October 2016 16:40:47 UTC
On Sat, Oct 15, 2016 at 2:47 PM, Simon Fraser <smfr@me.com> wrote: > https://drafts.fxtf.org/geometry/#DOMRect > > Allowing negative height and width leads to additional complexity in the > implementation that I don’t see a compelling use case for, and prevents > DOMRect being implemented in terms of existing Rect classes that always > normalize rectangles to have zero or positive height and width. > > Since the arguments allow negative height and width, we could add a > normalization step that either clamps negative values to zero, or > normalizes the rect by recomputing x and y. > We allowed negative width and height because it's already allowed in Canvas 2D [1] and it's a useful construct to have (ie if you want to change the winding of the path) 1: https://www.w3.org/TR/2dcontext/#dom-context-2d-fillrect
Received on Sunday, 16 October 2016 16:40:47 UTC