Loading...

CoordObjectToImage

Support for GdViewer OCX and GdViewer Pro ActiveX/SDK.

CoordObjectToImage

Postby 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
madi1270
 
Posts: 5
Joined: Wed Jan 13, 2010 11:21 am

Re: CoordObjectToImage

Postby 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:
http://guides.gdpicture.com/v5/gdpictur ... ouseX.html
http://guides.gdpicture.com/v5/gdpictur ... ouseY.html



With best regards,

Loïc
Loïc Carrère, support team.
www.orpalis.com
User avatar
Loïc
Site Admin
 
Posts: 4441
Joined: Tue Oct 17, 2006 10:48 pm
Location: France

Re: CoordObjectToImage

Postby 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
madi1270
 
Posts: 5
Joined: Wed Jan 13, 2010 11:21 am

Re: CoordObjectToImage

Postby 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:
http://guides.gdpicture.com/v5/gdpictur ... ouseX.html
http://guides.gdpicture.com/v5/gdpictur ... ouseY.html



With best regards,

Loïc

Hello,
I am having the same problem.
These functions also return '0'.
arcadyAbr
 
Posts: 5
Joined: Mon Aug 08, 2011 8:39 am


Return to GdViewer [Pro] ActiveX

Who is online

Users browsing this forum: No registered users and 1 guest