/// <summary> /// The constructor of GOM_Template /// </summary> public GOM_Template() { id = ""; extScale = false; extRotate = false; extConnect = false; keepAspectRatio = false; rgPoints = new GOM_Points(); rgEditingModes = new GOM_Strings(); rgDrawings = new GOM_Drawings(); rgFillings = new GOM_Fillings(); rgDrawingStyles = new GOM_Drawing_Styles(); rgFillingStyles = new GOM_Filling_Styles(); GOM_Style_Drawing drawing; GOM_Style_Filling filling; drawing = new GOM_Style_Drawing(); drawing.id = "default"; rgDrawingStyles.Add(drawing); filling = new GOM_Style_Filling(); filling.id = "default"; rgFillingStyles.Add(filling); }
/// <summary> /// The constructor of GOM_Object_Primitive /// </summary> public GOM_Object_Primitive() { m_id = Guid.NewGuid().ToString("D"); m_xOffset = 0; m_yOffset = 0; m_rotation = 0; m_template = null; GOM_Constraint_Set constraintSet; m_boundingBox = new System.Drawing.RectangleF(0, 0, 0, 0); m_Top_Connector = new GOM_Point(); m_Top_Connector.id = GOM_Special_Point_Name.TOP_CONNECTOR; m_Top_Connector.Connectable = true; m_Bottom_Connector = new GOM_Point(); m_Bottom_Connector.id = GOM_Special_Point_Name.BOTTOM_CONNECTOR; m_Bottom_Connector.Connectable = true; m_Left_Connector = new GOM_Point(); m_Left_Connector.id = GOM_Special_Point_Name.LEFT_CONNECTOR; m_Left_Connector.Connectable = true; m_Right_Connector = new GOM_Point(); m_Right_Connector.id = GOM_Special_Point_Name.RIGHT_CONNECTOR; m_Right_Connector.Connectable = true; m_SE_Resize_Point = new GOM_Point(); m_SE_Resize_Point.id = GOM_Special_Point_Name.SE_RESIZING_POINT; constraintSet = new GOM_Constraint_Set(); constraintSet.EditingMode = "default"; constraintSet.Add(new GOM_Resizing_SE_Constraint(this, m_SE_Resize_Point)); m_SE_Resize_Point.Constraints.Add(constraintSet); m_NW_Resize_Point = new GOM_Point(); m_NW_Resize_Point.id = GOM_Special_Point_Name.NW_RESIZING_POINT; constraintSet = new GOM_Constraint_Set(); constraintSet.EditingMode = "default"; constraintSet.Add(new GOM_Resizing_NW_Constraint(this, m_NW_Resize_Point)); m_NW_Resize_Point.Constraints.Add(constraintSet); m_SW_Resize_Point = new GOM_Point(); m_SW_Resize_Point.id = GOM_Special_Point_Name.SW_RESIZING_POINT; constraintSet = new GOM_Constraint_Set(); constraintSet.EditingMode = "default"; constraintSet.Add(new GOM_Resizing_SW_Constraint(this, m_SW_Resize_Point)); m_SW_Resize_Point.Constraints.Add(constraintSet); m_NE_Resize_Point = new GOM_Point(); m_NE_Resize_Point.id = GOM_Special_Point_Name.NE_RESIZING_POINT; constraintSet = new GOM_Constraint_Set(); constraintSet.EditingMode = "default"; constraintSet.Add(new GOM_Resizing_NE_Constraint(this, m_NE_Resize_Point)); m_NE_Resize_Point.Constraints.Add(constraintSet); m_Rotation_Point = new GOM_Point(); m_Rotation_Point.id = GOM_Special_Point_Name.ROTATION_POINT; constraintSet = new GOM_Constraint_Set(); constraintSet.EditingMode = "default"; constraintSet.Add(new GOM_Rotation_Constraint(this, m_Rotation_Point)); m_Rotation_Point.Constraints.Add(constraintSet); innerText = ""; font = new System.Drawing.Font("Tahoma", 10); fontColor = System.Drawing.Color.Black; extScale = false; extRotate = false; extConnect = false; keepAspectRatio = false; rgPoints = new GOM_Points(); rgDrawings = new GOM_Drawings(); rgFillings = new GOM_Fillings(); rgEditingModes = new GOM_Strings(); rgDrawingStyles = new GOM_Drawing_Styles(); rgFillingStyles = new GOM_Filling_Styles(); }