Loading...

How to select fix ratio area

Support for GdViewer OCX and GdViewer Pro ActiveX/SDK.

How to select fix ratio area

Postby ming » Fri Apr 25, 2008 11:01 am

Hi Loic,

I want to select fix ratio area from a image, (ie. 1:1, 3:2, 4:3, 16:9, etc.)
Can you show how to select fix ratio area using MouseModeAreaSelect,


Thanks
Ming
ming
 
Posts: 9
Joined: Wed Jun 13, 2007 6:08 am

Re: How to select fix ratio area

Postby Loïc » Fri Apr 25, 2008 1:14 pm

Ming,

I don't understang what you need. Could you give me few precisions ?

Best regards,

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

Re: How to select fix ratio area

Postby ming » Fri Apr 25, 2008 8:16 pm

Hi Loïc,

Thanks for the reply,
I have a picture want to selected area to create new image,
The MouseModeSelection can do that,
but i want select the desired crop proportion of the selected area,
(the selected area proportion, width:Height 3:2, 4:3, 5:7)

I try the following code in the gdViewer.MouseMoveControl methods
but the result not friendly, do you have any ideal.

I am using vfp,
some code in the oGdViewer.MouseMoveControl methods

IF Thisform.oGdViewer.MouseMode = 1 && MouseModeAreaSelection
local lnTop, lnLeft, lnWidth, lnHeight, lnProportion
lnTop = 0
lnLeft = 0
lnWidth = 0
lnHeight = 0
lnProportion = 1.5 && (3:2 = 1.5, 4:3 = 1.333, )
Thisform.oGdViewer.GetRectValues(@lnLeft, @lnTop, @lnWidth, @lnHeight)
Thisform.oGdViewer.SetRectValues(lnLeft,lnTop,lnHeight*lnProportion,lnHeight)
......
.....
ENDIF


Thanks
Ming
ming
 
Posts: 9
Joined: Wed Jun 13, 2007 6:08 am

Re: How to select fix ratio area

Postby Loïc » Mon Apr 28, 2008 11:49 am

Hi Ming,

Unfortunately I am still not understanding what you want to do...

Do you want to create a new image from the dispayed area of the GdViewer ?

Do you want to zoom on a custom area ?...

Please, explain me clearly what you are trying to do. :)

Best regards,

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

Re: How to select fix ratio area

Postby ming » Mon Apr 28, 2008 4:48 pm

Hi Loïc,

Loïc wrote:
Do you want to create a new image from the displayed area of the GdViewer ?
Loïc Carrère

Yes.

If i want to create a new image in the ratio 4 x 6 from the displayed image of the GdViewer,
How to use the MouseModeAreaSelection to select area in the ratio 4 x 6.

I attached a picture for your reference.
img00021.jpg



Many Thanks,
Ming
ming
 
Posts: 9
Joined: Wed Jun 13, 2007 6:08 am

Re: How to select fix ratio area

Postby Loïc » Tue Apr 29, 2008 2:31 pm

Hi Ming,



If i want to create a new image in the ratio 4 x 6 from the displayed image of the GdViewer,
How to use the MouseModeAreaSelection to select area in the ratio 4 x 6.


What you are trying to explain is always difficult to understand for me :?


However, are you trying do do that: ?

Code: Select all
Thisform.oGdViewer.SetRectValues(0, 0, Thisform.oGdViewer.ImageWidth, Thisform.oGdViewer.ImageWidth * (6/4))



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

Re: How to select fix ratio area

Postby ming » Fri May 02, 2008 5:56 am

Hi Loïc,

Thank you so much for your tips and support,
I found a solution to solve my problem.

Best regards,
Ming
ming
 
Posts: 9
Joined: Wed Jun 13, 2007 6:08 am


Return to GdViewer [Pro] ActiveX

Who is online

Users browsing this forum: No registered users and 1 guest

cron