예제 #1
0
파일: rend.cpp 프로젝트: Baltiless/github
void getEdge(edge* triEdge, vert* top, vert* mid, vert* bot){  
	float x = mid->coord[0];
	float compX = getXValue(*top, *mid, * bot);
	if(x < compX){    //mid is left side
		putVertValue((*top).coord, &(triEdge[0].startVert));
		putVertValue((*bot).coord, &(triEdge[0].endVert));
		triEdge[0].position = RIGHT;

		putVertValue((*bot).coord, &(triEdge[1].startVert));
		putVertValue((*mid).coord, &(triEdge[1].endVert));
		triEdge[1].position = LEFT;

		putVertValue((*mid).coord, &(triEdge[2].startVert));
		putVertValue((*top).coord, &(triEdge[2].endVert));
		triEdge[2].position = LEFT;

	}else if(x > compX){     //mid is right side
		putVertValue((*top).coord, &(triEdge[0].startVert));
		putVertValue((*mid).coord, &(triEdge[0].endVert));
		triEdge[0].position = RIGHT;

		putVertValue((*mid).coord, &(triEdge[1].startVert));
		putVertValue((*bot).coord, &(triEdge[1].endVert));
		triEdge[1].position = RIGHT;

		putVertValue((*bot).coord, &(triEdge[2].startVert));
		putVertValue((*top).coord, &(triEdge[2].endVert));
		triEdge[2].position = LEFT;
	}else
		TRACE("impossible in getLandR");
}
예제 #2
0
void
RegisteredPoint::on_value_changed()
{
    if (setProgrammatically()) {
        clearProgrammatically();
        return;
    }

    if (_wr->isUpdating())
        return;

    _wr->setUpdating (true);

    Inkscape::SVGOStringStream os;
    os << getXValue() << "," << getYValue();

    write_to_xml(os.str().c_str());

    _wr->setUpdating (false);
}
예제 #3
0
double
CGnuPlotCoordValue::
getXDistance(CGnuPlotRenderer *renderer) const
{
  return getXValue(renderer, value_) - getXValue(renderer, 0);
}
예제 #4
0
double
CGnuPlotCoordValue::
getYValue(CGnuPlotRenderer *renderer) const
{
  return getXValue(renderer, value_);
}