job->obj->pencolor.u.rgba[0],
job->obj->pencolor.u.rgba[1],
job->obj->pencolor.u.rgba[2]),
- new Run(
+ Run(
bounds,
span->str));
}
- Text::Text(const Para ¶, const Char &chars, Run* run):
+ Text::Text(const Para ¶, const Char &chars, const Run &run):
_para(para),
_chars(chars),
_run(run)
{
}
- Text::~Text()
- {
- if (_run)
- delete _run;
- }
-
boxf Text::GetBounds() const
{
- return _run->GetBounds();
+ return _run.GetBounds();
}
void Text::Print(GVJ_t* job) const
void Text::PrintRun(GVJ_t* job, unsigned int index) const
{
- if (_run)
- _run->Print(job, index);
+ _run.Print(job, index);
}
Hyperlink* Hyperlink::CreateHyperlink(GVJ_t*, char* url, char* tooltip, char* target, char*)
public:
static Text* CreateText(GVJ_t* job, pointf p, textspan_t* span);
- ~Text();
-
boxf GetBounds() const;
void Print(GVJ_t* job) const;
void PrintRun(GVJ_t* job, unsigned int index) const;
private:
- Text(const Para ¶, const Char &chars, Run* run);
+ Text(const Para ¶, const Char &chars, const Run &run);
Para _para;
Char _chars;
- Run* _run;
+ Run _run;
};
/* Hyperlink VDX element */