Sergey,
Is there a way to get the selection rectangle as it's being drawn when I'm resizing an image? I tried GetSelectionRect and that gives me the correct rectangle but only after I let go of the mouse button. I want the size of the new selection I'm making with the mouse.
Thanks
Stan
GetSelectionRect Live
-
- Site Admin
- Posts: 17553
- Joined: Sat Aug 27, 2005 10:28 am
- Contact:
Re: GetSelectionRect Live
Sorry. the event where you can get these coordinates is not available.
Adding it may be not so simple, because this rectangle is implemented differently: as drawing on canvas in VCL and Lazarus for Windows, or as a special component in FireMonkey (and, probably, it will be implemented in a third way for Lazarus for Linux).
Why do you need this rectangle? Maybe I can suggest an alternative solution.
Adding it may be not so simple, because this rectangle is implemented differently: as drawing on canvas in VCL and Lazarus for Windows, or as a special component in FireMonkey (and, probably, it will be implemented in a third way for Lazarus for Linux).
Why do you need this rectangle? Maybe I can suggest an alternative solution.
Re: GetSelectionRect Live
What I'm wanting to do is to match the edges of a selected image to the edge of another. A guide line would help do that. I was thinking of adding one when an image is selected and resized. I actually got that working (see below). An optional way to do it might be to add guide lines (maybe "pulled" from rulers?) but would be more complex to do. Another way would be if it was possible to select non-contiguous items (i.e. multiple images anywhere in the doc) as needed, then use a popup menu to allow matching selected image widths, heights or both to the first image selected.
Here's what I have now. The code is relatively simple and it works although it does need some additional work to check if I'm resizing horizontally or vertically and to just show the appropriate guide.
Here's what I have now. The code is relatively simple and it works although it does need some additional work to check if I'm resizing horizontally or vertically and to just show the appropriate guide.