//////////////////////////////////////////////////////////////////// /// <summary> /// Calculates image size to preserve aspect ratio. /// </summary> /// <param name="InputSize">Image display area.</param> /// <returns>Adjusted image display area.</returns> /// <remarks> /// Calculates best fit to preserve aspect ratio. /// </remarks> //////////////////////////////////////////////////////////////////// public SizeD ImageSize ( SizeD InputSize ) { return(ImageSizePos.ImageSize(WidthPix, HeightPix, InputSize.Width, InputSize.Height)); }
//////////////////////////////////////////////////////////////////// /// <summary> /// Calculates image size to preserve aspect ratio and sets position. /// </summary> /// <param name="InputSize">Image display area</param> /// <param name="Alignment">Content alignment</param> /// <returns>Adjusted image size and position within area.</returns> /// <remarks> /// Calculates best fit to preserve aspect ratio and adjust /// position according to content alignment argument. /// </remarks> //////////////////////////////////////////////////////////////////// public PdfRectangle ImageSizePosition ( SizeD InputSize, ContentAlignment Alignment ) { return(ImageSizePos.ImageArea(WidthPix, HeightPix, 0.0, 0.0, InputSize.Width, InputSize.Height, Alignment)); }
//////////////////////////////////////////////////////////////////// /// <summary> /// Calculates image size to preserve aspect ratio. /// </summary> /// <param name="Width">Image display width.</param> /// <param name="Height">Image display height.</param> /// <returns>Adjusted image display area.</returns> /// <remarks> /// Calculates best fit to preserve aspect ratio. /// </remarks> //////////////////////////////////////////////////////////////////// public SizeD ImageSize ( double Width, double Height ) { return(ImageSizePos.ImageSize(WidthPix, HeightPix, Width, Height)); }
//////////////////////////////////////////////////////////////////// /// <summary> /// Calculates image size to preserve aspect ratio and sets position. /// </summary> /// <param name="Width">Image display width</param> /// <param name="Height">Image display height</param> /// <param name="Alignment">Content alignment</param> /// <returns>Adjusted image size and position within area.</returns> /// <remarks> /// Calculates best fit to preserve aspect ratio and adjust /// position according to content alignment argument. /// </remarks> //////////////////////////////////////////////////////////////////// public PdfRectangle ImageSizePosition ( double Width, double Height, ContentAlignment Alignment ) { return(ImageSizePos.ImageArea(WidthPix, HeightPix, 0.0, 0.0, Width, Height, Alignment)); }
/// <summary> /// /// </summary> /// <param name="Width"></param> /// <param name="Height"></param> /// <param name="DrawLeft"></param> /// <param name="DrawBottom"></param> /// <param name="Alignment"></param> /// <returns></returns> public PdfRectangle ImageSizePosition ( Double Width, Double Height, Double DrawLeft, Double DrawBottom, ContentAlignment Alignment ) { return(ImageSizePos.ImageArea(WidthPix, HeightPix, DrawLeft, DrawLeft, Width, Height, Alignment)); }