- From: Robert O'Callahan <robert@ocallahan.org>
- Date: Tue, 7 Jan 2014 00:37:20 +1300
- To: "public-fx@w3.org" <public-fx@w3.org>
- Message-ID: <CAOp6jLbnmze43HbRbzhBDHogDWEUG6u1DhXRXCGYoqXEhy68Xw@mail.gmail.com>
It's unclear how to compute the bounds rect from the points in the DOMQuad.
We're told it's "live", and that after constructing a DOMQuad from a
DOMRectReadOnly, 'bounds' matches the rect, so quad.bounds.x = quad.p1.x.
But if someone constructs a DOMQuad({x:2},{x:0},{x:4}) then quad.bounds.x
can't be quad.p1.x (2), it must be either 0 or 4. It's not clear which one
it should be. It seems difficult to define 'bounds' in a simple way that
gives sensible results for live updates and satisfies quad.bounds.x =
quad.p1.x whenever the quad was constructed from a DOMRectReadOnly.
The simplest solution is to set quad.bounds.x to the mininum x over all
points, and quad.bounds.width to the difference between the maximum xs and
the mininum xs, dropping the requirement that 'bounds' matches the
DOMRectReadOnly used to construct a quad.
Rob
--
Jtehsauts tshaei dS,o n" Wohfy Mdaon yhoaus eanuttehrotraiitny eovni
le atrhtohu gthot sf oirng iyvoeu rs ihnesa.r"t sS?o Whhei csha iids teoa
stiheer :p atroa lsyazye,d 'mYaonu,r "sGients uapr,e tfaokreg iyvoeunr,
'm aotr atnod sgaoy ,h o'mGee.t" uTph eann dt hwea lmka'n? gBoutt uIp
waanndt wyeonut thoo mken.o w
Received on Monday, 6 January 2014 11:37:48 UTC