-
-
Notifications
You must be signed in to change notification settings - Fork 45
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
Drawing lines and rectangles #107
Comments
This Stack Overflow question might be helpful: https://stackoverflow.com/questions/10763762/pixels-in-direct2d |
Yes, I suspected that this might be the case - thanks for the link 👍 Andy |
There are two issues in this case. First, you have to configure your .NET application to allow the high DPI support accoding to this document. Second, the current D2DControl can't calculate and set a correct DPI value for high DPI supported .NET application (a bug from d2dlib). You can add a normal .NET control on your winform, and compare the rendering quality between normal .NET control and d2dlib as below. |
@jingwood Are you saying that even if I configure my application to support high DPI I will still have a problem because of a bug in d2dlib? Andy |
Actually, I can answer that as I have followed the steps you link and it has made no change to the rendering on the D2DControl :-( Andy |
Yes, but it's another problem. For the antialias, could you please post an image that shows how the normal .NET control is rendered like my above? |
I would like to draw a one pixel width rectangle on my D2DControl surface using DrawRectangle with the default stroke width of 1.
However, the rectangle is two pixels wide on my monitor and seems to be a blend of the foreground and background colours.
The line should be Red i.e. R:255,G:0,B:0 but you can see it is not.
Two questions:
Andy
The text was updated successfully, but these errors were encountered: