Region and coordinates

Discussions about document viewing.
Post Reply
evilripper
Posts: 2
Joined: Wed Jan 12, 2011 5:01 pm
Contact:

Region and coordinates

Post by evilripper » Wed Jan 12, 2011 5:09 pm

Hi, i'm testing your component and i have a question:

I saved this data on a csv

Code: Select all

gdvDocument.GetRegionTop(regionId);
gdvDocument.GetRegionLeft(regionId);
gdvDocument.GetRegionWidth(regionId);
gdvDocument.GetRegionHeight(regionId);
now how can i retrive the pixels from the inches?
I tried

Code: Select all

 
float resolution = _gdpImaging.GetVerticalResolution(_imageId);
LeftArea = Convert.ToInt32(Convert.ToDouble(values[0])*resolution);
TopArea = Convert.ToInt32(Convert.ToDouble(values[1]) * resolution);
WidthArea = Convert.ToInt32(Convert.ToDouble(values[2]) * resolution);
HeightArea = Convert.ToInt32(Convert.ToDouble(values[3]) * resolution);
Witdh and Height are ok but the top and left are not ok! :cry:

thanks

evilripper
Posts: 2
Joined: Wed Jan 12, 2011 5:01 pm
Contact:

Re: Region and coordinates

Post by evilripper » Thu Jan 13, 2011 10:17 am

ok now I use
gdvDocument.AddRegionInches
and it works! :roll:

Post Reply

Who is online

Users browsing this forum: No registered users and 0 guests