summaryrefslogtreecommitdiff
path: root/include/freetype/internal/ftcalc.h
diff options
context:
space:
mode:
Diffstat (limited to 'include/freetype/internal/ftcalc.h')
-rw-r--r--include/freetype/internal/ftcalc.h15
1 files changed, 15 insertions, 0 deletions
diff --git a/include/freetype/internal/ftcalc.h b/include/freetype/internal/ftcalc.h
index a04a3cb80..38c6f7741 100644
--- a/include/freetype/internal/ftcalc.h
+++ b/include/freetype/internal/ftcalc.h
@@ -293,6 +293,21 @@ FT_BEGIN_HEADER
/*
+ * Check a matrix. If the transformation would lead to extreme shear or
+ * extreme scaling, for example, return 0. If everything is OK, return 1.
+ *
+ * Based on geometric considerations we use the following inequality to
+ * identify a degenerate matrix.
+ *
+ * 50 * abs(xx*yy - xy*yx) < xx^2 + xy^2 + yx^2 + yy^2
+ *
+ * Value 50 is heuristic.
+ */
+ FT_BASE( FT_Bool )
+ FT_Matrix_Check( const FT_Matrix* matrix );
+
+
+ /*
* A variant of FT_Vector_Transform. See comments for
* FT_Matrix_Multiply_Scaled.
*/