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
 miSelectZoom save
 New Topic  Reply to Topic
Author Previous Topic Topic Next Topic  

peberhardt

Germany
21 Posts

Posted - Jan 14 2017 :  13:08:57  Show Profile  Reply
Hello,

is possiple to save the miSelectZoom.

i want jump to differenz position with mouse click

thanks
Peter

w2m

USA
1990 Posts

Posted - Jan 14 2017 :  13:14:46  Show Profile  Reply
TImageEnView.SaveSelection

Declaration
procedure SaveSelection;

Description
Adds the current selection to the stack (selections list).

Example
ImageEnView1.Select(10, 10, 100, 100);
ImageEnView1.SaveSelection;
ImageEnView1.Select(200, 200, 150, 150);
ImageEnView1.SaveSelection;
ImageEnView1.Deselect;

ImageEnView1.RestoreSelection; // reload 200,200,150,150
..
ImageEnView1.RestoreSelection; // reload 10,10,100,100

Bill Miller
Adirondack Software & Graphics
Email: w2m@hughes.net
EBook: http://www.imageen.com/ebook/
Custom Commercial ImageEn Development
Go to Top of Page

peberhardt

Germany
21 Posts

Posted - Jan 14 2017 :  13:36:47  Show Profile  Reply
Hello,

thanks for your extrem fast answer.

but i have a problem

i want this:

miSelectZoom := '10, 10, 100, 100'

ImageEnVect1.MouseInteract := ImageEnVect1.MouseInteract + [miSelectZoom];

thanks
peter from Germany
Go to Top of Page

w2m

USA
1990 Posts

Posted - Jan 14 2017 :  13:43:30  Show Profile  Reply
TImageEnView.ZoomSelection

Declaration
procedure ZoomSelection(AspectRatio: Boolean);

Description
The ZoomSelection method zooms to a rectangular area specified with Select method. If AspectRatio is true then the zoom respects the aspect ratio of the image, otherwise the image area is stretched to match the size of the component.

Example
ImageEnView1.Select(10, 10, 100, 100);
ImageEnView1.ZoomSelection; // fill client area (if possible) with rectangle 10,10,100,100

Bill Miller
Adirondack Software & Graphics
Email: w2m@hughes.net
EBook: http://www.imageen.com/ebook/
Custom Commercial ImageEn Development
Go to Top of Page

peberhardt

Germany
21 Posts

Posted - Jan 14 2017 :  14:00:29  Show Profile  Reply
hello,

ok, this is ok.

but: how i can read the 4 values when i make a rectangle with the mouse

thank you
peter

Go to Top of Page

w2m

USA
1990 Posts

Posted - Jan 14 2017 :  14:05:02  Show Profile  Reply
Please read the help file in the TImageEnView Selections subheading...
TImageEnView.SelX1
TImageEnView.SelX2
TImageEnView.SelY1
TImageEnView.SelY2

If you haven't already study the help file.

Bill Miller
Adirondack Software & Graphics
Email: w2m@hughes.net
EBook: http://www.imageen.com/ebook/
Custom Commercial ImageEn Development
Go to Top of Page

peberhardt

Germany
21 Posts

Posted - Jan 15 2017 :  13:29:18  Show Profile  Reply
Hello,

my solution:


-------
first:
---------------------------------------------------------------

first button caption: 'make a selection'
code: MouseInteract := MouseInteract + [miSelect];

---------------------------------------------------------------


--------
secound:
---------------------------------------------------------------
code in ImageEnVect1MouseUp

var_start_x := ImageEnVect1.SelectedRect.x;
var_start_y := ImageEnVect1.SelectedRect.y;
var_end_x := ImageEnVect1.SelectedRect.x + ImageEnVect1.SelectedRect.width;
var_end_y := ImageEnVect1.SelectedRect.y + ImageEnVect1.SelectedRect.height;

var_view_x := ImageEnVect1.ViewX;
var_view_y := ImageEnVect1.ViewY;

var_zoom := ImageEnVect1.Zoom;

// save all var* in Database

ImageEnVect1.DeSelect;


--------
Thirdly:
---------------------------------------------------------------
ImageEnVect1.Zoom := var_zoom;

ImageEnVect1.SetViewXY(var_view_x, var_view_y);



ImageEnVect1.Select(var_start_x, var_start_y, var_end_x, var_end_y);
ImageEnVect1.SaveSelection;
ImageEnVect1.ZoomSelection;


thank you Bill for help.


PS. is possible i can Reading a part from your e-book as test?

my e-mail: info@peter-eberhardt.de

best regards
peter



Go to Top of Page
  Previous Topic Topic Next Topic  
 New Topic  Reply to Topic
Jump To: