|
-
Apr 18th, 2025, 06:12 PM
#4
Re: Image crop
 Originally Posted by k_zeon
that looks like its what i am after. would it be poss to have 4 textboxes that hold the 4 coordinates of the actual image.
100% possible, once you've added a picture box and changed the code to use the PB instead of the Form (by changing all "Form_" methods and "Me." references to PictureBox1), you can add any other controls you like to the Form.
The selection rectangle Left/Top/Right/Bottom values are all stored in the mt_SelRect UDT variable in Image coordinates, so you would simply need to update the appropriate UDT element values when the value in a TextBox changes.
 Originally Posted by k_zeon
Top Left , Top Right , Bottom Left ,Bottom right so
I think 4 TextBoxes (Left, Right, Top, Bottom) would make more sense for a selection rectangle, but if you really want to allow users to set X & Y values for each rectangle corner point, remember that you have to update your UI for changes in one TB to reflect in another TB. For example, if the user changes the X value in the Top Left XY pair of textboxes, then the X value will have to be updated in the Bottom Left pair of boxes as well (as each X/Y value is being shown 2x - otherwise you're defined points may be a quadrilateral that is potentially non-rectangular).
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|