Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[Bug] AvaloniaControls.AdvancedImageBox Pixel Grid lines dont connect when image is smaller than control size #956

Closed
AITYunivers opened this issue Dec 18, 2024 · 5 comments
Assignees

Comments

@AITYunivers
Copy link

AITYunivers commented Dec 18, 2024

System

As AvaloniaControls is not UVTools (the program), I have replaced some data to be relevant

UVtools.AvaloniaControls v4.0.0 X64
Operative system: Microsoft Windows 10.0.22631 X64 (Windows 11)
Processor: AMD Ryzen 5 3600 6-Core Processor              
Processor cores: 12
Memory RAM: 20.19 / 63.91 GB
Runtime: win-x64
Framework: .NET 9.0.0
AvaloniaUI: 11.2.2

Sreens, resolution, working area, usable area:
1: 1920 x 1080 @ 100% (Primary) (On this)
    WA: 1920 x 1032    UA: 1920 x 1032

Printer and Slicer

No response

Description of the bug

When using a small image on the AdvancedImageBox, and then scaling that image up to the point where all 4 edges are still visible, along with the Pixel Grid, the lines in the Pixel Grid are misaligned to the image. The issue goes away when zoomed in.

How to reproduce

  1. Create a new Avalonia 11.2.2 project
  2. Import UVtools.AvaloniaControls 4.0.0 from Nuget
  3. In your App.axaml under Application.Styles, add
    <StyleInclude Source="avares://UVtools.AvaloniaControls/Controls.axaml"/>
  4. In your MainWindow, add
    xmlns:uv="clr-namespace:UVtools.AvaloniaControls;assembly=UVtools.AvaloniaControls"
  5. Set the content of your MainWindow to
    <uv:AdvancedImageBox AutoZoomToFit="True"/>
  6. Set the Image property of the AdvancedImageBox to a small image, in my case I used a 32x32 image

Files

image

Copy link

This is your first time submitting an issue with UVtools 🥳Please review your issue and ensure that the submit template was followed, the information is complete, and not related to any other open issue. It will be reviewed shortly. Debugging is very important and make the program better. Thanks for contributing and making the software better! 🙌

@sn4k3
Copy link
Owner

sn4k3 commented Dec 18, 2024

It feels like you have been waiting for the v4 release because I just post it... 😅

I have tested and I observe the same, it's strange, I will check it out...
image

@AITYunivers
Copy link
Author

AITYunivers commented Dec 18, 2024

Nope just really coincidental timing, I found this repository yesterday, and when I downloaded it, 4.0.0 came out within the same 10 seconds.

@sn4k3
Copy link
Owner

sn4k3 commented Dec 18, 2024

Should be fixed now, try update and report back.

image

@AITYunivers
Copy link
Author

Looks good, thanks!
image

sn4k3 added a commit that referenced this issue Dec 19, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants