[Webkit-unassigned] [Bug 28067] TransformationMatrix should have rectToRect convenience function
bugzilla-daemon at webkit.org
bugzilla-daemon at webkit.org
Fri Aug 7 11:28:10 PDT 2009
https://bugs.webkit.org/show_bug.cgi?id=28067
--- Comment #11 from Adam Treat <treat at kde.org> 2009-08-07 11:28:09 PDT ---
(In reply to comment #10)
> (In reply to comment #4)
> > makeRectToRect is ugly imo. In this case, we want to create a transform from
> > scratch, not modify an existing one.
>
> OK, that addresses one of my comments.
>
> What about the comment that we normally use the name "create" in all of our
> named constructor names?
>
> And what about changing makeIdentity?
>
> It seems like you responded to one part of the comment and didn't address the
> rest. I'd really like to hear your thoughts.
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 :)
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?
--
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