Image.GetFittingRectangle

GetFittingRectangle(Rectangle, int, int)

Gets rectangle which fits the current image.

public static Rectangle GetFittingRectangle(Rectangle rectangle, int width, int height)
ParameterTypeDescription
rectangleRectangleThe rectangle to get fitting rectangle for.
widthInt32The object width.
heightInt32The object height.

Return Value

The fitting rectangle or exception if no fitting rectangle can be found.

See Also


GetFittingRectangle(Rectangle, int[], int, int)

Gets rectangle which fits the current image.

public static Rectangle GetFittingRectangle(Rectangle rectangle, int[] pixels, int width, 
    int height)
ParameterTypeDescription
rectangleRectangleThe rectangle to get fitting rectangle for.
pixelsInt32[]The 32-bit ARGB pixels.
widthInt32The object width.
heightInt32The object height.

Return Value

The fitting rectangle or exception if no fitting rectangle can be found.

See Also