aboutsummaryrefslogtreecommitdiffstats
path: root/libfonts_calculate_subpixel_order.c
diff options
context:
space:
mode:
authorMattias Andrée <maandree@kth.se>2022-07-22 17:12:09 +0200
committerMattias Andrée <maandree@kth.se>2022-07-22 17:13:29 +0200
commit84c0c1ff3f9666adb632b8c87b4c2f7c54f5d823 (patch)
tree5a275405ffffa4256894e0695f99cd0c71d5d312 /libfonts_calculate_subpixel_order.c
parentCalculate logical subpixel order from transformation (diff)
downloadlibfonts-84c0c1ff3f9666adb632b8c87b4c2f7c54f5d823.tar.gz
libfonts-84c0c1ff3f9666adb632b8c87b4c2f7c54f5d823.tar.bz2
libfonts-84c0c1ff3f9666adb632b8c87b4c2f7c54f5d823.tar.xz
Fix EDID reading in libfonts_get_output_dpi and make it use the output transformation
Signed-off-by: Mattias Andrée <maandree@kth.se>
Diffstat (limited to 'libfonts_calculate_subpixel_order.c')
-rw-r--r--libfonts_calculate_subpixel_order.c24
1 files changed, 1 insertions, 23 deletions
diff --git a/libfonts_calculate_subpixel_order.c b/libfonts_calculate_subpixel_order.c
index 746cece..493b9e7 100644
--- a/libfonts_calculate_subpixel_order.c
+++ b/libfonts_calculate_subpixel_order.c
@@ -1,27 +1,5 @@
/* See LICENSE file for copyright and license details. */
-#include "libfonts.h"
-
-
-#define TOLERANCE 0.000001
-
-
-static void
-transform(double *x_out, double *y_out, double x, double y, const struct libfonts_transformation *transformation)
-{
- double a = transformation->m[0][0], b = transformation->m[0][1], c = transformation->m[0][2];
- double d = transformation->m[1][0], e = transformation->m[1][1], f = transformation->m[1][2];
- double g = transformation->m[2][0], h = transformation->m[2][1], i = transformation->m[2][2];
- double w = g*x + h*y + i;
- *x_out = (a*x + b*y + c) / w;
- *y_out = (d*x + e*y + f) / w;
-}
-
-
-static int
-eq(double a, double b)
-{
- return b - TOLERANCE <= a && a <= b + TOLERANCE;
-}
+#include "common.h"
enum libfonts_subpixel_order