Truncate() public static method

Converts a RectangleF to a Rectangle by performing a truncate operation on all the coordinates.
public static Truncate ( RectangleF value ) : Rectangle
value RectangleF
return Rectangle
        /// <summary>
        /// Initializes the BitmapPixels class with a source Bitmap.
        /// </summary>
        /// <param name="source">The source Bitmap to load the pixels from.</param>
        public BitmapPixels(Bitmap source)
        {
            if (source == null)
            {
                throw new ArgumentNullException("source");
            }

            PixelFormat format = source.PixelFormat;

            if (!ValidPixelFormat(format))
            {
                throw new InvalidPixelFormatException(format);
            }

            GraphicsUnit unit = GraphicsUnit.Pixel;

            bitmapOwner = false;
            bitmap      = source;
            bounds      = Rectangle.Truncate(bitmap.GetBounds(ref unit));
        }