Example #1
0
static void
participation_save(Participation *participation, ObjectNode obj_node,
		   DiaContext *ctx)
{
  orthconn_save(&participation->orth, obj_node, ctx);

  data_add_boolean(new_attribute(obj_node, "total"),
		   participation->total, ctx);
}
static void
participation_save(Participation *participation, ObjectNode obj_node,
		   const char *filename)
{
  orthconn_save(&participation->orth, obj_node);

  data_add_boolean(new_attribute(obj_node, "total"),
		   participation->total);
}
static void
generalization_save(Generalization *genlz, ObjectNode obj_node,
		    const char *filename)
{
  orthconn_save(&genlz->orth, obj_node);

  data_add_string(new_attribute(obj_node, "name"),
		  genlz->name);
  data_add_string(new_attribute(obj_node, "stereotype"),
		  genlz->stereotype);
}
Example #4
0
static void
zigzagline_save(Zigzagline *zigzagline, ObjectNode obj_node,
		const char *filename)
{
  orthconn_save(&zigzagline->orth, obj_node);

  if (!color_equals(&zigzagline->line_color, &color_black))
    data_add_color(new_attribute(obj_node, "line_color"),
		   &zigzagline->line_color);
  
  if (zigzagline->line_width != 0.1)
    data_add_real(new_attribute(obj_node, PROP_STDNAME_LINE_WIDTH),
		  zigzagline->line_width);
  
  if (zigzagline->line_style != LINESTYLE_SOLID)
    data_add_enum(new_attribute(obj_node, "line_style"),
		  zigzagline->line_style);
  
  if (zigzagline->line_join != LINEJOIN_MITER)
    data_add_enum(new_attribute(obj_node, "line_join"),
                  zigzagline->line_join);
  if (zigzagline->line_caps != LINECAPS_BUTT)
    data_add_enum(new_attribute(obj_node, "line_caps"),
                  zigzagline->line_caps);

  if (zigzagline->start_arrow.type != ARROW_NONE) {
    save_arrow(obj_node, &zigzagline->start_arrow, "start_arrow",
	     "start_arrow_length", "start_arrow_width");
  }

  if (zigzagline->end_arrow.type != ARROW_NONE) {
    save_arrow(obj_node, &zigzagline->end_arrow, "end_arrow",
	     "end_arrow_length", "end_arrow_width");
  }

  if (zigzagline->line_style != LINESTYLE_SOLID && 
      zigzagline->dashlength != DEFAULT_LINESTYLE_DASHLEN)
    data_add_real(new_attribute(obj_node, "dashlength"),
                  zigzagline->dashlength);

  if (zigzagline->corner_radius > 0.0)
    data_add_real(new_attribute(obj_node, "corner_radius"),
                  zigzagline->corner_radius);
}