Ejemplo n.º 1
0
bool RenderFunc(){
	hge->Gfx_BeginScene();
	hge->Gfx_Clear(0);
	rendergroup.Render();
	hge->Gfx_EndScene();
	return false;
}
Ejemplo n.º 2
0
END_TEST

START_TEST ( test_RenderExtension_writeL3Render )
{
    RenderPkgNamespaces renderns;
    LayoutPkgNamespaces layoutns;

    SBMLDocument doc(3,1);

    doc.enablePackage(layoutns.getURI(), "layout", true);
    doc.enablePackage(renderns.getURI(), "render", true);

    Model* model = doc.createModel();

    LayoutModelPlugin *lPlugin = (LayoutModelPlugin*)model->getPlugin("layout");
    fail_unless(lPlugin != NULL);

    Layout* layout = lPlugin->createLayout();
    Dimensions dim(&layoutns, 100,100 );
    layout->setDimensions(&dim);

    GraphicalObject* additional = layout->createAdditionalGraphicalObject();
    additional->setId("go1");
    BoundingBox bb(&layoutns, "bb1", 10, 10, 90, 90);
    additional->setBoundingBox(&bb);

    RenderLayoutPlugin *rPlugin = (RenderLayoutPlugin*)layout->getPlugin("render");
    fail_unless(rPlugin != NULL);

    LocalRenderInformation* local = rPlugin->createLocalRenderInformation();

    ColorDefinition *black = local->createColorDefinition();
    black->setId("black");
    black->setColorValue("#000000");

    LocalStyle *lStyle = local->createStyle("style_go1");
    lStyle->addId("go1");
    RenderGroup* group = lStyle->getGroup();
    group->setStroke("black");


    std::string sbml = writeSBMLToStdString(&doc);

    fail_unless (sbml.length() != 0);

}
Ejemplo n.º 3
0
int static WINAPI WinMain (HINSTANCE hInstance,HINSTANCE hPrevInstance,PSTR szCmdLine,int iCmdShow)
{
	hge->System_SetState(HGE_FRAMEFUNC,EmptyFrameFunc);
	hge->System_SetState(HGE_ZBUFFER,true);
	hge->System_SetState(HGE_RENDERFUNC, RenderFunc);
	hge->System_SetState(HGE_TITLE, "测试用1");
	hge->System_SetState(HGE_WINDOWED, true);
	hge->System_SetState(HGE_FPS,60);
	hge->System_SetState(HGE_SCREENWIDTH, 800);
	hge->System_SetState(HGE_SCREENHEIGHT, 600);
	hge->System_SetState(HGE_SCREENBPP, 32);

	if(!(hge->System_Initiate())){
		MessageBox(NULL, "无法初始化", "关键错误", MB_OK | MB_ICONERROR | MB_APPLMODAL);
		hge->System_Shutdown();
		hge->Release();
		return false;
	}
	//资源文件初始化阶段//////////////////////////////////
	role=hge->Texture_Load("role.png");
	map=hge->Texture_Load("map.png");
	map1=new Rendable();
	role1=new Movable();
	map1->InitQuad(map,0.0f,0.0f,800.0f,600.0f,true);
	map1->InitQuad(0.0f,0.0f,800.0f,600.0f,true);
	map1->InitQuad(0.9f,true);
	role1->InitQuad(role,0.0f,0.0f,32.0f,48.0f,true);
	role1->InitQuad(100.0f,100.0f,32.0f,48.0f,true);
	role1->InitQuad(0.8f,true);
	role1->speed=2.0f;
	rendergroup.AddRender(role1);
	rendergroup.AddRender(map1);
	/////////////////////////////////////////////////////新开核心控制线程////////////////////
	HANDLE hThread;
    unsigned int threadID;
	hThread = (HANDLE)_beginthreadex(NULL, 0, &CtrlThread, NULL, 0, &threadID);//暂时没有需要修改这些参数
	/////////////////////////////////////////////////////////////////////////////////////////
	hge->System_Start();
	hge->System_Shutdown();
	hge->Release();
	return true;
}
Ejemplo n.º 4
0
/**
 * Converts this object to the corresponding SBML object.
 */
RenderGroup* CLGroup::toSBML(unsigned int level, unsigned int version) const
{
  RenderGroup* pGroup = new RenderGroup(level, version);
  this->addSBMLAttributes(pGroup);
  pGroup->setStartHead(this->mStartHead);
  pGroup->setEndHead(this->mEndHead);
  RelAbsVector* pV = this->getFontSize().toSBML();
  pGroup->setFontSize(*pV);
  delete pV;
  pGroup->setFontFamily(this->getFontFamily());

  switch (this->getFontWeight())
    {
      case CLText::WEIGHT_UNSET:
        pGroup->setFontWeight(Text::WEIGHT_UNSET);
        break;

      case CLText::WEIGHT_BOLD:
        pGroup->setFontWeight(Text::WEIGHT_BOLD);
        break;

      default:
        pGroup->setFontWeight(Text::WEIGHT_NORMAL);
        break;
    }

  switch (this->getFontStyle())
    {
      case CLText::STYLE_UNSET:
        pGroup->setFontStyle(Text::STYLE_UNSET);
        break;

      case CLText::STYLE_ITALIC:
        pGroup->setFontStyle(Text::STYLE_ITALIC);
        break;

      default:
        pGroup->setFontStyle(Text::STYLE_NORMAL);
        break;
    }

  switch (this->getTextAnchor())
    {
      case CLText::ANCHOR_UNSET:
        pGroup->setTextAnchor(Text::ANCHOR_UNSET);
        break;

      case CLText::ANCHOR_END:
        pGroup->setTextAnchor(Text::ANCHOR_END);
        break;

      case CLText::ANCHOR_MIDDLE:
        pGroup->setTextAnchor(Text::ANCHOR_MIDDLE);
        break;

      default:
        pGroup->setTextAnchor(Text::ANCHOR_START);
        break;
    }

  switch (this->getVTextAnchor())
    {
      case CLText::ANCHOR_UNSET:
        pGroup->setVTextAnchor(Text::ANCHOR_UNSET);
        break;

      case CLText::ANCHOR_BOTTOM:
        pGroup->setVTextAnchor(Text::ANCHOR_BOTTOM);
        break;

      case CLText::ANCHOR_MIDDLE:
        pGroup->setVTextAnchor(Text::ANCHOR_MIDDLE);
        break;

      default:
        pGroup->setVTextAnchor(Text::ANCHOR_TOP);
        break;
    }

  size_t i, iMax = this->mElements.size();
  int result;

  for (i = 0; i < iMax; ++i)
    {
      const Transformation2D* pChild = NULL;
      const CCopasiObject* pObject = this->mElements[i];

      if (dynamic_cast<const CLRectangle*>(pObject))
        {
          pChild = static_cast<const CLRectangle*>(pObject)->toSBML(level, version);
        }
      else if (dynamic_cast<const CLEllipse*>(pObject))
        {
          pChild = static_cast<const CLEllipse*>(pObject)->toSBML(level, version);
        }
      else if (dynamic_cast<const CLRenderCurve*>(pObject))
        {
          pChild = static_cast<const CLRenderCurve*>(pObject)->toSBML(level, version);
        }
      else if (dynamic_cast<const CLPolygon*>(pObject))
        {
          pChild = static_cast<const CLPolygon*>(pObject)->toSBML(level, version);
        }
      else if (dynamic_cast<const CLText*>(pObject))
        {
          pChild = static_cast<const CLText*>(pObject)->toSBML(level, version);
        }
      else if (dynamic_cast<const CLImage*>(pObject))
        {
          pChild = static_cast<const CLImage*>(pObject)->toSBML(level, version);
        }
      else if (dynamic_cast<const CLGroup*>(pObject))
        {
          pChild = static_cast<const CLGroup*>(pObject)->toSBML(level, version);
        }

      result = pGroup->addChildElement(pChild);
      assert(result == LIBSBML_OPERATION_SUCCESS);
      delete pChild;
    }

  return pGroup;
}
Ejemplo n.º 5
0
/**
 * Constructor to generate object from the corresponding SBML object.
 */
CLGroup::CLGroup(const RenderGroup& source, CCopasiContainer* pParent):
  CLGraphicalPrimitive2D(source),
  CCopasiContainer("RenderGroup", pParent),
  mFontFamily(source.getFontFamily()),
  mFontSize(source.getFontSize()),
  mStartHead(source.getStartHead()),
  mEndHead(source.getEndHead()),
  mElements("GroupElements", this),
  mKey("")
{
  this->mKey = CCopasiRootContainer::getKeyFactory()->add("RenderGroup", this);

  // copy the elements
  switch (source.getFontWeight())
    {
      case Text::WEIGHT_UNSET:
        this->setFontWeight(CLText::WEIGHT_UNSET);
        break;

      case Text::WEIGHT_BOLD:
        this->setFontWeight(CLText::WEIGHT_BOLD);
        break;

      default:
        this->setFontWeight(CLText::WEIGHT_NORMAL);
        break;
    }

  switch (source.getFontStyle())
    {
      case Text::STYLE_UNSET:
        this->setFontStyle(CLText::STYLE_UNSET);
        break;

      case Text::STYLE_ITALIC:
        this->setFontStyle(CLText::STYLE_ITALIC);
        break;

      default:
        this->setFontStyle(CLText::STYLE_NORMAL);
        break;
    }

  switch (source.getTextAnchor())
    {
      case Text::ANCHOR_UNSET:
        this->setTextAnchor(CLText::ANCHOR_UNSET);
        break;

      case Text::ANCHOR_END:
        this->setTextAnchor(CLText::ANCHOR_END);
        break;

      case Text::ANCHOR_MIDDLE:
        this->setTextAnchor(CLText::ANCHOR_MIDDLE);
        break;

      default:
        this->setTextAnchor(CLText::ANCHOR_START);
        break;
    }

  switch (source.getVTextAnchor())
    {
      case Text::ANCHOR_UNSET:
        this->setVTextAnchor(CLText::ANCHOR_UNSET);
        break;

      case Text::ANCHOR_BOTTOM:
        this->setVTextAnchor(CLText::ANCHOR_BOTTOM);
        break;

      case Text::ANCHOR_MIDDLE:
        this->setVTextAnchor(CLText::ANCHOR_MIDDLE);
        break;

      default:
        this->setVTextAnchor(CLText::ANCHOR_TOP);
        break;
    }

  size_t i, iMax = source.getNumElements();
  const Transformation2D* pChild = NULL;

  for (i = 0; i < iMax; ++i)
    {
      pChild = dynamic_cast<const Transformation2D*>(source.getElement((unsigned int) i));

      if (dynamic_cast<const Rectangle*>(pChild))
        {
          this->mElements.add(new CLRectangle(*static_cast<const Rectangle*>(pChild), this), true);
        }
      else if (dynamic_cast<const Ellipse*>(pChild))
        {
          this->mElements.add(new CLEllipse(*static_cast<const Ellipse*>(pChild), this), true);
        }
      else if (dynamic_cast<const RenderCurve*>(pChild))
        {
          this->mElements.add(new CLRenderCurve(*static_cast<const RenderCurve*>(pChild), this), true);
        }
      else if (dynamic_cast<const Polygon*>(pChild))
        {
          this->mElements.add(new CLPolygon(*static_cast<const Polygon*>(pChild), this), true);
        }
      else if (dynamic_cast<const Text*>(pChild))
        {
          this->mElements.add(new CLText(*static_cast<const Text*>(pChild), this), true);
        }
      else if (dynamic_cast<const Image*>(pChild))
        {
          this->mElements.add(new CLImage(*static_cast<const Image*>(pChild), this), true);
        }
      else if (dynamic_cast<const RenderGroup*>(pChild))
        {
          this->mElements.add(new CLGroup(*static_cast<const RenderGroup*>(pChild), this), true);
        }
    }
}
Ejemplo n.º 6
0
END_TEST

START_TEST ( test_RenderCurve_read_old_style )
{
  // we need to pack the curve in a group because the code to read "old style"
  // curves is in the Group class.
  std::string s = "<?xml version=\"1.0\" encoding=\"UTF-8\"?>\n"
                  "<g xmlns:xsi=\"http://www.w3.org/2001/XMLSchema-instance\">\n"
                  "  <curve>\n"
                  "    <listOfCurveSegments>\n"
                  "      <curveSegment xsi:type=\"LineSegment\">\n"
                  "        <start x=\"0\" y=\"0\" />\n"
                  "        <end x=\"10\" y=\"3\" />\n"
                  "      </curveSegment>\n"
                  "      <curveSegment xsi:type=\"LineSegment\">\n"
                  "        <start x=\"10\" y=\"3\" />\n"
                  "        <end x=\"0\" y=\"6\" />\n"
                  "      </curveSegment>\n"
                  "    </listOfCurveSegments>\n"
                  "  </curve>\n"
                  "</g>\n"
                ;
      
  XMLInputStream* pStream= new XMLInputStream(s.c_str(),false);
  XMLNode* pNode = new XMLNode(*pStream);

  RenderGroup g = RenderGroup(*pNode);
  fail_unless(g.getNumElements() == 1);
  const Transformation2D* pElement=g.getElement(0);
  fail_unless(pElement != NULL);
  if (pElement == NULL) return;
  fail_unless(pElement->getTypeCode() == SBML_RENDER_CURVE);
  const RenderCurve* pC=dynamic_cast<const RenderCurve*>(pElement);
  fail_unless(!pC->isSetMatrix());
  fail_unless(!pC->isSetStroke());
  fail_unless(!pC->isSetStrokeWidth());
  fail_unless(!pC->isSetDashArray());
  fail_unless(pC->getNumElements() == 3);
  const RenderPoint* pP=pC->getElement(0);
  fail_unless( pP != NULL );
  fail_unless( pP->getTypeCode() == SBML_RENDER_POINT );
  fail_unless( dynamic_cast<const RenderCubicBezier*>(pP) == NULL);
  fail_unless( pP->x().getAbsoluteValue() < 1e-9);
  fail_unless( pP->x().getRelativeValue() < 1e-9);
  fail_unless( pP->y().getAbsoluteValue() < 1e-9);
  fail_unless( pP->y().getRelativeValue() < 1e-9);
  fail_unless( pP->z().getAbsoluteValue() < 1e-9);
  fail_unless( pP->z().getRelativeValue() < 1e-9);
  pP=pC->getElement(1);
  fail_unless( pP != NULL );
  fail_unless( pP->getTypeCode() == SBML_RENDER_POINT );
  fail_unless( dynamic_cast<const RenderCubicBezier*>(pP) == NULL);
  fail_unless( fabs((pP->x().getAbsoluteValue() - 10.0 ) / 10.0) < 1e-9);
  fail_unless( pP->x().getRelativeValue() < 1e-9);
  fail_unless( fabs((pP->y().getAbsoluteValue() - 3.0) / 3.0) < 1e-9);
  fail_unless( pP->y().getRelativeValue() < 1e-9);
  fail_unless( pP->z().getAbsoluteValue() < 1e-9);
  fail_unless( pP->z().getRelativeValue() < 1e-9);
  pP=pC->getElement(2);
  fail_unless( pP != NULL );
  fail_unless( pP->getTypeCode() == SBML_RENDER_POINT );
  fail_unless( dynamic_cast<const RenderCubicBezier*>(pP) == NULL);
  fail_unless( pP->x().getAbsoluteValue() < 1e-9);
  fail_unless( pP->x().getRelativeValue() < 1e-9);
  fail_unless( fabs((pP->y().getAbsoluteValue() - 6.0) / 6.0) < 1e-9);
  fail_unless( pP->y().getRelativeValue() < 1e-9);
  fail_unless( pP->z().getAbsoluteValue() < 1e-9);
  fail_unless( pP->z().getRelativeValue() < 1e-9);
  delete pNode;
  delete pStream;
      
      
  s = "<?xml version=\"1.0\" encoding=\"UTF-8\"?>\n"
      "<g xmlns:xsi=\"http://www.w3.org/2001/XMLSchema-instance\">\n"
      " <curve xmlns:xsi=\"http://www.w3.org/2001/XMLSchema-instance\">\n"
      "    <listOfCurveSegments>\n"
      "      <curveSegment xsi:type=\"CubicBezier\">\n"
      "        <start x=\"2.0\" y=\"7.71428\"/>\n"
      "        <basePoint1 x=\"10.21428\" y=\"12.0\"/>\n"
      "        <basePoint2 x=\"15.21428\" y=\"17.04464\"/>\n"
      "        <end x=\"24.05357\" y=\"15.83928\"/>\n"
      "      </curveSegment>\n"
      "      <curveSegment xsi:type=\"CubicBezier\">\n"
      "        <start x=\"24.05357\" y=\"15.83928\"/>\n"
      "        <basePoint1 x=\"32.89285\" y=\"14.63392\"/>\n"
      "        <basePoint2 x=\"45.57142\" y=\"7.17856\"/>\n"
      "        <end x=\"45.57142\" y=\"7.17856\"/>\n"
      "      </curveSegment>\n"
      "      <curveSegment xsi:type=\"LineSegment\">\n"
      "        <start x=\"45.57142\" y=\"7.17856\"/>\n"
      "        <end x=\"41.46427\" y=\"2.0\"/>\n"
      "      </curveSegment>\n"
      "      <curveSegment xsi:type=\"CubicBezier\">\n"
      "        <start x=\"41.46427\" y=\"2.0\"/>\n"
      "        <basePoint1 x=\"41.46427\" y=\"2.0\"/>\n"
      "        <basePoint2 x=\"31.9107\" y=\"9.14285\"/>\n"
      "        <end x=\"23.42856\" y=\"9.32142\"/>\n"
      "      </curveSegment>\n"
      "      <curveSegment xsi:type=\"CubicBezier\">\n"
      "        <start x=\"23.42856\" y=\"9.32142\"/>\n"
      "        <basePoint1 x=\"14.94642\" y=\"9.49999\"/>\n"
      "        <basePoint2 x=\"7.5357\" y=\"2.71428\"/>\n"
      "        <end x=\"7.5357\" y=\"2.71428\"/>\n"
      "      </curveSegment>\n"
      "      <curveSegment xsi:type=\"LineSegment\">\n"
      "        <start x=\"7.5357\" y=\"2.71428\"/>\n"
      "        <end x=\"2.0\" y=\"7.71428\"/>\n"
      "      </curveSegment>\n"
      "    </listOfCurveSegments>\n"
      "  </curve>\n"
      "</g>\n"
    ;

  pStream= new XMLInputStream(s.c_str(),false);
  pNode = new XMLNode(*pStream);
  
  g = RenderGroup(*pNode);
  fail_unless(g.getNumElements() == 1);
  pElement=g.getElement(0);
  fail_unless(pElement != NULL);
  fail_unless(pElement->getTypeCode() == SBML_RENDER_CURVE);
  pC=dynamic_cast<const RenderCurve*>(pElement);
  fail_unless(!pC->isSetMatrix());
  fail_unless(!pC->isSetStroke());
  fail_unless(!pC->isSetStrokeWidth());
  fail_unless(!pC->isSetDashArray());
  fail_unless(pC->getNumElements() == 7);
  pP=pC->getElement(0);
  fail_unless( pP != NULL );
  fail_unless( pP->getTypeCode() == SBML_RENDER_POINT );
  fail_unless( dynamic_cast<const RenderCubicBezier*>(pP) == NULL);
  fail_unless( fabs((pP->x().getAbsoluteValue() - 2.0) / 2.0) < 1e-9);
  fail_unless( pP->x().getRelativeValue() < 1e-9);
  fail_unless( fabs((pP->y().getAbsoluteValue() - 7.71428) / 7.71428) < 1e-9);
  fail_unless( pP->y().getRelativeValue() < 1e-9);
  fail_unless( pP->z().getAbsoluteValue() < 1e-9);
  fail_unless( pP->z().getRelativeValue() < 1e-9);
  pP=pC->getElement(1);
  fail_unless( pP != NULL );
  fail_unless( pP->getTypeCode() == SBML_RENDER_CUBICBEZIER );
  const RenderCubicBezier* pCB = dynamic_cast<const RenderCubicBezier*>(pP);
  fail_unless( pCB != NULL);
  fail_unless( fabs((pCB->basePoint1_X().getAbsoluteValue() - 10.21428) / 10.21428) < 1e-9);
  fail_unless( pCB->basePoint1_X().getRelativeValue() < 1e-9);
  fail_unless( fabs((pCB->basePoint1_Y().getAbsoluteValue() - 12.0) / 12.0) < 1e-9);
  fail_unless( pCB->basePoint1_Y().getRelativeValue() < 1e-9);
  fail_unless( pCB->basePoint1_Z().getAbsoluteValue() < 1e-9);
  fail_unless( pCB->basePoint1_Z().getRelativeValue() < 1e-9);
  fail_unless( fabs((pCB->basePoint2_X().getAbsoluteValue() - 15.21428) / 15.21428) < 1e-9);
  fail_unless( pCB->basePoint2_X().getRelativeValue() < 1e-9);
  fail_unless( fabs((pCB->basePoint2_Y().getAbsoluteValue() - 17.04464) / 17.04464) < 1e-9);
  fail_unless( pCB->basePoint2_Y().getRelativeValue() < 1e-9);
  fail_unless( pCB->basePoint2_Z().getAbsoluteValue() < 1e-9);
  fail_unless( pCB->basePoint2_Z().getRelativeValue() < 1e-9);
  fail_unless( fabs((pCB->x().getAbsoluteValue() - 24.05357) / 24.05357) < 1e-9);
  fail_unless( pCB->x().getRelativeValue() < 1e-9);
  fail_unless( fabs((pCB->y().getAbsoluteValue() - 15.83928) / 15.83928) < 1e-9);
  fail_unless( pCB->y().getRelativeValue() < 1e-9);
  fail_unless( pCB->z().getAbsoluteValue() < 1e-9);
  fail_unless( pCB->z().getRelativeValue() < 1e-9);
  pP=pC->getElement(2);
  fail_unless( pP != NULL );
  fail_unless( pP->getTypeCode() == SBML_RENDER_CUBICBEZIER );
  pCB = dynamic_cast<const RenderCubicBezier*>(pP);
  fail_unless( pCB != NULL);
  fail_unless( fabs((pCB->basePoint1_X().getAbsoluteValue() - 32.89285) / 32.89285) < 1e-9);
  fail_unless( pCB->basePoint1_X().getRelativeValue() < 1e-9);
  fail_unless( fabs((pCB->basePoint1_Y().getAbsoluteValue() - 14.63392) / 14.63392) < 1e-9);
  fail_unless( pCB->basePoint1_Y().getRelativeValue() < 1e-9);
  fail_unless( pCB->basePoint1_Z().getAbsoluteValue() < 1e-9);
  fail_unless( pCB->basePoint1_Z().getRelativeValue() < 1e-9);
  fail_unless( fabs((pCB->basePoint2_X().getAbsoluteValue() - 45.57142) / 45.57142) < 1e-9);
  fail_unless( pCB->basePoint2_X().getRelativeValue() < 1e-9);
  fail_unless( fabs((pCB->basePoint2_Y().getAbsoluteValue() - 7.17856) / 7.17856) < 1e-9);
  fail_unless( pCB->basePoint2_Y().getRelativeValue() < 1e-9);
  fail_unless( pCB->basePoint2_Z().getAbsoluteValue() < 1e-9);
  fail_unless( pCB->basePoint2_Z().getRelativeValue() < 1e-9);
  fail_unless( fabs((pCB->x().getAbsoluteValue() - 45.57142) / 45.57142) < 1e-9);
  fail_unless( pCB->x().getRelativeValue() < 1e-9);
  fail_unless( fabs((pCB->y().getAbsoluteValue() - 7.17856) / 7.17856) < 1e-9);
  fail_unless( pCB->y().getRelativeValue() < 1e-9);
  fail_unless( pCB->z().getAbsoluteValue() < 1e-9);
  fail_unless( pCB->z().getRelativeValue() < 1e-9);
  pP=pC->getElement(3);
  fail_unless( pP != NULL );
  fail_unless( pP->getTypeCode() == SBML_RENDER_POINT );
  fail_unless( dynamic_cast<const RenderCubicBezier*>(pP) == NULL);
  fail_unless( fabs((pP->x().getAbsoluteValue() - 41.46427) / 41.46427) < 1e-9);
  fail_unless( pP->x().getRelativeValue() < 1e-9);
  fail_unless( fabs((pP->y().getAbsoluteValue() - 2.0) / 2.0) < 1e-9);
  fail_unless( pP->y().getRelativeValue() < 1e-9);
  fail_unless( pP->z().getAbsoluteValue() < 1e-9);
  fail_unless( pP->z().getRelativeValue() < 1e-9);
  pP=pC->getElement(4);
  fail_unless( pP != NULL );
  fail_unless( pP->getTypeCode() == SBML_RENDER_CUBICBEZIER );
  pCB = dynamic_cast<const RenderCubicBezier*>(pP);
  fail_unless( pCB != NULL);
  fail_unless( fabs((pCB->basePoint1_X().getAbsoluteValue() - 41.46427) / 41.46427) < 1e-9);
  fail_unless( pCB->basePoint1_X().getRelativeValue() < 1e-9);
  fail_unless( fabs((pCB->basePoint1_Y().getAbsoluteValue() - 2.0) / 2.0) < 1e-9);
  fail_unless( pCB->basePoint1_Y().getRelativeValue() < 1e-9);
  fail_unless( pCB->basePoint1_Z().getAbsoluteValue() < 1e-9);
  fail_unless( pCB->basePoint1_Z().getRelativeValue() < 1e-9);
  fail_unless( fabs((pCB->basePoint2_X().getAbsoluteValue() - 31.9107) / 31.9107) < 1e-9);
  fail_unless( pCB->basePoint2_X().getRelativeValue() < 1e-9);
  fail_unless( fabs((pCB->basePoint2_Y().getAbsoluteValue() - 9.14285) / 9.14285) < 1e-9);
  fail_unless( pCB->basePoint2_Y().getRelativeValue() < 1e-9);
  fail_unless( pCB->basePoint2_Z().getAbsoluteValue() < 1e-9);
  fail_unless( pCB->basePoint2_Z().getRelativeValue() < 1e-9);
  fail_unless( fabs((pCB->x().getAbsoluteValue() - 23.42856) / 23.42856) < 1e-9);
  fail_unless( pCB->x().getRelativeValue() < 1e-9);
  fail_unless( fabs((pCB->y().getAbsoluteValue() - 9.32142) / 9.32142) < 1e-9);
  fail_unless( pCB->y().getRelativeValue() < 1e-9);
  fail_unless( pCB->z().getAbsoluteValue() < 1e-9);
  fail_unless( pCB->z().getRelativeValue() < 1e-9);
  pP=pC->getElement(5);
  fail_unless( pP != NULL );
  fail_unless( pP->getTypeCode() == SBML_RENDER_CUBICBEZIER );
  pCB = dynamic_cast<const RenderCubicBezier*>(pP);
  fail_unless( pCB != NULL);
  fail_unless( fabs((pCB->basePoint1_X().getAbsoluteValue() - 14.94642) / 14.94642) < 1e-9);
  fail_unless( pCB->basePoint1_X().getRelativeValue() < 1e-9);
  fail_unless( fabs((pCB->basePoint1_Y().getAbsoluteValue() - 9.49999) / 9.49999) < 1e-9);
  fail_unless( pCB->basePoint1_Y().getRelativeValue() < 1e-9);
  fail_unless( pCB->basePoint1_Z().getAbsoluteValue() < 1e-9);
  fail_unless( pCB->basePoint1_Z().getRelativeValue() < 1e-9);
  fail_unless( fabs((pCB->basePoint2_X().getAbsoluteValue() - 7.5357) / 7.5357) < 1e-9);
  fail_unless( pCB->basePoint2_X().getRelativeValue() < 1e-9);
  fail_unless( fabs((pCB->basePoint2_Y().getAbsoluteValue() - 2.71428) / 2.71428) < 1e-9);
  fail_unless( pCB->basePoint2_Y().getRelativeValue() < 1e-9);
  fail_unless( pCB->basePoint2_Z().getAbsoluteValue() < 1e-9);
  fail_unless( pCB->basePoint2_Z().getRelativeValue() < 1e-9);
  fail_unless( fabs((pCB->x().getAbsoluteValue() - 7.5357) / 7.5357) < 1e-9);
  fail_unless( pCB->x().getRelativeValue() < 1e-9);
  fail_unless( fabs((pCB->y().getAbsoluteValue() - 2.71428) / 2.71428) < 1e-9);
  fail_unless( pCB->y().getRelativeValue() < 1e-9);
  fail_unless( pCB->z().getAbsoluteValue() < 1e-9);
  fail_unless( pCB->z().getRelativeValue() < 1e-9);
  pP=pC->getElement(6);
  fail_unless( pP != NULL );
  fail_unless( pP->getTypeCode() == SBML_RENDER_POINT );
  fail_unless( dynamic_cast<const RenderCubicBezier*>(pP) == NULL);
  fail_unless( fabs((pP->x().getAbsoluteValue() - 2.0) / 2.0) < 1e-9);
  fail_unless( pP->x().getRelativeValue() < 1e-9);
  fail_unless( fabs((pP->y().getAbsoluteValue() - 7.71428) / 7.71428) < 1e-9);
  fail_unless( pP->y().getRelativeValue() < 1e-9);
  fail_unless( pP->z().getAbsoluteValue() < 1e-9);
  fail_unless( pP->z().getRelativeValue() < 1e-9);
  delete pNode;
  delete pStream;
}