[Webkit-unassigned] [Bug 28067] TransformationMatrix should have rectToRect convenience function

bugzilla-daemon at webkit.org bugzilla-daemon at webkit.org
Fri Aug 7 12:54:44 PDT 2009


https://bugs.webkit.org/show_bug.cgi?id=28067





--- Comment #12 from Darin Adler <darin at apple.com>  2009-08-07 12:54:44 PDT ---
(In reply to comment #11)
> Ah, sorry Darin.  My eyes missed the "create" comment.  I can certainly change
> it to 'createRectToRect', but I've noticed that other implementations use the
> 'rectToRect' naming pattern or 'quadToQuad'.  This is true of Qt's API and
> OpenVG API for instance.  Given that we already use such substandard naming
> patterns for consistency with other standard API's (getCTM and concatCTM come
> to mind... *ugly*) I'm not sure what is best.  'createRectToRect' seems good to
> me, but if we do that then I think we should change 'getCTM' and 'concatCTM'. 
> Better names are better names :)

Yes, I think this class is currently not using good names across the board and
is worth improving.

It seems a shame that this operation is unique at this point. The only named
constructor in the class. But I guess we've discussed it sufficiently.

> As for changing 'makeIdentity' I had looked at this, but forgot to comment.  If
> you want to create a new identity TransformationMatrix there is no reason to
> use 'makeIdentity' as the default ctor returns an identity matrix.  The only
> time someone would use 'makeIdentity' is if you wanted to reset an existing
> matrix.  To me, makeIdentity is strictly not necessary and should be private. 
> matrix = TransformationMatrix() accomplishes the same.  I can change this and
> refactor parts that use 'makeIdentity' if you like?

I'm not sure it would be an improvement. I guess we can just leave it alone for
now. The class's interface seems a little weak at the moment but I don't see an
obvious change that will make things better.

-- 
Configure bugmail: https://bugs.webkit.org/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are the assignee for the bug.



More information about the webkit-unassigned mailing list