Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(63)

Side by Side Diff: include/utils/SkMatrix44.h

Issue 508303005: SkMatrix44::preserves2dAxisAlignment() (Closed) Base URL: https://skia.googlesource.com/skia.git@master
Patch Set: Fix perspective check, add tolerance Created 6 years, 3 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
« no previous file with comments | « no previous file | src/utils/SkMatrix44.cpp » ('j') | tests/Matrix44Test.cpp » ('J')
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 /* 1 /*
2 * Copyright 2011 Google Inc. 2 * Copyright 2011 Google Inc.
3 * 3 *
4 * Use of this source code is governed by a BSD-style license that can be 4 * Use of this source code is governed by a BSD-style license that can be
5 * found in the LICENSE file. 5 * found in the LICENSE file.
6 */ 6 */
7 7
8 #ifndef SkMatrix44_DEFINED 8 #ifndef SkMatrix44_DEFINED
9 #define SkMatrix44_DEFINED 9 #define SkMatrix44_DEFINED
10 10
(...skipping 355 matching lines...) Expand 10 before | Expand all | Expand 10 after
366 * map an array of [x, y, 0, 1] through the matrix, returning an array 366 * map an array of [x, y, 0, 1] through the matrix, returning an array
367 * of [x', y', z', w']. 367 * of [x', y', z', w'].
368 * 368 *
369 * @param src2 array of [x, y] pairs, with implied z=0 and w=1 369 * @param src2 array of [x, y] pairs, with implied z=0 and w=1
370 * @param count number of [x, y] pairs in src2 370 * @param count number of [x, y] pairs in src2
371 * @param dst4 array of [x', y', z', w'] quads as the output. 371 * @param dst4 array of [x', y', z', w'] quads as the output.
372 */ 372 */
373 void map2(const float src2[], int count, float dst4[]) const; 373 void map2(const float src2[], int count, float dst4[]) const;
374 void map2(const double src2[], int count, double dst4[]) const; 374 void map2(const double src2[], int count, double dst4[]) const;
375 375
376 bool preserves2dAxisAlignment () const;
377
376 void dump() const; 378 void dump() const;
377 379
378 double determinant() const; 380 double determinant() const;
379 381
380 private: 382 private:
381 SkMScalar fMat[4][4]; 383 SkMScalar fMat[4][4];
382 mutable unsigned fTypeMask; 384 mutable unsigned fTypeMask;
383 385
384 enum { 386 enum {
385 kUnknown_Mask = 0x80, 387 kUnknown_Mask = 0x80,
(...skipping 27 matching lines...) Expand all
413 /** 415 /**
414 * Does not take the time to 'compute' the typemask. Only returns true if 416 * Does not take the time to 'compute' the typemask. Only returns true if
415 * we already know that this matrix is identity. 417 * we already know that this matrix is identity.
416 */ 418 */
417 inline bool isTriviallyIdentity() const { 419 inline bool isTriviallyIdentity() const {
418 return 0 == fTypeMask; 420 return 0 == fTypeMask;
419 } 421 }
420 }; 422 };
421 423
422 #endif 424 #endif
OLDNEW
« no previous file with comments | « no previous file | src/utils/SkMatrix44.cpp » ('j') | tests/Matrix44Test.cpp » ('J')

Powered by Google App Engine
This is Rietveld 408576698