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
 Move rectange by selection box

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
MartinR Posted - Apr 07 2024 : 15:50:26
Hello,

I am just starting with this great library, and I find some things which I have to solve.

I have a background image and I created several small rectangles on it. I need to change the dimensions of the rectangles and move them to different positions either by using the mouse or arrow keys. When I click on a rectangle, a selection box appears, which allows me to change the dimensions of the rectangle. However, there is a bigger problem when it comes to moving the rectangle. It is difficult to precisely select the thin boundary of the selection rectangle to be able to move the rectangle.

Is there any way how to change the selection mode to move mode? Like for example press ctrl+click anywhere inside the selection box.

Thank you for your help

Martin
3   L A T E S T    R E P L I E S    (Newest First)
xequte Posted - Apr 08 2024 : 16:12:06
Hi Martin

TImageEnVect objects is our legacy class. Please use layers for all new applications:

http://www.imageen.com/help/TImageEnVect_vs_TIELayers.html

Nigel
Xequte Software
www.imageen.com
MartinR Posted - Apr 08 2024 : 02:00:43
Hi Nigel,

Thank you for your response. I would like to clarify the two concepts in your library: layers objects and vector objects. I have a large image of a Petri dish with small worms on it, and I need to create a simple app to label each worm on the dish.

To do this, I load the main image as the background and allow the user to zoom in to the appropriate size to recognize the worm. The user then uses a predefined size of the rectangle and clicks on the image at the centre of each worm. I use the addObject function to display the rectangle with the predefined size and record it in my internal structure, like the type of worm, along with the centre point and coordinates of the bounding rectangle. Sometimes it is necessary to adjust the size or position of the bounding rectangle to optimize the coverage of the worm.

This is a relatively simple task. In your library, it seems there are two different possibilities: layers and simple vector objects. I could create a layer for each bounding box or a simple rectangle for the bounding box. These worms (bounding rectangles) could be thousands on a single Petri dish image.

When using a simple drawing object (rectangle), there is a slight problem with moving it. The rectangle can be selected easily, but it is difficult to move the mouse exactly to the line of the rectangle to change its mode for moving it. So is it possible in some easy way to start moving rectangles like hold shift and move or something similar?

What is your suggestion for this type of usage?
Use a simple vector object for each bounding box, or use a new layer object for each bounding box? I forgot to mention that the bounding boxes can be overlapped.

Thank you very much for the help

Best regards
Martin

xequte Posted - Apr 07 2024 : 19:46:36
Hi Martin

It sounds like you are doing just a selection, rather than using a shape layer. Please try the demo:

\Demos\LayerEditing\Layers_AllTypes\Layers.dpr

And let us know if you need some help with it.


Nigel
Xequte Software
www.imageen.com