static GfigObject * d_copy_line (GfigObject *obj) { GfigObject *nl; g_assert (obj->type == LINE); nl = d_new_object (LINE, obj->points->pnt.x, obj->points->pnt.y); nl->points->next = d_copy_dobjpoints (obj->points->next); return nl; }
static GfigObject * d_copy_arc (GfigObject *obj) { GfigObject *nc; g_assert (obj->type == ARC); nc = d_new_object (ARC, obj->points->pnt.x, obj->points->pnt.y); nc->points->next = d_copy_dobjpoints (obj->points->next); return nc; }
static GfigObject * d_copy_circle (GfigObject * obj) { GfigObject *nc; g_assert (obj->type == CIRCLE); nc = d_new_object (CIRCLE, obj->points->pnt.x, obj->points->pnt.y); nc->points->next = d_copy_dobjpoints (obj->points->next); return nc; }
static GfigObject * d_copy_spiral (GfigObject *obj) { GfigObject *np; g_assert (obj->type == SPIRAL); np = d_new_object (SPIRAL, obj->points->pnt.x, obj->points->pnt.y); np->points->next = d_copy_dobjpoints (obj->points->next); np->type_data = obj->type_data; return np; }
static GfigObject * d_copy_rectangle (GfigObject * obj) { GfigObject *new_rectangle; g_assert (obj->type == RECTANGLE); new_rectangle = d_new_object (RECTANGLE, obj->points->pnt.x, obj->points->pnt.y); new_rectangle->points->next = d_copy_dobjpoints (obj->points->next); return new_rectangle; }