void PaintWidget::setFigureHideLines(int value) { if(painter.selection.countSelected() == 1) { GContainer* c = GCONTAINER(painter.selection.getSelected()); if(c!=0) { GObject* ob =c->object(0); if(!ob->isContainer()) { GVectorFigure* v =GVECTORFIGURE(ob); v->setHideLines(value); painter.update(); } } } }
int PaintWidget::getFigureHideLines() { if(painter.selection.countSelected() == 1) { GContainer* c = GCONTAINER(painter.selection.getSelected()); if(c!=0) { GObject* ob =c->object(0); if(!ob->isContainer()) { GVectorFigure* v = GVECTORFIGURE(ob); return v->getHideLines(); } } } return -1; }
int PaintWidget::FigureIsSpline() { if(painter.selection.countSelected() == 1) { GContainer* c = GCONTAINER(painter.selection.getSelected()); if(c!=0) { GObject* ob =c->object(0); if(!ob->isContainer()) { GVectorFigure* v = GVECTORFIGURE(ob); return (v->isSpline())?1:0; } } } return -1; }
void PaintWidget::FigureSetStyle(bool spline) { if(painter.selection.countSelected() == 1) { GContainer* c = GCONTAINER(painter.selection.getSelected()); if(c!=0) { GObject* ob =c->object(0); if(!ob->isContainer()) { GVectorFigure* v = GVECTORFIGURE(ob); if(spline) v->toSpline(); else v->toNormal(); painter.update(); } } } }