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
 disable rotation and fixed aspect ratio

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
johnbitner Posted - Feb 24 2017 : 09:14:23
1. Can you disable the rotate features of the CropToolInteraction? I want to allow crop but not rotate in my tools.
2. I set the following in my code but I can still can resize the crop area from the sides and get a ratio that is not 1/1.


  imgview.CropToolInteraction.LockAspectRatio:= 1;
  imgview.SelectionAspectRatio:= 1 / 1;
  imgview.CropToolInteraction.Options:= [iecoSideGripsRespectLocks];
  imgview.CropToolInteraction.DrawGuides := True;
  imgview.CropToolInteraction.AntialiasMode := ierBicubic;
  imgview.CropToolInteraction.GripSize := 12;
  imgview.MouseInteract := [miCropTool];


See in the capture below the crop area is not 1/1.



John B
8   L A T E S T    R E P L I E S    (Newest First)
xequte Posted - Mar 02 2017 : 15:00:21
Hi John

We're aiming for a release this month, but it depends on the length of the bug testing phase. But you can email for a pre-release.

Nigel
Xequte Software
www.xequte.com
nigel@xequte.com
johnbitner Posted - Feb 28 2017 : 09:51:12
Awesome guys! Thanks for the quick responses and new features! How soon with this build be ready to download?

John B
xequte Posted - Feb 26 2017 : 18:14:39
Hi

These are the CropTool Options in v7.0.0:

iecoAllowResizing: The user can resize the crop selection by dragging the corner or side grips
iecoAllowRotating: The user can rotate the crop selection by dragging outside the corner grips
iecoAllowMoving: The user can move the crop selection by clicking within the selection area
iecoSideGripsRespectLocks: Determines whether the specified aspect ratio lock is enforced when dragging the side, top and bottom grips. If this option is not set then only the corner grips will respect the lock
iecoSizeLocksAreMinimums: If included, then the specified LockWidth or LockHeight are treated as minimum values, i.e. the user can make the selection larger than the specified values, but not smaller

Nigel
Xequte Software
www.xequte.com
nigel@xequte.com
w2m Posted - Feb 24 2017 : 15:48:39
Hmmm. I guess you are correct, but only when a non-corner grip is used. The proportionality remains until the dimensions of the selection are less or equal to the state of the dimensions when the croptool is created. I do not see this when using the corner grips.

Maybe Nigel should take a look at this.

Also it would be "nice" to add iecoNoRotation option to achieve your needs and to be able to set the dimensions of the crop dimensions when the crop tool is created. If you create the croptool and then click on the image before dragging, the crop tool appears but the dimensions are not proportional when ImageEnView.CropToolInteraction.LockAspectRatio:= 1; The proportionality only kicks in as you resize the selection or if you click on a corner grip.

Bill Miller
Adirondack Software & Graphics
Email: w2m@hughes.net
EBook: http://www.imageen.com/ebook/
Custom Commercial ImageEn Development
johnbitner Posted - Feb 24 2017 : 15:29:53
If I drag from the corners the skewing doesn't occur. That is true. If I drag from the side grips I get what you see in the screenshot. Once you get small enough the proportion isn't 1/1.

I posted a video in the zip that shows the skew when you resize from the side grip.

Thanks for your help.

attach/johnbitner/201722415290_cropissue.zip
896.29 KB

John B
w2m Posted - Feb 24 2017 : 13:54:45
In my testing, the crop tool was proportional 1:1 ie. width = 300 height = 300 and resized proportionally at 1:1 with my code. However, I do not think there is a way to prevent rotation in the current version.

Your demo does the same thing as my test.
 
I can still can rotate the crop area and skew the area when I drag the side grips.

This is not true even with your demo. You can rotate but you can not skew the selection so it is no longer proportional. There is no apparent way to prevent rotation in the current version.

Bill Miller
Adirondack Software & Graphics
Email: w2m@hughes.net
EBook: http://www.imageen.com/ebook/
Custom Commercial ImageEn Development
johnbitner Posted - Feb 24 2017 : 12:35:56
Hello, thanks for the example. Made the changes in my code. Still can rotate the image and skew the crop area. I made a small project with just the TImageEnView control, the code above to setup the crop tool, and a method to load an image. I can still can rotate the crop area and skew the area when I drag the side grips. Attached is the simple project and an image.



attach/johnbitner/2017224123432_imagedemo.zip
6.77 KB

John B
w2m Posted - Feb 24 2017 : 09:46:43
ImageEnView.CropToolInteraction.LockAspectRatio:= 1;
ImageEnView.SelectionAspectRatio:= 1;
ImageEnView.CropToolInteraction.Options:= [iecoSideGripsRespectLocks];
ImageEnView.CropToolInteraction.DrawGuides := True;
ImageEnView.CropToolInteraction.AntialiasMode := ierBicubic;
ImageEnView.CropToolInteraction.GripSize := 12;
ImageEnView.MouseInteract := [miCropTool];
ImageEnView.DisplayGridKind := iedgNone;

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