ImageEn for Delphi and C++ Builder ImageEn for Delphi and C++ Builder

 

ImageEn Forum
Profile    Join    Active Topics    Forum FAQ    Search this forumSearch
Forum membership is Free!  Click Join to sign-up
Username:
Password:
Save Password
Forgot your Password?

 All Forums
 ImageEn Library for Delphi, C++ and .Net
 ImageEn and IEvolution Support Forum
 I have some question,I'want help
 New Topic  Reply to Topic
Author Previous Topic Topic Next Topic  

ghhlovehyf

China
6 Posts

Posted - Nov 05 2013 :  04:47:40  Show Profile  Reply
use Dephi xe2
ImageEn 4.14
now , have somequestion,please help me
I have create a form,then doubleclick form to open a new form
this new from ,before it show,I have write line
the first question
// when the new form show
self.imgEv1.select(105,55,370,266)
//then test
sx1 := self.imgEv1.selx1;
sx2 := self.imgEv1.selx2;
sy1 := self.ImagEv1.sely1;
sy2 ;= self.imagev2.sely2;

I think it should like this
sx1 = 105
sy1 = 55
sx2 = 370
sy2 = 266

but,it realy like this
sx1 = 151,sx2 = 401,sy1 = 401,sy2 =251

why ??


the second question:
//on the form show
this.imgev1.autofit := false;

//do this job
this.imagev1.Rotate(90,true);

at the first
the image can cover the panel,but after the rotate,it resize the imagesize and can't cover the panel


the third question
how to make the selecttion in the middle, and i can get the rectange's point?





xequte

39109 Posts

Posted - Nov 05 2013 :  12:09:58  Show Profile  Reply
Hi

1. The selection refers to bitmap coordinates, which may not match the screen coordinates if the image has been zoomed or scrolled. You can convert them to screen coordinates with XBmp2Scr/YBmp2Scr

2. You can call ImageEnView1.Fit (or ImageEnView1.ShrinkToFit)

3. How about:

const
  Selection_Size = 0.2; // 20% of screen area
begin
  ImageEnView1.SelectionBase := iesbClientArea;
  ImageEnView1.Select(Trunc((0.5 - Selection_Size / 2) * ImageEnView1.ClientWidth),
                      Trunc((0.5 - Selection_Size / 2) * ImageEnView1.ClientHeight),
                      Trunc((0.5 + Selection_Size / 2) * ImageEnView1.ClientWidth),
                      Trunc((0.5 + Selection_Size / 2) * ImageEnView1.ClientHeight));


Nigel
Xequte Software
www.xequte.com
nigel@xequte.com
Go to Top of Page

ghhlovehyf

China
6 Posts

Posted - Nov 05 2013 :  16:28:15  Show Profile  Reply
thank you ,i want to try
Go to Top of Page

ghhlovehyf

China
6 Posts

Posted - Nov 06 2013 :  02:21:12  Show Profile  Reply
1#12289; You can convert them to screen coordinates with XBmp2Scr/YBmp2Scr
it work
Go to Top of Page
  Previous Topic Topic Next Topic  
 New Topic  Reply to Topic
Jump To: