[libchamplainmm] Wrap ChamplainImageRenderer



commit b3678ae73229d1770aafd169c7b021a69963e804
Author: Juan R. García Blanco <juanrgar gmail com>
Date:   Sat Aug 2 12:00:06 2014 +0200

    Wrap ChamplainImageRenderer
    
        * champlain/champlainmm.h: Add image-renderer.h.
        * champlain/champlainmm/.gitignore: Ignore image-renderer.*.
        * champlain/src/filelist.am: Add image-renderer.hg.
        * champlain/src/image-renderer.[hg|ccg]: New files.
        * tools/extradefs/generate_extra_defs_libchamplain.cc: Add
        CHAMPLAIN_TYPE_IMAGE_RENDERER.

 champlain/champlainmm.h                            |    1 +
 champlain/champlainmm/.gitignore                   |    1 +
 champlain/src/champlain_signals.defs               |    2 +
 champlain/src/filelist.am                          |    1 +
 champlain/src/image-renderer.ccg                   |   23 ++++++++++
 champlain/src/image-renderer.hg                    |   46 ++++++++++++++++++++
 .../extradefs/generate_extra_defs_libchamplain.cc  |    1 +
 7 files changed, 75 insertions(+), 0 deletions(-)
---
diff --git a/champlain/champlainmm.h b/champlain/champlainmm.h
index 3f03d93..6505cc5 100644
--- a/champlain/champlainmm.h
+++ b/champlain/champlainmm.h
@@ -29,6 +29,7 @@
 #include <champlainmm/defines.h>
 #include <champlainmm/file-cache.h>
 #include <champlainmm/file-tile-source.h>
+#include <champlainmm/image-renderer.h>
 #include <champlainmm/layer.h>
 #include <champlainmm/license.h>
 #include <champlainmm/map-source-desc.h>
diff --git a/champlain/champlainmm/.gitignore b/champlain/champlainmm/.gitignore
index 72cbc11..6849607 100644
--- a/champlain/champlainmm/.gitignore
+++ b/champlain/champlainmm/.gitignore
@@ -3,6 +3,7 @@ coordinate.*
 defines.*
 file-cache.*
 file-tile-source.*
+image-renderer.*
 label.*
 layer.*
 license.*
diff --git a/champlain/src/champlain_signals.defs b/champlain/src/champlain_signals.defs
index c574410..b939ca7 100644
--- a/champlain/src/champlain_signals.defs
+++ b/champlain/src/champlain_signals.defs
@@ -24,6 +24,8 @@
 
 ;; From ChamplainFileTileSource
 
+;; From ChamplainImageRenderer
+
 ;; From ChamplainLabel
 
 (define-property image
diff --git a/champlain/src/filelist.am b/champlain/src/filelist.am
index ce18906..5f1e38a 100644
--- a/champlain/src/filelist.am
+++ b/champlain/src/filelist.am
@@ -16,6 +16,7 @@ files_hg  =                                   \
        defines.hg                              \
        file-cache.hg                           \
        file-tile-source.hg                             \
+       image-renderer.hg                               \
        layer.hg                                \
        license.hg                              \
        location.hg                             \
diff --git a/champlain/src/image-renderer.ccg b/champlain/src/image-renderer.ccg
new file mode 100644
index 0000000..98e7f82
--- /dev/null
+++ b/champlain/src/image-renderer.ccg
@@ -0,0 +1,23 @@
+/* Copyright (c) 2014  Juan R. García Blanco <juanrgar gmail com>
+ *
+ * This file is part of libchamplainmm.
+ *
+ * libchamplainmm is free software: you can redistribute it and/or modify it
+ * under the terms of the GNU Lesser General Public License as published
+ * by the Free Software Foundation, either version 2.1 of the License,
+ * or (at your option) any later version.
+ *
+ * libchamplainmm is distributed in the hope that it will be useful, but
+ * WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
+ * See the GNU Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public License
+ * along with this program.  If not, see <http://www.gnu.org/licenses/>.
+ */
+
+#include <champlain/champlain.h>
+
+namespace Champlain
+{
+} // namespace Champlain
diff --git a/champlain/src/image-renderer.hg b/champlain/src/image-renderer.hg
new file mode 100644
index 0000000..ab2a0fe
--- /dev/null
+++ b/champlain/src/image-renderer.hg
@@ -0,0 +1,46 @@
+/* Copyright (c) 2014  Juan R. García Blanco <juanrgar gmail com>
+ *
+ * This file is part of libchamplainmm.
+ *
+ * libchamplainmm is free software: you can redistribute it and/or modify it
+ * under the terms of the GNU Lesser General Public License as published
+ * by the Free Software Foundation, either version 2.1 of the License,
+ * or (at your option) any later version.
+ *
+ * libchamplainmm is distributed in the hope that it will be useful, but
+ * WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
+ * See the GNU Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public License
+ * along with this program.  If not, see <http://www.gnu.org/licenses/>.
+ */
+
+#include <champlainmm/renderer.h>
+
+_DEFS(champlainmm,champlain)
+_PINCLUDE(champlainmm/private/renderer_p.h)
+
+namespace Champlain
+{
+
+/** A renderer that renders tiles from binary image data.
+ *
+ * ImageRenderer renders tiles from binary image data. The rendering
+ * is performed using Gdk::PixbufLoader so the set of supported image
+ * formats is equal to the set of formats supported by Gdk::PixbufLoader.
+ *
+ * @newin{0,8}
+ */
+class ImageRenderer : public Renderer
+{
+  _CLASS_GOBJECT(ImageRenderer, ChamplainImageRenderer, CHAMPLAIN_IMAGE_RENDERER, Renderer, 
ChamplainRenderer)
+
+protected:
+  _CTOR_DEFAULT
+
+public:
+  _WRAP_CREATE()
+};
+
+} // namespace Champlain
diff --git a/tools/extradefs/generate_extra_defs_libchamplain.cc 
b/tools/extradefs/generate_extra_defs_libchamplain.cc
index 1d360b1..ab8e9cd 100644
--- a/tools/extradefs/generate_extra_defs_libchamplain.cc
+++ b/tools/extradefs/generate_extra_defs_libchamplain.cc
@@ -30,6 +30,7 @@ main(int argc, char *argv[])
             << get_defs(CHAMPLAIN_TYPE_COORDINATE)
             << get_defs(CHAMPLAIN_TYPE_FILE_CACHE)
             << get_defs(CHAMPLAIN_TYPE_FILE_TILE_SOURCE)
+            << get_defs(CHAMPLAIN_TYPE_IMAGE_RENDERER)
             << get_defs(CHAMPLAIN_TYPE_LABEL)
             << get_defs(CHAMPLAIN_TYPE_LAYER)
             << get_defs(CHAMPLAIN_TYPE_LICENSE)


[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]