Beispiel #1
0
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();
			}
		}
	}
}
Beispiel #2
0
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;
}
Beispiel #3
0
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;
}
Beispiel #4
0
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();
			}
		}
	}
}