SkMatrix::pdfTransform converts an affine skia matrix into the affine representation used for pdfs. From the ...
13 years, 6 months ago
(2011-07-13 13:43:07 UTC)
#1
SkMatrix::pdfTransform converts an affine skia matrix into the affine
representation used for pdfs. From the code, it looks like it was supposed to
use an identity matrix and return false should the skia matrix have perspective.
However, it currently always returns true. This change makes this method return
'ret'. If it should instead be always returning 'true' we should remove 'ret',
change the return type, and change the two call sites.
Of course, there is also the larger issue of whether this method should be in
this class or not, but for now we should make this method do the right thing.
If this is to be part of our public Matrix api... 1. name it something ...
13 years, 6 months ago
(2011-07-13 13:57:29 UTC)
#2
If this is to be part of our public Matrix api...
1. name it something matrixy, like asAffine()
2. if it can't fulfill the request (i.e. returns false), it should leave the
parameter untouched, rather than set it to some (incorrect) value.
3. the dox need to be explicit about the order of the returned values (i.e.
transform[0] = scale-x, etc.)
4. as a convenience, if the parameter is null, it could ignore it and still
return true or false
http://codereview.appspot.com/4704044/diff/13002/include/core/SkMatrix.h File include/core/SkMatrix.h (right): http://codereview.appspot.com/4704044/diff/13002/include/core/SkMatrix.h#newcode97 include/core/SkMatrix.h:97: */ Can we name this enum? (not sure, but ...
13 years, 6 months ago
(2011-07-13 19:08:21 UTC)
#5
Issue 4704044: Correct return for pdfTransform.
(Closed)
Created 13 years, 6 months ago by bungeman
Modified 13 years, 6 months ago
Reviewers: Steve VanDeBogart, reed1
Base URL: http://skia.googlecode.com/svn/trunk/
Comments: 3