]> git.pld-linux.org Git - packages/graphviz.git/blob - graphviz-visio.patch
e66a5d4d39953fdc974b467c22f9e4ce64ef0265
[packages/graphviz.git] / graphviz-visio.patch
1 --- graphviz-2.36.0/plugin/visio/gvrender_visio_vdx.cpp.orig    2014-01-11 23:59:44.000000000 +0100
2 +++ graphviz-2.36.0/plugin/visio/gvrender_visio_vdx.cpp 2014-04-07 02:59:19.161673397 +0200
3 @@ -101,11 +101,11 @@ static void vdxgen_begin_anchor(GVJ_t *j
4                 context->AddAnchor(job, url, tooltip, target, id);
5  }
6  
7 -static void vdxgen_textpara(GVJ_t * job, pointf p, textpara_t * para)
8 +static void vdxgen_textspan(GVJ_t * job, pointf p, textspan_t * span)
9  {
10         Visio::Render* context = (Visio::Render*)job->context;
11         if (context)
12 -               context->AddText(job, p, para); 
13 +               context->AddText(job, p, span); 
14  }
15  
16  static void vdxgen_ellipse(GVJ_t * job, pointf * A, int filled)
17 @@ -159,7 +159,7 @@ gvrender_engine_t vdxgen_engine = {
18      0,                         /* vdxgen_end_anchor */
19      0,                         /* vdxgen_begin_label */
20         0,                              /* vdxgen_end_label */
21 -    vdxgen_textpara,
22 +    vdxgen_textspan,
23      0,                         /* vdxgen_resolve_color */
24      vdxgen_ellipse,
25      vdxgen_polygon,
26 --- graphviz-2.36.0/plugin/visio/VisioRender.cpp.orig   2014-01-11 23:59:44.000000000 +0100
27 +++ graphviz-2.36.0/plugin/visio/VisioRender.cpp        2014-04-06 22:18:58.508690656 +0200
28 @@ -233,9 +233,9 @@ namespace Visio
29                 AddGraphic(job, Graphic::CreatePolyline(job, A, n));
30         }
31         
32 -       void Render::AddText(GVJ_t* job, pointf p, textpara_t *para)
33 +       void Render::AddText(GVJ_t* job, pointf p, textspan_t *span)
34         {
35 -               AddText(job, Text::CreateText(job, p, para));
36 +               AddText(job, Text::CreateText(job, p, span));
37         }
38  
39         void Render::AddAnchor(GVJ_t *job, char *url, char *tooltip, char *target, char *id)
40 --- graphviz-2.36.0/plugin/visio/VisioText.cpp.orig     2014-01-11 23:59:44.000000000 +0100
41 +++ graphviz-2.36.0/plugin/visio/VisioText.cpp  2014-04-06 22:19:55.288689473 +0200
42 @@ -19,6 +19,7 @@
43  
44  #include "gvcjob.h"
45  #include "gvio.h"
46 +#include <stdlib.h>
47  #include <string.h>
48  
49  extern "C" char *xml_string(char* str);
50 @@ -77,16 +78,16 @@ namespace Visio
51                 gvprintf(job, "<pp IX='%d'/><cp IX='%d'/>%s\n", index, index, _text ? xml_string(_text) : "");  /* para mark + char mark + actual text */
52         }
53         
54 -       Text* Text::CreateText(GVJ_t* job, pointf p, textpara_t* para)
55 +       Text* Text::CreateText(GVJ_t* job, pointf p, textspan_t* span)
56         {
57                 Para::HorzAlign horzAlign;
58                 
59                 /* compute text bounding box and VDX horizontal align */
60                 boxf bounds;
61 -               bounds.LL.y = p.y + para->yoffset_centerline;
62 -               bounds.UR.y = p.y + para->yoffset_centerline + para->height;
63 -               double width = para->width;
64 -               switch (para->just)
65 +               bounds.LL.y = p.y + span->yoffset_centerline;
66 +               bounds.UR.y = p.y + span->yoffset_centerline + span->size.y;
67 +               double width = span->size.x;
68 +               switch (span->just)
69                 {
70                         case 'r':
71                                 horzAlign = Para::horzRight;
72 @@ -110,13 +111,13 @@ namespace Visio
73                         new Para(
74                                 horzAlign),
75                         new Char(
76 -                               para->fontsize,
77 +                               span->font->size,
78                                 job->obj->pencolor.u.rgba[0],
79                                 job->obj->pencolor.u.rgba[1],
80                                 job->obj->pencolor.u.rgba[2]),
81                         new Run(
82                                 bounds,
83 -                               para->str));
84 +                               span->str));
85         }
86         
87         Text::Text(Para* para, Char* chars, Run* run):
This page took 0.062209 seconds and 2 git commands to generate.