void
CubicBezierTest_setup (void)
{
    CB = CubicBezier_create();
	LN = new LayoutPkgNamespaces();
    if(CB == NULL)
    {
        fail("CubicBezier_create(); returned a NULL pointer.");
    }
}
Пример #2
0
Файл: doc.c Проект: cran/rsbml
static LineSegment_t *
rsbml_build_doc_line_segment(SEXP r_line_segment)
{
  LineSegment_t * line_segment;
  
  if (inherits(r_line_segment, "CubicBezier")) {
    line_segment = (LineSegment_t *)CubicBezier_create();
    CubicBezier_setBasePoint1((CubicBezier_t *)line_segment,
      rsbml_build_doc_point(GET_SLOT(r_line_segment, install("basePoint1"))));
    CubicBezier_setBasePoint2((CubicBezier_t *)line_segment,
      rsbml_build_doc_point(GET_SLOT(r_line_segment, install("basePoint2"))));
  } else line_segment = LineSegment_create();
  
  rsbml_build_doc_s_base((SBase_t *)line_segment, r_line_segment);
  
  LineSegment_setStart(line_segment, 
    rsbml_build_doc_point(GET_SLOT(r_line_segment, install("start"))));
  LineSegment_setEnd(line_segment, 
    rsbml_build_doc_point(GET_SLOT(r_line_segment, install("end"))));
  
  return line_segment;
}