Page 1 of 1

CoordObjectToImage

Posted: Tue Jan 19, 2010 8:55 am
by madi1270
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

Re: CoordObjectToImage

Posted: Tue Jan 19, 2010 1:38 pm
by Loïc
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

Re: CoordObjectToImage

Posted: Tue Jan 19, 2010 6:21 pm
by madi1270
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

Re: CoordObjectToImage

Posted: Mon Sep 26, 2011 12:21 pm
by arcadyAbr
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'.