protected override void FinishDrawing()
		{
			RectangleF rect = GetNormalRectangle(_Points[0].layerCoord, _Points[1].layerCoord);
			CurlyBraceShape go = new CurlyBraceShape(new PointD2D(rect.X, rect.Y), new PointD2D(rect.Width, rect.Height));

			// deselect the text tool
			_grac.SetGraphToolFromInternal( Altaxo.Gui.Graph.Viewing.GraphToolType.ObjectPointer);
			_grac.ActiveLayer.GraphObjects.Add(go);
			_grac.WinFormsController.RefreshGraph();
		}
Пример #2
0
			public object Deserialize(object o, Altaxo.Serialization.Xml.IXmlDeserializationInfo info, object parent)
			{
				var s = null != o ? (DeprecatedCurlyBraceShape)o : new DeprecatedCurlyBraceShape(info);
				info.GetBaseValueEmbedded(s, typeof(DeprecatedCurlyBraceShape).BaseType, parent);

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

				return l;
			}
Пример #3
0
            public object Deserialize(object o, Altaxo.Serialization.Xml.IXmlDeserializationInfo info, object parent)
            {
                var s = null != o ? (DeprecatedCurlyBraceShape)o : new DeprecatedCurlyBraceShape(info);

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

                var l = new CurlyBraceShape(info);

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

                return(l);
            }
		protected override void FinishDrawing()
		{
			var rect = GetNormalRectangle(_Points[0].LayerCoordinates, _Points[1].LayerCoordinates);

			// deselect the text tool
			_grac.SetGraphToolFromInternal(GraphToolType.ObjectPointer);

			if (rect.Width != 0 && rect.Height != 0)
			{
				CurlyBraceShape go = new CurlyBraceShape(_grac.Doc.GetPropertyContext());
				go.SetParentSize(_grac.ActiveLayer.Size, false);
				go.SetRelativeSizePositionFromAbsoluteValues(rect.Size, rect.LeftTop);
				_grac.ActiveLayer.GraphObjects.Add(go);
			}
		}
Пример #5
0
        public static CurlyBraceShape 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 CurlyBraceShape(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);
        }
Пример #6
0
		public static CurlyBraceShape 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 CurlyBraceShape(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 CurlyBraceShape(CurlyBraceShape from)
			:
			base(from) // all is done here, since CopyFrom is virtual!
		{
		}
Пример #8
0
 public CurlyBraceShape(CurlyBraceShape from)
     :
     base(from) // all is done here, since CopyFrom is virtual!
 {
 }