CodeCarvings.Piczard
GetMaxWidth(GfxUnit,Single,Single) Method
See Also  Send Feedback
CodeCarvings.Piczard Namespace > ScaledResizeConstraint Class > GetMaxWidth Method : GetMaxWidth(GfxUnit,Single,Single) Method

unit
The graphics unit in which the maximum image size is expressed.
maxWidth
The width of the rectangle in which the image must stay.
resolution
The output resolution (DPI) required in order to translate the Core.Drawing.MaxImageSize.Height value (expressed in pixels) to the specified graphics unit.
Initializes a new instance of the ScaledResizeConstraint class that allows to generate an image with a fixed width and a variable height; the size is expressed in the specified graphics unit.

Syntax

Visual Basic (Declaration)  
Public Overloads Shared Function GetMaxWidth( _
   ByVal unit As GfxUnit, _
   ByVal maxWidth As Single, _
   ByVal resolution As Single _
) As ScaledResizeConstraint
C#  
public static ScaledResizeConstraint GetMaxWidth( 
   GfxUnit unit,
   float maxWidth,
   float resolution
)

Parameters

unit
The graphics unit in which the maximum image size is expressed.
maxWidth
The width of the rectangle in which the image must stay.
resolution
The output resolution (DPI) required in order to translate the Core.Drawing.MaxImageSize.Height value (expressed in pixels) to the specified graphics unit.

Return Value

The instance of the ScaledResizeConstraint class.

Remarks

If you want to obtain an image with a fixed width and a variable height, then you can set a very high value for the MaxSize.Height property.
The GetMaxWidth method allow to get an instance of the ScaledResizeConstraint class with the MaxSize.Height property set to the max value allowed by Piczard (Core.Drawing.MaxImageSize.Height).

Requirements

Platforms: Windows 8, Windows 7, Windows Vista, Windows XP Professional, Windows 2000 - Windows Server family: 2012, 2008.R2, 2008, 2003, 2000

See Also

©2013 Sergio Turolla. All Rights Reserved.