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
 flip an object
 New Topic  Reply to Topic
Author Previous Topic Topic Next Topic  

pierrotsc

USA
499 Posts

Posted - Apr 26 2016 :  07:53:18  Show Profile  Reply
I know you can flip an image horizontal or vertical. what about if there are any objects on the layer. how or can you flip them too?

w2m

USA
1990 Posts

Posted - Apr 26 2016 :  08:18:18  Show Profile  Reply
Flip the IEBitmap in the selected layer and all selected bitmaps in the layer:
procedure TMainForm.Flip1Click(Sender: TObject);
var
  i: Integer;
  iIEBitmap: TIEBitmap;
begin
  // flip the base IEBitmap in the selected layer
  ImageEnVect1.IEBitmap.Flip(fdVertical);
  // find and flip all iekBITMAP objects in the selected layer
  for i := 0 to ImageEnVect1.SelObjectsCount - 1 do
    if ImageEnVect1.ObjKind[ImageEnVect1.SelObjects[i]] = iekBITMAP then
    begin
      iIEBitmap := ImageEnVect1.ObjBitmap[i];
      iIEBitmap.Flip(fdVertical);
    end;
  ImageEnVect1.Update;
end;

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

pierrotsc

USA
499 Posts

Posted - Apr 26 2016 :  08:59:45  Show Profile  Reply
Thanks Bill, but the box does not flip. The box is a vector iekbox, not iekbitmap.
Go to Top of Page

w2m

USA
1990 Posts

Posted - Apr 26 2016 :  09:04:33  Show Profile  Reply
Of course... look at the code... this only flips iebitmap objects. It is not possible to flip other objects as far as I understand. You could reposition the object width or height to give the appearance of flipping. For some objects like text or memo objects it does not even make sense to flip them at all.

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

pierrotsc

USA
499 Posts

Posted - Apr 26 2016 :  09:25:12  Show Profile  Reply
Indeed, just wanted to flip boxes..Thanks.
Go to Top of Page

wesleybobato

Brazil
367 Posts

Posted - Apr 26 2016 :  11:33:50  Show Profile  Reply
Hello you wish it had a property Angle to rotate their boxes.

Watch the Video Below.

Good luck.

attach/wesleybobato/2016426113257_Box.zip
7587.69 KB
Go to Top of Page

pierrotsc

USA
499 Posts

Posted - Apr 26 2016 :  11:46:25  Show Profile  Reply
Thanks..That is awesome. How do you do that ?
Go to Top of Page

wesleybobato

Brazil
367 Posts

Posted - Apr 26 2016 :  12:39:58  Show Profile  Reply
Hello.

This is a feature of Google Picasa Software.

:)-
Go to Top of Page

w2m

USA
1990 Posts

Posted - Apr 26 2016 :  12:54:01  Show Profile  Reply
TImageEnVect already has a rotate method, but only allows rotate in increments of 90 degrees for some objects. See the help file:
ImageEnVect1.RotateObject(hobj, 90, ierImage);

The problem with achieving mouse or touch rotation of an TImageEnVect object is that there is no miRotateObject TIEMouseInteractVtItem and the current code only allows rotation of some objects in increments of 90 degrees.

To achieve this it would take some significant enhancements to the source code. I have no idea if it is even possible to accomplish. If the developers pursue this, then I suspect rotation of a layer with attached objects would function better. It may also require adding a RotateObjectsWhenRotatingLayer property as well.

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

xequte

39061 Posts

Posted - Apr 27 2016 :  23:32:24  Show Profile  Reply
Hi

A major overhaul of TImageEnVect is on the to-do list. You should vote for it in our upcoming survey.

Nigel
Xequte Software
www.xequte.com
nigel@xequte.com
Go to Top of Page
  Previous Topic Topic Next Topic  
 New Topic  Reply to Topic
Jump To: