Пример #1
0
 public GDIObjectContainer(GDIObjectContainer parent = null)
     : base(parent)
 {
     Items = new List<GDIObject>();
     ScrollX = 0;
     ScrollY = 0;
 }
Пример #2
0
 protected GDIObject getRootObject(GDIObjectContainer obj)
 {
     if (obj.Parent != null)
     {
         return(getRootObject(obj.Parent));
     }
     else
     {
         return(obj);
     }
 }
Пример #3
0
        public GDIObject(GDIObjectContainer parent = null)
        {
            X = 0;
            Y = 0;
            Width = 100;
            Height = 100;
            LineColor = new GDIColor(0, 0, 0);
            LineThickness = 1;
            LineAlpha = 255;
            FillAlpha = 255;
            FillColor = new GDIColor(255, 0, 0);
            Rotation = 0;
            Skew = PointF.Empty;

            Parent = parent;
            if (Parent != null)
                Parent.Items.Add(this);
        }
Пример #4
0
        private void TestCaseContainer()
        {
            GDIObjectContainer container = new GDIObjectContainer();
            container.Width = 200;
            container.Height = 200;
            container.FillColor = new GDIColor(0, 255, 0);
            container.X = 30;
            container.Y = 30;

            GDIObject objA = new GDIObject(container);
            objA.FillColor = new GDIColor(255, 0, 0);
            objA.X = 170;
            objA.Y = 170;

            canvas.Objects.Clear();
            canvas.Objects.Add(container);
            pnlCanvas.Invalidate();
        }
Пример #5
0
        public GDIObject(GDIObjectContainer parent = null)
        {
            X             = 0;
            Y             = 0;
            Width         = 100;
            Height        = 100;
            LineColor     = new GDIColor(0, 0, 0);
            LineThickness = 1;
            LineAlpha     = 255;
            FillAlpha     = 255;
            FillColor     = new GDIColor(255, 0, 0);
            Rotation      = 0;
            Skew          = PointF.Empty;

            Parent = parent;
            if (Parent != null)
            {
                Parent.Items.Add(this);
            }
        }
Пример #6
0
 public GDIBitmap(GDIObjectContainer parent = null)
     : base(parent)
 {
     ScaleY = 1;
     ScaleX = 1;
 }
Пример #7
0
 public GDILine(GDIObjectContainer parent = null) : base(parent)
 {
 }
Пример #8
0
 public GDIObjectContainer(GDIObjectContainer parent = null) : base(parent)
 {
     Items   = new List <GDIObject>();
     ScrollX = 0;
     ScrollY = 0;
 }
Пример #9
0
 public GDILine(GDIObjectContainer parent = null)
     : base(parent)
 {
 }
Пример #10
0
 public GDIBitmap(GDIObjectContainer parent = null) : base(parent)
 {
     ScaleY = 1;
     ScaleX = 1;
 }
Пример #11
0
 protected GDIObject getRootObject(GDIObjectContainer obj)
 {
     if (obj.Parent != null)
         return getRootObject(obj.Parent);
     else
         return obj;
 }