[webkit-dev] Int/FloatPoint and Int/FloatSize

Simon Fraser simon.fraser at apple.com
Thu Jan 3 21:15:26 PST 2013

On Jan 3, 2013, at 7:43 PM, Steve Block wrote:

> Thanks all for the detailed replies.
> I wasn't aware of the distinction made between points and vectors for
> the purposes transforms. However, if I understand things correctly,
> introducing a vector type could be considered separately from the
> issue I initially raised.
> It seems that everyone is agreed that xxxSize should be used only when
> you really want to represent a size. A good first step would be trying
> to enforce this, such that all points and vectors are represented with
> xxxPoint. As Shawn points out, when doing this, we need to make sure
> that we continue to use the correct homogeneous coordinate for
> transforms. Removing the existing subtraction operator (xxxPoint minus
> xxxPoint returns xxxSize) might be a good place to start.

I find point - point = size quite useful in general, and it seems to make logical sense.

> Introducing the concept of a vector could then be done in a second phase.

What would you call this type, avoiding confusion with Vector<>?


More information about the webkit-dev mailing list