[dia: 48/105] #19: Port 'wmf' plugin.
- From: Zander <zbrown src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [dia: 48/105] #19: Port 'wmf' plugin.
- Date: Mon, 28 Jan 2019 19:23:22 +0000 (UTC)
commit f2f4f9263e292ec5e532e390da1407e00968023c
Author: Eduard Nicodei <eddnicodei gmail com>
Date: Tue Jan 1 20:11:39 2019 +0000
#19: Port 'wmf' plugin.
- s/int/wmfint/g in RoundRect prototype to be same as in wmf_gdi.h.
meson.build | 2 ++
plug-ins/meson.build | 3 +--
plug-ins/wmf/meson.build | 23 +++++++++++++++++++++++
plug-ins/wmf/wmf_gdi.cpp | 2 +-
4 files changed, 27 insertions(+), 3 deletions(-)
---
diff --git a/meson.build b/meson.build
index 4ed8b454..631d2ca1 100644
--- a/meson.build
+++ b/meson.build
@@ -30,6 +30,8 @@ freetype_dep = dependency('freetype2', version: '>= 11.0.5', required: false)
conf.set('HAVE_FREETYPE', freetype_dep.found())
libpoppler_dep = dependency('poppler', version: '<= 0.62.0', required: false)
conf.set('HAVE_POPPLER', libpoppler_dep.found())
+libemf_dep = cc.find_library('emf', required: false)
+conf.set('HAVE_LIBEMF', libemf_dep.found())
libogdf_dep = cc.find_library('ogdf', required: false)
conf.set('HAVE_OGDF', libogdf_dep.found())
diff --git a/plug-ins/meson.build b/plug-ins/meson.build
index fd3b2448..654cd5cd 100644
--- a/plug-ins/meson.build
+++ b/plug-ins/meson.build
@@ -26,10 +26,9 @@ subdir('python') # Non-standard: shared_module
subdir('stress') # Non-standard: does not get installed.
subdir('svg')
subdir('vdx')
-#subdir('wmf')
+subdir('wmf') # Non-standard: Only installs if libemf present.
subdir('wpg')
subdir('xfig')
-
#subdir('xslt')
foreach p : install_plugins_desc
diff --git a/plug-ins/wmf/meson.build b/plug-ins/wmf/meson.build
new file mode 100644
index 00000000..2f6e5d2d
--- /dev/null
+++ b/plug-ins/wmf/meson.build
@@ -0,0 +1,23 @@
+sources = files('wmf.cpp')
+
+deps = [libemf_dep]
+
+if not libemf_dep.found()
+ sources += files('wmf_gdi.cpp')
+endif
+
+# TODO: test this on Windows.
+if host_machine.system() == 'windows'
+ sources += files('paginate_gdiprint.cpp')
+ deps += [cc.find_library('comdlg32')]
+endif
+
+library(
+ 'wmf_filter',
+ sources,
+ dependencies: [libgtk_dep, libm_dep, libxml_dep] + deps,
+ include_directories: [libdia_inc, configuration_inc],
+ link_with: [libdia],
+ install: libemf_dep.found(),
+ install_dir: dialibdir
+)
diff --git a/plug-ins/wmf/wmf_gdi.cpp b/plug-ins/wmf/wmf_gdi.cpp
index ca19eb24..56a88302 100644
--- a/plug-ins/wmf/wmf_gdi.cpp
+++ b/plug-ins/wmf/wmf_gdi.cpp
@@ -342,7 +342,7 @@ Rectangle(HDC hdc, wmfint iLeft, wmfint iTop, wmfint iRight, wmfint iBottom)
}
BOOL
-RoundRect(HDC hdc, int iLeft, int iTop, int iRight, int iBottom, int iWidth, int iHeight)
+RoundRect(HDC hdc, wmfint iLeft, wmfint iTop, wmfint iRight, wmfint iBottom, wmfint iWidth, wmfint iHeight)
{
g_return_val_if_fail(hdc != NULL, FALSE);
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]