Example #1
0
            public object Deserialize(object o, Altaxo.Serialization.Xml.IXmlDeserializationInfo info, object parent)
            {
                LineShape s = null != o ? (LineShape)o : new LineShape();

                info.GetBaseValueEmbedded(s, typeof(LineShape).BaseType, parent);

                return(s);
            }
		protected override void FinishDrawing()
		{
			var context = _grac.Doc.GetPropertyContext();
			LineShape go = new LineShape(_Points[0].LayerCoordinates, _Points[1].LayerCoordinates, context);

			var absArrowSize = go.Pen.Width * 8;
			go.Pen.EndCap = new Altaxo.Graph.Gdi.LineCaps.ArrowF10LineCap(absArrowSize, 4);

			// deselect the text tool
			_grac.SetGraphToolFromInternal(GraphToolType.ObjectPointer);
			_grac.ActiveLayer.GraphObjects.Add(go);
		}
 protected override void FinishDrawing()
 {
   LineShape go = new LineShape(_Points[0].layerCoord,_Points[1].layerCoord);
   //go.Pen.EndCap = new System.Drawing.Drawing2D.AdjustableArrowCap(2,1,true);
   LineCapEx cap = LineCapEx.FromName("ArrowF10");
   cap.Size = 10;
   go.Pen.EndCap = cap;
  
   // deselect the text tool
   this._grac.CurrentGraphToolType = typeof(GraphControllerMouseHandlers.ObjectPointerMouseHandler);
   _grac.Layers[_grac.CurrentLayerNumber].GraphObjects.Add(go);
   _grac.RefreshGraph();
   
 }
    protected override void FinishDrawing()
    {
      LineShape go = new LineShape(_Points[0].layerCoord,_Points[1].layerCoord);
      //go.Pen.EndCap = new System.Drawing.Drawing2D.AdjustableArrowCap(2,1,true);
      LineCapEx cap = LineCapEx.FromName("ArrowF10");
      cap.Size = 10;
      go.Pen.EndCap = cap;
     
      // deselect the text tool
			_grac.SetGraphToolFromInternal( Altaxo.Gui.Graph.Viewing.GraphToolType.ObjectPointer);
      _grac.ActiveLayer.GraphObjects.Add(go);
      _grac.WinFormsController.RefreshGraph();
      
    }
Example #5
0
            public object Deserialize(object o, Altaxo.Serialization.Xml.IXmlDeserializationInfo info, object parent)
            {
                var s = null != o ? (DeprecatedLineShape)o : new DeprecatedLineShape(info);

                info.GetBaseValueEmbedded(s, "AltaxoBase,Altaxo.Graph.GraphicsObject,0", parent);

                if (info.CurrentElementName == "LinePen")// 2012-06-18 bugfix: the next three lines are in some cases deserialized in ClosedPathShapeBase
                {
                    s.Pen = (PenX)info.GetValue("LinePen", s);
                    info.GetBoolean("Fill");
                    info.GetValue("FillBrush", s);
                }

                var l = new LineShape(info);

                l.CopyFrom(s);
                l.Pen = s.Pen; // we don't need to clone, since it is abandoned anyway

                return(l);
            }
Example #6
0
 public LineShape(LineShape from)
   : base(from)
 {
 }
    protected virtual void FinishDrawing()
    {
      LineShape go = new LineShape(_Points[0].layerCoord,_Points[1].layerCoord);

      // deselect the text tool
      this._grac.CurrentGraphToolType = typeof(GraphControllerMouseHandlers.ObjectPointerMouseHandler);
      _grac.Layers[_grac.CurrentLayerNumber].GraphObjects.Add(go);
      _grac.RefreshGraph();
      
    }
Example #8
0
 public LineShapeHitTestObject(LineShape parent)
     : base(parent)
 {
 }
		protected virtual void FinishDrawing()
		{
			LineShape go = new LineShape(_Points[0].LayerCoordinates, _Points[1].LayerCoordinates, _grac.Doc.GetPropertyContext());

			// deselect the text tool
			_grac.SetGraphToolFromInternal(GraphToolType.ObjectPointer);
			_grac.ActiveLayer.GraphObjects.Add(go);
		}
Example #10
0
			public LineShapeHitTestObject(LineShape parent)
				: base(parent)
			{
			}
Example #11
0
            public void Serialize(object obj, Altaxo.Serialization.Xml.IXmlSerializationInfo info)
            {
                LineShape s = (LineShape)obj;

                info.AddBaseValueEmbedded(s, typeof(LineShape).BaseType);
            }
Example #12
0
        /// <summary>
        /// Deserializes the LineGraphic Version 0.
        /// </summary>
        /// <param name="obj">The empty SLineGraphic 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 LineGraphic.</returns>
        public override object SetObjectData(object obj, System.Runtime.Serialization.SerializationInfo info, System.Runtime.Serialization.StreamingContext context, System.Runtime.Serialization.ISurrogateSelector selector)
        {
            LineShape s = (LineShape)base.SetObjectData(obj, info, context, selector);

            return(s);
        }
Example #13
0
        /// <summary>
        /// Serializes LineGraphic.
        /// </summary>
        /// <param name="info">The serialization info.</param>
        /// <param name="context">The streaming context.</param>
        public override void GetObjectData(System.Runtime.Serialization.SerializationInfo info, System.Runtime.Serialization.StreamingContext context)
        {
            LineShape s = this;

            base.GetObjectData(info, context);
        }
Example #14
0
 public LineShape(LineShape from)
     : base(from)
 {
 }
 public LineGraphicController(LineShape doc)
 {
   _doc = doc;
   _tempdoc = (LineShape)doc.Clone();
   Initialize(true);
 }
Example #16
0
		public LineShape(LineShape from)
			: base(from) // all is done here, since CopyFrom is virtual!
		{
		}
Example #17
0
 public LineShape(LineShape from)
     : base(from) // all is done here, since CopyFrom is virtual!
 {
 }
Example #18
0
			public object Deserialize(object o, Altaxo.Serialization.Xml.IXmlDeserializationInfo info, object parent)
			{
				var s = null != o ? (DeprecatedLineShape)o : new DeprecatedLineShape(info);

				info.GetBaseValueEmbedded(s, "AltaxoBase,Altaxo.Graph.GraphicsObject,0", parent);

				if (info.CurrentElementName == "LinePen")// 2012-06-18 bugfix: the next three lines are in some cases deserialized in ClosedPathShapeBase
				{
					s.Pen = (PenX)info.GetValue("LinePen", s);
					info.GetBoolean("Fill");
					info.GetValue("FillBrush", s);
				}

				var l = new LineShape(info);
				l.CopyFrom(s);
				l.Pen = s.Pen; // we don't need to clone, since it is abandoned anyway

				return l;
			}
    protected virtual void FinishDrawing()
    {
      LineShape go = new LineShape(_Points[0].layerCoord,_Points[1].layerCoord);

      // deselect the text tool
			_grac.SetGraphToolFromInternal( Altaxo.Gui.Graph.Viewing.GraphToolType.ObjectPointer);
      _grac.ActiveLayer.GraphObjects.Add(go);
      _grac.WinFormsController.RefreshGraph();
      
    }