Exemplo n.º 1
0
 public Line(Location startPoint, Location endPoint, ShapeBorder border)
 {
     m_StartPoint = startPoint;
     m_EndPoint = endPoint;
     m_Border = border;
 }
Exemplo n.º 2
0
        protected virtual Point GetLocation(System.Drawing.Rectangle bounds, Location refLocation)
        {
            Point loc = bounds.Location;

            if (refLocation.RelativeX == eRelativeLocation.Right)
                loc.X = bounds.Right;
            else if (refLocation.RelativeX == eRelativeLocation.Top)
                loc.X = bounds.Y;
            else if (refLocation.RelativeX == eRelativeLocation.Bottom)
                loc.X = bounds.Bottom;

            if (refLocation.RelativeY == eRelativeLocation.Bottom)
                loc.Y = bounds.Bottom;
            else if (refLocation.RelativeY == eRelativeLocation.Right)
                loc.Y = bounds.Right;
            else if (refLocation.RelativeY == eRelativeLocation.Left)
                loc.Y = bounds.X;

            loc.Offset(refLocation.X, refLocation.Y);

            return loc;
        }