コード例 #1
0
 ////////////////////////////////////////////////////////////////////
 /// <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));
 }
コード例 #2
0
 ////////////////////////////////////////////////////////////////////
 /// <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));
 }
コード例 #3
0
 ////////////////////////////////////////////////////////////////////
 /// <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));
 }
コード例 #4
0
 ////////////////////////////////////////////////////////////////////
 /// <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));
 }
コード例 #5
0
 /// <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));
 }