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 rotate text object using the mouse?
 New Topic  Reply to Topic
Author Previous Topic Topic Next Topic  

lostman

5 Posts

Posted - May 11 2013 :  05:16:04  Show Profile  Reply
Hi,
I am using TImageEnVect where i created text object.
How can i rotate this text using the mouse? I need to rotate it at any angle. Not just 90, 180 or 270.

I tried to put text object into new layer and rotate this layer, but even if layer was rotating, object was not. When i just move the layer, object moves with it, nut does not rotate.

id := addNewObject();
ImageEnVect.ObjKind[id]:= iekText;
...
idl := ImageEnVect.LayersAdd();
ImageEnVect.objLayer[id]:= idl;
ImageEnVect.MouseInteract := ImageEnVect.MouseInteract+[miRotateLayers];

i was able to rotate text using ObjFontAngle[id]:= x; only, but i hope this is not the only way, because it just rotates text inside the object, not the object itself.
I need to find the way how to do rotation using the mouse.

Thanks for any suggestions.

w2m

USA
1990 Posts

Posted - May 11 2013 :  05:50:15  Show Profile  Reply
As far as I know there is no TIEMouseInteractVt that provides for rotating an object with the mouse.

ImageEnVect1.RotateObject(hobj, iAngle, ierObject);

Rotates specified object by the specified angle (in degrees).

If center(ierObject, ierImage) is ierImage only 90/180/270 degrees rotations are allowed.
iekBOX, iekELLIPSE, iekBITMAP, iekTEXT can be rotated only by 90/180/270 degrees.

This method doesn't work with iekMEMO and curved texts.
IEV_PREVIOUS_INSERTED_OBJECT can be specified for hobj to refer to the object that was last inserted.

IEV_ALL_SELECTED_OBJECTS can be specified for hobj to refer to all objects that are currently selected.

William Miller
Email: w2m@frontiernet.net
EBook: http://www.imageen.com/ebook/
Apprehend: http://www.frontiernet.net/~w2m/index.html
Go to Top of Page
  Previous Topic Topic Next Topic  
 New Topic  Reply to Topic
Jump To: