コード例 #1
0
		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);
		}
コード例 #2
0
    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();
    }
コード例 #3
0
    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();
    }
コード例 #4
0
 public RectangleShape(RectangleShape from)
   :
   base(from)
 {
 }
コード例 #5
0
ファイル: RectangleShape.cs プロジェクト: Altaxo/Altaxo
		public RectangleShape(RectangleShape from)
			:
			base(from) // all is done here, since CopyFrom is virtual!
		{
		}
コード例 #6
0
ファイル: RectangleShape.cs プロジェクト: Altaxo/Altaxo
		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;
		}
コード例 #7
0
            public void Serialize(object obj, Altaxo.Serialization.Xml.IXmlSerializationInfo info)
            {
                RectangleShape s = (RectangleShape)obj;

                info.AddBaseValueEmbedded(s, typeof(RectangleShape).BaseType);
            }
コード例 #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);
        }
コード例 #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);
        }
コード例 #10
0
 public RectangleShape(RectangleShape from)
     :
     base(from)
 {
 }
コード例 #11
0
ファイル: RectangleShape.cs プロジェクト: olesar/Altaxo
 public RectangleShape(RectangleShape from)
     :
     base(from) // all is done here, since CopyFrom is virtual!
 {
 }