CoordObjectToImage

Discussions about document viewing.
Post Reply
madi1270
Posts: 5
Joined: Wed Jan 13, 2010 11:21 am
Contact:

CoordObjectToImage

Post by madi1270 » Tue Jan 19, 2010 8:55 am

Hi..

I'm using Powerbuilder 10.5.2 build 7826. Currently i'm evaluating GdPicturePro5 to be used in our application to manipulate image.

I try to insert text into my image object. Before I do that, I need to get coordinate of x & y of the displayed image.
In mousedowncontrol event I put this code

Code: Select all

long ll_startposx, ll_startposy

sle_obj_x.text = String(Long(ocx_x))
sle_obj_y.text = String(Long(ocx_y))

ole_1.Object.CoordObjectToImage(Long(sle_obj_x.text), Long(sle_obj_y.text), ll_StartPosX, ll_StartPosY)
Here ole_1.Object is the GdPicturePro5.GdViewerCnt OCX object.

But ll_StartPosX & ll_StartPosY always return 0 when I clicked on the viewer object during runtime.

Need your feedback before we can decide to buy the product.

Regards
MUL

User avatar
Loïc
Site Admin
Posts: 5881
Joined: Tue Oct 17, 2006 10:48 pm
Location: France
Contact:

Re: CoordObjectToImage

Post by Loïc » Tue Jan 19, 2010 1:38 pm

Hi,

i think you are missing some information during your conversion.

I suggest you to call the GetMouseX & GetMouseY functions to solve your issue.

See:
https://www.gdpicture.com/guides/gdpicture/v5/gdpictur ... ouseX.html
https://www.gdpicture.com/guides/gdpicture/v5/gdpictur ... ouseY.html



With best regards,

Loïc

madi1270
Posts: 5
Joined: Wed Jan 13, 2010 11:21 am
Contact:

Re: CoordObjectToImage

Post by madi1270 » Tue Jan 19, 2010 6:21 pm

Thanks for the quick reply...

I'm using the sample code provided in sample dir. The sample for VB .Net. (Text Writer sample). I converted the code to my powerbuilder application. Everything seems ok, except for the CoordObjectToImage & CoordImageToObject not returning the coordinate values (Always return 0 for x & y).

Regards
MUL

arcadyAbr
Posts: 6
Joined: Mon Aug 08, 2011 8:39 am

Re: CoordObjectToImage

Post by arcadyAbr » Mon Sep 26, 2011 12:21 pm

Loïc wrote:Hi,

i think you are missing some information during your conversion.

I suggest you to call the GetMouseX & GetMouseY functions to solve your issue.

See:
https://www.gdpicture.com/guides/gdpicture/v5/gdpictur ... ouseX.html
https://www.gdpicture.com/guides/gdpicture/v5/gdpictur ... ouseY.html



With best regards,

Loïc
Hello,
I am having the same problem.
These functions also return '0'.

Post Reply

Who is online

Users browsing this forum: No registered users and 1 guest