How to draw lines with the right width?
Hallo people,
I'm using QGraphicsView and I have a QGraphicsScene with many QGraphicsItems that are simple lines. All the lines are horizontal, vertical or 45° inclinated.
My problem is that on the screen some lines are painted wider than other even if all of them are created with the same width and the same inclination. This behaviour depends on the zoom applied.
I want to make a 2D CAD application and I don't want to use antialiasing when I draw lines (is it right that all 2D CAD application don't use antialiasing in drawing lines?).
Please suggest me a solution.
Re: How to draw lines with the right width?
Why shouldn't CAD applications use antialiasing? Antialiasing just makes lines look smoother, it doesn't modify them in any way.
Re: How to draw lines with the right width?
I'm not sure but I think that when you zoom a group of black paralle lines in 2D CAD you dont see any gray pixels. This is evident when the lines are drawed with the width of 1 or 2 or 3 pixels on the screen.
Maybe I'm wrong...
Re: How to draw lines with the right width?
If you do the scaling correctly, zooming shouldn't interfere.