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

 

ImageEn Forum
Profile    Join    Active Topics    Forum FAQ    Search this forumSearch
 All Forums
 ImageEn Library for Delphi, C++ and .Net
 ImageEn and IEvolution Support Forum
 Obj always in center?

Note: You must be registered in order to post a reply.
To register, click here. Registration is FREE!

View 
UserName:
Password:
Format  Bold Italicized Underline  Align Left Centered Align Right  Horizontal Rule  Insert Hyperlink   Browse for an image to attach to your post Browse for a zip to attach to your post Insert Code  Insert Quote Insert List
   
Message 

 

Emoji
Smile [:)] Big Smile [:D] Cool [8D] Blush [:I]
Tongue [:P] Evil [):] Wink [;)] Black Eye [B)]
Frown [:(] Shocked [:0] Angry [:(!] Sleepy [|)]
Kisses [:X] Approve [^] Disapprove [V] Question [?]

 
Check here to subscribe to this topic.
   

T O P I C    R E V I E W
dracola Posted - Oct 17 2015 : 04:17:38
I used imageenvect, and load an image, than i create a square object around the image.
after i do rotate an resample to the image, the square object always anchor at position 0,0 (top left)
how i make the square object always at centre of the image after i do rotate or resample?

thank's
5   L A T E S T    R E P L I E S    (Newest First)
dracola Posted - Oct 22 2015 : 04:37:17
i will try it, thank you for quick respond ^_^

....typing...typing source code...
....
...compile...
....

yeahhhh...it's work
thank's so much ^_^
xequte Posted - Oct 21 2015 : 16:46:51
Hi

Objects are not moved when the background bitmap changes.

You will need to move the objects after resampling:

1. Get the size of the bitmap
2. Resample the bitmap
3. Iterate through all the objects changing ObjLeft[] and ObjTop[] by NewSize - OldSize div 2

There is an iteration example at:

http://www.imageen.com/help/TImageEnVect.ObjectsCount.html


Good luck to Argentina in the Rugby World Cup semi-final this weekend!

Nigel
Xequte Software
www.xequte.com
nigel@xequte.com
dracola Posted - Oct 19 2015 : 22:32:40
How to make the red square object always at center position, after i do zooming.
thank's
dracola Posted - Oct 19 2015 : 22:29:45
procedure TForm1.FormShow(Sender: TObject);
begin
 //load images
 ImageEnVect1.Zoom:=20;
 ImageEnVect1.IO.LoadFromFile('C:\15052149 ely\IMG_8738 copy.jpg');

 //add square object around image
 ImageEnVect1.AddNewObject(iekBOX, Rect( 0, 0 ,ImageEnVect1.Bitmap.Width,ImageEnVect1.Bitmap.Height;), clred);


end;



procedure TForm1.Zoom(Sender: TObject);
begin
  ImageEnVect1.CurrentLayer.Bitmap.Resample(ImageEnVect1.CurrentLayer.Bitmap.Width+10, -1, rfTriangle, True);

 ImageEnVect1.Update;
end;



xequte Posted - Oct 19 2015 : 18:00:16
Sorry, can you give me a sample of your code.



Nigel
Xequte Software
www.xequte.com
nigel@xequte.com