protected override void FinishDrawing() { var rect = GetNormalRectangle(_Points[0].LayerCoordinates, _Points[1].LayerCoordinates); RectangleShape go = new RectangleShape(_grac.Doc.GetPropertyContext()); go.SetParentSize(_grac.ActiveLayer.Size, false); go.SetRelativeSizePositionFromAbsoluteValues(rect.Size, rect.LeftTop); // deselect the text tool _grac.SetGraphToolFromInternal(GraphToolType.ObjectPointer); _grac.ActiveLayer.GraphObjects.Add(go); }
protected override void FinishDrawing() { RectangleF rect = GetNormalRectangle(_Points[0].layerCoord,_Points[1].layerCoord); RectangleShape go = new RectangleShape(rect.X,rect.Y,rect.Width,rect.Height); // deselect the text tool this._grac.CurrentGraphToolType = typeof(GraphControllerMouseHandlers.ObjectPointerMouseHandler); _grac.Layers[_grac.CurrentLayerNumber].GraphObjects.Add(go); _grac.RefreshGraph(); }
protected override void FinishDrawing() { RectangleF rect = GetNormalRectangle(_Points[0].layerCoord,_Points[1].layerCoord); RectangleShape go = new RectangleShape(rect.X,rect.Y,rect.Width,rect.Height); // deselect the text tool _grac.SetGraphToolFromInternal( Altaxo.Gui.Graph.Viewing.GraphToolType.ObjectPointer); _grac.ActiveLayer.GraphObjects.Add(go); _grac.WinFormsController.RefreshGraph(); }
public RectangleShape(RectangleShape from) : base(from) { }
public RectangleShape(RectangleShape from) : base(from) // all is done here, since CopyFrom is virtual! { }
public static RectangleShape FromLTRB(double left, double top, double right, double bottom, Altaxo.Main.Properties.IReadOnlyPropertyBag context) { if (left > right) Exchange(ref left, ref right); if (top > bottom) Exchange(ref top, ref bottom); var result = new RectangleShape(context); result._location.SizeX = RADouble.NewAbs(right - left); result._location.SizeY = RADouble.NewAbs(bottom - top); result._location.PositionX = RADouble.NewAbs(left); result._location.PositionY = RADouble.NewAbs(top); return result; }
public void Serialize(object obj, Altaxo.Serialization.Xml.IXmlSerializationInfo info) { RectangleShape s = (RectangleShape)obj; info.AddBaseValueEmbedded(s, typeof(RectangleShape).BaseType); }
/// <summary> /// Deserializes the RectangleGraphic Version 0. /// </summary> /// <param name="obj">The empty RectangleGraphic object to deserialize into.</param> /// <param name="info">The serialization info.</param> /// <param name="context">The streaming context.</param> /// <param name="selector">The deserialization surrogate selector.</param> /// <returns>The deserialized RectangleGraphic.</returns> public new object SetObjectData(object obj, System.Runtime.Serialization.SerializationInfo info, System.Runtime.Serialization.StreamingContext context, System.Runtime.Serialization.ISurrogateSelector selector) { RectangleShape s = (RectangleShape)base.SetObjectData(obj, info, context, selector); return(s); }
/// <summary> /// Serializes RectangleGraphic Version 0. /// </summary> /// <param name="info">The serialization info.</param> /// <param name="context">The streaming context.</param> public new void GetObjectData(System.Runtime.Serialization.SerializationInfo info, System.Runtime.Serialization.StreamingContext context) { RectangleShape s = this; base.GetObjectData(info, context); }