Open FraserElectronics opened 1 year ago
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
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?
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?
Do you mean something like this?
Andy
This is what it looks like if I remove all the suggestions from the link you mentioned.
Andy
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