ONLINE HELP
 WINDEVWEBDEV AND WINDEV MOBILE

Help / WLanguage / WLanguage functions / Controls, pages and windows / Control functions
WINDEV
WindowsLinuxUniversal Windows 10 AppJavaReports and QueriesUser code (UMC)
WEBDEV
WindowsLinuxPHPWEBDEV - Browser code
WINDEV Mobile
AndroidAndroid Widget iPhone/iPadIOS WidgetApple WatchMac CatalystUniversal Windows 10 App
Others
Stored procedures
Converts the coordinates of a rectangle in the original image to the Image control coordinate system. This function is used to match the coordinates of the source image with the coordinates of the Image control.
Example
// Load image for OCR
ImageForOCR is Image = dLoadImage(MyImage)
// Display a thumbnail of the image in the control
IMG_Thumbnail = ImageForOCR
// Detect text areas
arrAreas is array of Polygon = OCRDetectTextArea(ImageForOCR)
// Draw rectangles in the thumbnail
dStartDrawing(IMG_Thumbnail)
FOR EACH rect OF arrAreas
// Transform polygon into a rectangle (here we consider that the polygon has a right angle)
recTemp is Rectangle
recTemp.X = rect.Point[1].X
recTemp.Y = rect.Point[1].Y
recTemp.Width = rect.Point[2].X - rect.Point[1].X
recTemp.Height = rect.Point[3].Y - rect.Point[1].Y
   
let rectImage = CoordinateImageToImageControl(IMG_Thumbnail, recTemp)
dRectangle(rectImage)
END
Syntax
<Result> = CoordinateImageToImageControl(<Image control> , <Coordinates to convert>)
<Result>: Rectangle variable
Rectangle variable that corresponds to the rectangle in the Image control coordinate system.
<Image control>: Control name
Image control used.
<Coordinates to convert>: Rectangle variable
Name of the Rectangle variable that corresponds to the rectangle in the original image coordinate system.
Remarks
  • The conversion takes into account the display mode of the image.
  • The function is ignored if the displayed image is repeated.
Component: wd290obj.dll
Minimum version required
  • Version 26
This page is also available for…
Comments
Click [Add] to post a comment

Last update: 02/22/2024

Send a report | Local help