Esempio n. 1
0
        private void btnTestCompound_Click(object sender, EventArgs e)
        {
            List <Shape> shapes = new List <Shape>();

            for (int i = 0; i < 5; ++i)
            {
                var l = new Line(new PointF(10, 100 + i * 8), new PointF(245, 100 + i * 8));
                shapes.Add(l);
            }

            var b = new Box(new PointF(10, 200), new PointF(230, 220));

            shapes.Add(b);

            b.TopLeft     = new PointF(-10, 200);
            b.BottomRight = new PointF(245, 245);

            var comp = new CompoundShape();

            comp.AddSubShapes(shapes.ToArray());
            comp.Angle = hsbAngle.Value;
            vbxImage.AddShape(comp);
            compShape = comp;
        }