FOCUS ON DRAWN REGION

General discussions about GdPicture.NET.
Post Reply
charuvas1
Posts: 38
Joined: Tue Dec 02, 2008 1:49 pm

FOCUS ON DRAWN REGION

Post by charuvas1 » Tue Jan 29, 2013 2:57 pm

Hi,

I have a search function, where I draw region around the word that matches search criteria. How do I center on the region?

I am using GDPICTURE 8.5

Rgds
Charu

SamiKharma
Posts: 352
Joined: Tue Sep 27, 2011 11:47 am

Re: FOCUS ON DRAWN REGION

Post by SamiKharma » Tue Jan 29, 2013 10:26 pm

Hi,

It depends, whether you are using the RectangleOfSelection of the Highlighted Regions.
If the first, all you have to do is call the following method:
https://www.gdpicture.com/guides/gdpicture/v9/html/con ... nRect.html

if the latter, you have to get the position of region using the four functions:
GetRegionLeftPixels
GetRegionTopPixels
GetRegionWidthPixels
GetRegionHeightPixels

set a Rectangle on the document using:
SetRectCoordinatesOnDocument

Then Call the CenterOnRect function.

Hope this helps.
Best Regards,
Sami

Post Reply

Who is online

Users browsing this forum: No registered users and 2 guests