[dia] [transform] xfig: finally support object transformation via draw_object()
- From: Hans Breuer <hans src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [dia] [transform] xfig: finally support object transformation via draw_object()
- Date: Sat, 18 Oct 2014 13:10:19 +0000 (UTC)
commit 8cfe5c001d6c9360cb85687df1c19f8892149e15
Author: Hans Breuer <hans breuer org>
Date: Sat Oct 11 20:23:23 2014 +0200
[transform] xfig: finally support object transformation via draw_object()
a given matrix was turned to a g_warning() in 2010 with commit
cd3b2398704b7c08b9c3e42cd32bac2c78dc7370 but forgotten in 2013 when
DiaTransformRenderer was introduced with commit
507f0cbc725115d14933372272bd67569bee367f
plug-ins/xfig/xfig-export.c | 18 +++++++++++++-----
1 files changed, 13 insertions(+), 5 deletions(-)
---
diff --git a/plug-ins/xfig/xfig-export.c b/plug-ins/xfig/xfig-export.c
index d7c6e1a..4ea32ba 100644
--- a/plug-ins/xfig/xfig-export.c
+++ b/plug-ins/xfig/xfig-export.c
@@ -47,6 +47,7 @@
#include "properties.h"
#include "dia_image.h"
#include "group.h"
+#include "diatransformrenderer.h"
#include "xfig.h"
@@ -1064,13 +1065,20 @@ draw_object(DiaRenderer *self,
{
XfigRenderer *renderer = XFIG_RENDERER(self);
- if (!renderer->color_pass)
+ if (renderer->color_pass) {
+ /* color pass does not need transformation */
+ object->ops->draw(object, DIA_RENDERER(renderer));
+ } else {
fprintf(renderer->file, "6 0 0 0 0\n");
- if (matrix)
- g_warning ("XFigRenderer no transformations");
- object->ops->draw(object, DIA_RENDERER(renderer));
- if (!renderer->color_pass)
+ if (matrix) {
+ DiaRenderer *tr = dia_transform_renderer_new (self);
+ DIA_RENDERER_GET_CLASS(tr)->draw_object (tr, object, matrix);
+ g_object_unref (tr);
+ } else {
+ object->ops->draw(object, DIA_RENDERER(renderer));
+ }
fprintf(renderer->file, "-6\n");
+ }
}
static gboolean
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]