{
linedraw_internal_t*i = (linedraw_internal_t*)d->internal;
gfxline_t*l = rfx_alloc(sizeof(gfxline_t));
+
+ if(!i->start) {
+ /* starts with a line, not with a moveto. That needs we first
+ need an explicit moveto to (0,0) */
+ linedraw_moveTo(d, 0, 0);
+ }
+
l->type = gfx_lineTo;
d->x = l->x = x;
d->y = l->y = y;
+
l->next = 0;
if(i->next)
i->next->next = l;
{
linedraw_internal_t*i = (linedraw_internal_t*)d->internal;
gfxline_t*l = rfx_alloc(sizeof(gfxline_t));
+
+ if(!i->start) {
+ /* starts with a line, not with a moveto. That needs we first
+ need an explicit moveto to (0,0) */
+ linedraw_moveTo(d, 0, 0);
+ }
+
l->type = gfx_splineTo;
d->x = l->x = x;
d->y = l->y = y;
void gfxdrawer_target_gfxline(gfxdrawer_t*d)
{
linedraw_internal_t*i = (linedraw_internal_t*)rfx_calloc(sizeof(linedraw_internal_t));
+ d->x = 0x7fffffff;
+ d->y = 0x7fffffff;
d->internal = i;
d->moveTo = linedraw_moveTo;
d->lineTo = linedraw_lineTo;