summaryrefslogtreecommitdiffstats
path: root/chalk
diff options
context:
space:
mode:
Diffstat (limited to 'chalk')
-rw-r--r--chalk/ConfigureChecks.cmake65
-rw-r--r--chalk/core/kis_painter.cpp8
2 files changed, 69 insertions, 4 deletions
diff --git a/chalk/ConfigureChecks.cmake b/chalk/ConfigureChecks.cmake
new file mode 100644
index 000000000..6a7e6fa1e
--- /dev/null
+++ b/chalk/ConfigureChecks.cmake
@@ -0,0 +1,65 @@
+###############################################################################
+# Trinity KOffice #
+# --------------- #
+# This file is licensed under the terms of GNU GPL v3 or later. #
+# Improvements and feedback are welcome. #
+###############################################################################
+
+check_symbol_exists("powf" "math.h" HAVE_MATH_POWF)
+
+### XInput ####################################################################
+pkg_search_module(XINPUT xi)
+if (NOT XINPUT_FOUND)
+ tde_message_fatal("XInput is required for Chalk, but was not found")
+endif()
+
+### LittleCMS #################################################################
+pkg_search_module(LCMS lcms)
+if (NOT LCMS_FOUND)
+ tde_message_fatal("lcms1 is required for Chalk, but was not found")
+endif()
+
+### OpenGL ####################################################################
+check_include_file("GL/gl.h" HAVE_GL_H)
+check_include_file("GL/glu.h" HAVE_GLU_H)
+
+if (NOT HAVE_GL_H OR NOT HAVE_GLU_H)
+ tde_message_fatal("OpenGL is required for Chalk, but headers are missing")
+endif()
+
+### EXIF ######################################################################
+pkg_search_module(EXIF libexif)
+if (NOT EXIF_FOUND)
+ message(WARNING "libexif is missing, "
+ "Chalk won't be able to import/export JPEG files")
+endif()
+
+### JPEG ######################################################################
+find_package(JPEG)
+if (NOT JPEG_FOUND)
+ message(WARNING "libjpeg is missing, "
+ "Chalk won't be able to import/export JPEG files")
+endif()
+
+### PNG #######################################################################
+find_package(PNG)
+if (NOT PNG_FOUND)
+ message(WARNING "libpng is missing, "
+ "Chalk won't be able to import/export PNG files")
+endif()
+
+### TIFF ######################################################################
+find_package(TIFF)
+if (NOT TIFF_FOUND)
+ message(WARNING "libtiff is missing, "
+ "Chalk won't be able to import/export TIFF files")
+endif()
+
+### poppler-tqt ###############################################################
+pkg_search_module(POPPLER poppler-tqt)
+if (NOT POPPLER_FOUND)
+ message(WARNING "poppler-tqt is missing, "
+ "Chalk won't be able to import PDF files")
+endif()
+
+# kate: indent-width 2; replace-tabs true; \ No newline at end of file
diff --git a/chalk/core/kis_painter.cpp b/chalk/core/kis_painter.cpp
index f3f5c9286..bb41fdfc0 100644
--- a/chalk/core/kis_painter.cpp
+++ b/chalk/core/kis_painter.cpp
@@ -625,10 +625,10 @@ void KisPainter::paintEllipse (const KisPoint &startPoint,
KisRect r = KisRect(startPoint, endPoint).normalize();
// See http://www.whizkidtech.redprince.net/bezier/circle/ for explanation.
- // kappa = (4/3*(sqrt(2)-1))
- const double kappa = 0.5522847498;
- const double lx = (r.width() / 2) * kappa;
- const double ly = (r.height() / 2) * kappa;
+ // tdeAppa = (4/3*(sqrt(2)-1))
+ const double tdeAppa = 0.5522847498;
+ const double lx = (r.width() / 2) * tdeAppa;
+ const double ly = (r.height() / 2) * tdeAppa;
KisPoint center = r.center();