コード例 #1
0
ファイル: standard-path.c プロジェクト: UIKit0/dia
/*!
 * \brief Create a deep copy of the object
 * \memberof StdPath
 */
static DiaObject *
stdpath_copy (StdPath *from)
{
  DiaObject *to;
  to = object_copy_using_properties (&from->object);
  return to;
}
コード例 #2
0
ファイル: textobj.c プロジェクト: GNOME/dia
static DiaObject *
textobj_copy(Textobj *textobj)
{
  Textobj *copied = (Textobj *)object_copy_using_properties(&textobj->object);
  copied->object.enclosing_box = g_new (Rectangle, 1);
  *copied->object.enclosing_box = *textobj->object.enclosing_box;
  return &copied->object;
}