Ejemplo n.º 1
0
 public override void DrawSelectPoints(FastPixel.FastPixel fp)
 {
     if (_dragPoints != null)
     {
         foreach (PreviewDoublePoint point in _dragPoints)
         {
             if (point?.PointType == PreviewPoint.PointTypes.Size)
             {
                 int x = Convert.ToInt32(point.X - (double)SelectPointSize / 2);
                 int y = Convert.ToInt32(point.Y - (double)SelectPointSize / 2);
                 fp.DrawRectangle(
                     new Rectangle(x, y, SelectPointSize, SelectPointSize),
                     Color.White);
             }
             else
             {
                 if (point?.PointType == PreviewPoint.PointTypes.Rotate)
                 {
                     int x = Convert.ToInt32(point.X - (double)SelectPointSize / 2);
                     int y = Convert.ToInt32(point.Y - (double)SelectPointSize / 2);
                     fp.DrawCircle(
                         new Rectangle(x, y, SelectPointSize, SelectPointSize),
                         Color.White);
                 }
             }
         }
     }
 }
Ejemplo n.º 2
0
 public void DrawSelectPoints(FastPixel.FastPixel fp)
 {
     if (_selectPoints != null)
     {
         foreach (PreviewPoint point in _selectPoints)
         {
             if (point != null)
             {
                 if (point.PointType == PreviewPoint.PointTypes.Size)
                 {
                     fp.DrawRectangle(
                         new Rectangle(point.X - (SelectPointSize / 2), point.Y - (SelectPointSize / 2), SelectPointSize, SelectPointSize),
                         Color.White);
                 }
             }
         }
     }
 }
Ejemplo n.º 3
0
 public virtual void DrawSelectPoints(FastPixel.FastPixel fp)
 {
     if (_selectPoints != null)
     {
         foreach (PreviewPoint point in _selectPoints)
         {
             if (point != null)
             {
                 if (point.PointType == PreviewPoint.PointTypes.Size)
                 {
                     int x = Convert.ToInt32((point.X) * ZoomLevel) - (SelectPointSize / 2);
                     int y = Convert.ToInt32(point.Y * ZoomLevel) - (SelectPointSize / 2);
                     fp.DrawRectangle(
                         new Rectangle(x, y, SelectPointSize, SelectPointSize),
                         Color.White);
                 }
             }
         }
     }
 }