Ejemplo n.º 1
0
 /// <summary>
 /// Constructs a new PPRect from a given image
 /// </summary>
 /// <remarks>The top-left corner is set to point (0, 0) and it's dimensions are equal to the dimensions of the <paramref name="image"/></remarks>
 /// <param name="image">The image from which the rectangle is constructed</param>
 public PPRect(PPImage image) : this(0, 0, image?.Bitmap?.Width ?? 0, image?.Bitmap?.Height ?? 0, image)
 {
 }
Ejemplo n.º 2
0
 /// <summary>
 /// Constructs a new PPRect from coordinates
 /// </summary>
 /// <param name="left">X coordinate of the top-left corner of the rectangle</param>
 /// <param name="top">Y coordinate of the top-left corner of the rectangle</param>
 /// <param name="right">X coordinate of the bottom-right corner of the rectangle</param>
 /// <param name="bottom">Y coordinate of the bottom-right corner of the rectangle</param>
 /// <param name="image">A corresponding image</param>
 public PPRect(int left, int top, int right, int bottom, PPImage image = null)
 {
     rect  = new SKRectI(left, top, right, bottom);
     Image = image;
 }