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();
    }
Esempio n. 4
0
 public RectangleShape(RectangleShape from)
   :
   base(from)
 {
 }
Esempio n. 5
0
		public RectangleShape(RectangleShape from)
			:
			base(from) // all is done here, since CopyFrom is virtual!
		{
		}
Esempio n. 6
0
		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;
		}
Esempio n. 7
0
            public void Serialize(object obj, Altaxo.Serialization.Xml.IXmlSerializationInfo info)
            {
                RectangleShape s = (RectangleShape)obj;

                info.AddBaseValueEmbedded(s, typeof(RectangleShape).BaseType);
            }
Esempio n. 8
0
        /// <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);
        }
Esempio n. 9
0
        /// <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);
        }
Esempio n. 10
0
 public RectangleShape(RectangleShape from)
     :
     base(from)
 {
 }
Esempio n. 11
0
 public RectangleShape(RectangleShape from)
     :
     base(from) // all is done here, since CopyFrom is virtual!
 {
 }