Adjusts the given rectangle based on the given paint mode properties.
public static Leadtools.LeadRect CalculatePaintModeRectangle(int sourceWidth,int sourceHeight,Leadtools.LeadRect destinationRectangle,Leadtools.RasterPaintSizeMode sizeMode,Leadtools.RasterPaintAlignMode horizontalAlignMode,Leadtools.RasterPaintAlignMode verticalAlignMode)
Public Shared Function CalculatePaintModeRectangle( _ByVal sourceWidth As Integer, _ByVal sourceHeight As Integer, _ByVal destinationRectangle As Leadtools.LeadRect, _ByVal sizeMode As Leadtools.RasterPaintSizeMode, _ByVal horizontalAlignMode As Leadtools.RasterPaintAlignMode, _ByVal verticalAlignMode As Leadtools.RasterPaintAlignMode _) As Leadtools.LeadRect
public static Leadtools.LeadRect CalculatePaintModeRectangle(int sourceWidth,int sourceHeight,Leadtools.LeadRect destinationRectangle,Leadtools.RasterPaintSizeMode sizeMode,Leadtools.RasterPaintAlignMode horizontalAlignMode,Leadtools.RasterPaintAlignMode verticalAlignMode)
+ (LeadRect)calculatePaintModeRectangle:(NSInteger)sourceWidthsourceHeight:(NSInteger)sourceHeightdestinationRectangle:(LeadRect)dstRectsizeMode:(LTRasterPaintSizeMode)sizeModehorizontalAlignMode:(LTRasterPaintAlignMode)horizontalAlignModeverticalAlignMode:(LTRasterPaintAlignMode)verticalAlignMode
public static LeadRect calculatePaintModeRectangle(int sourceWidth,int sourceHeight,LeadRect destinationRectangle,RasterPaintSizeMode sizeMode,RasterPaintAlignMode horizontalAlignMode,RasterPaintAlignMode verticalAlignMode)
function Leadtools.RasterImage.CalculatePaintModeRectangle(sourceWidth ,sourceHeight ,destinationRectangle ,sizeMode ,horizontalAlignMode ,verticalAlignMode)
public:static Leadtools.LeadRect CalculatePaintModeRectangle(int sourceWidth,int sourceHeight,Leadtools.LeadRect destinationRectangle,Leadtools.RasterPaintSizeMode sizeMode,Leadtools.RasterPaintAlignMode horizontalAlignMode,Leadtools.RasterPaintAlignMode verticalAlignMode)
sourceWidth
The width of the source rectangle.
sourceHeight
The height of the source rectangle.
destinationRectangle
Destination rectangle.
sizeMode
Controls how the source rectangle is positioned inside the destination rectangle.
horizontalAlignMode
Controls how the source rectangle is aligned horizontally inside the destination rectangle.
verticalAlignMode
Controls how the source rectangle is aligned vertically inside the destination rectangle.
The new destination rectangle adjusted based on the size mode and alignment.
This method allows you to calculate how a source rectangle can be adjusted into a destination rectangle based on a size mode and alignment.
using Leadtools;using Leadtools.Codecs;using Leadtools.ImageProcessing;using Leadtools.ImageProcessing.Core;using Leadtools.ImageProcessing.Color;using Leadtools.Dicom;using Leadtools.Drawing;using Leadtools.Controls;using LeadtoolsExamples.Common;using Leadtools.Svg;public void CalculatePaintModeRectangleExample(){// assume image width/height of 3000 x 1000// assume client rectangle of 500 x 500LeadRect client = new LeadRect(0, 0, 500, 500);LeadRect fit = RasterImage.CalculatePaintModeRectangle(3000, 1000, client, RasterPaintSizeMode.Fit, RasterPaintAlignMode.Near, RasterPaintAlignMode.Near);Console.WriteLine("{0},{1},{2},{3}", fit.Left, fit.Top, fit.Right, fit.Bottom);}
Imports LeadtoolsImports Leadtools.CodecsImports Leadtools.ImageProcessingImports Leadtools.ImageProcessing.CoreImports Leadtools.ImageProcessing.ColorImports Leadtools.ControlsImports Leadtools.DicomImports Leadtools.DrawingImports Leadtools.SvgPublic Sub CalculatePaintModeRectangleExample()' assume image width/height of 3000 x 1000' assume client rectangle of 500 x 500Dim client As LeadRect = New LeadRect(0, 0, 500, 500)Dim fit As LeadRect = RasterImage.CalculatePaintModeRectangle(3000, 1000, client, RasterPaintSizeMode.Fit, RasterPaintAlignMode.Near,RasterPaintAlignMode.Near)Console.WriteLine("{0},{1},{2},{3}", fit.Left, fit.Top, fit.Right, fit.Bottom)End Sub
|
Products |
Support |
Feedback: CalculatePaintModeRectangle Method - Leadtools |
Introduction |
Help Version 19.0.2017.6.19
|

Raster .NET | C API | C++ Class Library | JavaScript HTML5
Document .NET | C API | C++ Class Library | JavaScript HTML5
Medical .NET | C API | C++ Class Library | JavaScript HTML5
Medical Web Viewer .NET
Your email has been sent to support! Someone should be in touch! If your matter is urgent please come back into chat.
Chat Hours:
Monday - Friday, 8:30am to 6pm ET
Thank you for your feedback!
Please fill out the form again to start a new chat.
All agents are currently offline.
Chat Hours:
Monday - Friday
8:30AM - 6PM EST
To contact us please fill out this form and we will contact you via email.