T O P I C R E V I E W |
Flashcqxg |
Posted - Jul 24 2023 : 06:13:30 I have allow users to draw a rectangular area, and the code is as follows. I want to achieve the following two points: 1. If the image is not loaded, users cannot use the mouse to draw layers; 2. After loading the image, the user can only draw a rectangular area layer within the size range of the image, and during the drawing process, the mouse cannot exceed the size range of the image. Thanks.
ImgeEnView.MouseInteractLayers := [mlCreateShapeLayers]; IEGlobalSettings().DefaultLayerShape := iesRectangle; |
4 L A T E S T R E P L I E S (Newest First) |
Flashcqxg |
Posted - Jul 25 2023 : 01:54:23 Thanks. |
xequte |
Posted - Jul 25 2023 : 00:48:28 Hi
Avoid applying MouseInteractLayers := [mlCreateShapeLayers]; until after image loading, e.g. by checking IsEmpty in the OnImageChange event:
http://www.imageen.com/help/TImageEnView.IsEmpty.html
Nigel Xequte Software www.imageen.com
|
Flashcqxg |
Posted - Jul 24 2023 : 18:48:05 Thank you, the second issue has been resolved. But if there is no image loaded, it is also necessary to disable mouse drag. Can this be achieved? |
xequte |
Posted - Jul 24 2023 : 18:16:00 Please see loPreventOutOfBounds for TImageEnView.LayerOptions:
https://www.imageen.com/help/TImageEnView.LayerOptions.html
Nigel Xequte Software www.imageen.com
|