Пример #1
0
 public void ReadBinary(BinaryReader br)
 {
     Size = br.ReadInt32();
     PolyPoints.Clear();
     PolyPoints.Add(new PointF((float)br.ReadDouble(), (float)br.ReadDouble()));
     ReadBinaryColour(br);
 }
Пример #2
0
        public override void Randomize(ThreadSafeRandom rd, GAProjectProperties prop)
        {
            PolyPoints.Clear();

            PointF p;

            for (int i = 0; i < 3; i++)
            {
                p = new PointF(NextFloat(rd, Owner.MaxX), NextFloat(rd, Owner.MaxY));
                PolyPoints.Add(p);
            }

            ShapeColour = Color.FromArgb(rd.Next(255), rd.Next(255), rd.Next(255), rd.Next(255));
        }
Пример #3
0
        private void ReadBinaryPoints(BinaryReader br)
        {
            PolyPoints.Clear();

            byte count = br.ReadByte();

            for (int i = 0; i < count; i++)
            {
                PolyPoints.Add(
                    new PointF(
                        br.ReadInt32(),
                        br.ReadInt32()
                        )
                    );
            }
        }
Пример #4
0
 public GAShapeCircle(GARepresentation owner)
 {
     Owner = owner;
     PolyPoints.Add(PointF.Empty);
 }