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
 How to position an image?
 New Topic  Reply to Topic
Author Previous Topic Topic Next Topic  

pierrotsc

USA
497 Posts

Posted - Aug 29 2012 :  08:57:58  Show Profile  Reply
I have an image in my imageenview. I would like to have its top left corner positionned at a certain x,y location of my imageenview using code and not the mouse move.
Can it be done?
Thanks.
P

PS: Let me add a little bit more. I have 2 layers. Layers 0 has some vector boxes. Layer 1 has an image. The image can be bigger than layer 0. So i move the image around to fit the boxes. I select the portion of the image that fit the box and crop it. Now the image does not stay at the same location. It is moved away from the box and i have to use the move ool to reposition it.

w2m

USA
1990 Posts

Posted - Aug 29 2012 :  10:48:22  Show Profile  Reply
BackgroundImage or layer 0
ImageEnView1.ViewX:=20; // view from column 20 of bitmap
ImageEnView1.ViewY:=20; // view from row 20 of bitmap

Layers
ImageEnView1.Layers[1].PosX := 20;
ImageEnView1.Layers[1].PosY := 20;

ViewX and ViewY are the first column and the first line to display.

PosX, PosY specifies the relative (to layer 0 - background image) position of the layer. Valid only when LayersSync=False.

William Miller
Adirondack Software & Graphics
Email: w2m@frontiernet.net
EBook: http://www.imageen.com/ebook/
Apprehend: http://www.frontiernet.net/~w2m/index.html
Go to Top of Page

pierrotsc

USA
497 Posts

Posted - Aug 29 2012 :  11:20:35  Show Profile  Reply
Perfect..Just what i needed.
Thanks.
Go to Top of Page
  Previous Topic Topic Next Topic  
 New Topic  Reply to Topic
Jump To: