Closed hariyogi closed 2 days ago
Hello. Integer division in Java yields an integer result. Please use setAspect(16.0/9)
Based on your reaction, it seems our response was helpful, so we're closing this issue. If you have any further questions, feel free to reopen it or create a new one.
Describe the bug
If we set the aspect to 16/9, the resulting area is still square, not rectangular. However, if we set it to 1.777777777777777, the result will be rectangular.
Expected behavior
Aspect 16 / 9 should create a rectangular crop area.
Minimal reproducible example
Image image = new Image("images/my-image.png", "image to crop");
ImageCrop imageCrop = new ImageCrop(image ); imageCrop.setAspect(16/9); add(imageCrop);
Add-on Version
1.0.0
Vaadin Version
24.4.12
Additional information
No response