AddGraphic(job, Graphic::CreatePolyline(job, A, n));
}
- void Render::AddText(GVJ_t* job, pointf p, textpara_t *para)
+ void Render::AddText(GVJ_t* job, pointf p, textspan_t *span)
{
- AddText(job, Text::CreateText(job, p, para));
+ AddText(job, Text::CreateText(job, p, span));
}
void Render::AddAnchor(GVJ_t *job, char *url, char *tooltip, char *target, char *id)
gvprintf(job, "<pp IX='%d'/><cp IX='%d'/>%s\n", index, index, _text ? xml_string(_text) : ""); /* para mark + char mark + actual text */
}
- Text* Text::CreateText(GVJ_t* job, pointf p, textpara_t* para)
+ Text* Text::CreateText(GVJ_t* job, pointf p, textspan_t* span)
{
Para::HorzAlign horzAlign;
/* compute text bounding box and VDX horizontal align */
boxf bounds;
- bounds.LL.y = p.y + para->yoffset_centerline;
- bounds.UR.y = p.y + para->yoffset_centerline + para->height;
- double width = para->width;
- switch (para->just)
+ bounds.LL.y = p.y + span->yoffset_centerline;
+ bounds.UR.y = p.y + span->yoffset_centerline + span->size.y;
+ double width = span->size.x;
+ switch (span->just)
{
case 'r':
horzAlign = Para::horzRight;
new Para(
horzAlign),
new Char(
- para->fontsize,
+ span->font->size,
job->obj->pencolor.u.rgba[0],
job->obj->pencolor.u.rgba[1],
job->obj->pencolor.u.rgba[2]),
new Run(
bounds,
- para->str));
+ span->str));
}
Text::Text(Para* para, Char* chars, Run* run):
context->AddAnchor(job, url, tooltip, target, id);
}
-static void vdxgen_textpara(GVJ_t * job, pointf p, textpara_t * para)
+static void vdxgen_textspan(GVJ_t * job, pointf p, textspan_t * span)
{
Visio::Render* context = (Visio::Render*)job->context;
if (context)
- context->AddText(job, p, para);
+ context->AddText(job, p, span);
}
static void vdxgen_ellipse(GVJ_t * job, pointf * A, int filled)
0, /* vdxgen_end_anchor */
0, /* vdxgen_begin_label */
0, /* vdxgen_end_label */
- vdxgen_textpara,
+ vdxgen_textspan,
0, /* vdxgen_resolve_color */
vdxgen_ellipse,
vdxgen_polygon,