break;
}
return new Graphic(
- new Line(
+ Line(
job->obj->penwidth,
job->obj->pencolor.u.rgba[0],
job->obj->pencolor.u.rgba[1],
break;
}
return new Graphic(
- new Line(
+ Line(
job->obj->penwidth,
job->obj->pencolor.u.rgba[0],
job->obj->pencolor.u.rgba[1],
break;
}
return new Graphic(
- new Line(
+ Line(
job->obj->penwidth,
job->obj->pencolor.u.rgba[0],
job->obj->pencolor.u.rgba[1],
break;
}
return new Graphic(
- new Line(
+ Line(
job->obj->penwidth,
job->obj->pencolor.u.rgba[0],
job->obj->pencolor.u.rgba[1],
n));
}
- Graphic::Graphic(Line* line, Fill* fill, Geom* geom):
+ Graphic::Graphic(const Line &line, Fill* fill, Geom* geom):
_line(line),
_fill(fill),
_geom(geom)
Graphic::~Graphic()
{
- if (_line)
- delete _line;
if (_fill)
delete _fill;
if (_geom)
void Graphic::Print(GVJ_t* job, pointf first, pointf last, bool allowCurves) const
{
- if (_line)
- _line->Print(job);
+ _line.Print(job);
if (_fill)
_fill->Print(job);
if (_geom)
void Print(GVJ_t* job, pointf first, pointf last, bool allowCurves) const;
private:
- Graphic(Line* line, Fill* fill, Geom* geom);
+ Graphic(const Line &line, Fill* fill, Geom* geom);
- Line* _line;
+ Line _line;
Fill* _fill;
Geom* _geom;
};