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

Antialiasing and diagram properties dialog fixes #70

Merged
merged 3 commits into from
Oct 27, 2014

Conversation

in3otd
Copy link
Contributor

@in3otd in3otd commented Oct 26, 2014

On my system (Slackware 14.1) the diagrams look really ugly in 0.018; see in the enclosed pictures the difference between no aliasing in 0.017, the 0.0.18 aliasing and 0.0.19 after fixes, especially around the log graph lines and around the curved parts of graph lines (need to see at 1:1 scale of course). I saw in the code that now antialising is enabled by default; googling around I saw this seems to be a known issue with Qt4 ( http://qt-project.org/forums/viewthread/28093 , http://lists.qt-project.org/pipermail/development/2012-October/007033.html ) . One of the possible fixes seems to keep the drawing coordinates as floating point, instead of rounding them to int as currently done in Qucs, so I modified viewpainter.cpp accordingly. Note that to be consistent QPointF should be used also elsewhere, but for the moment things works nicely anyhow.
qucs_0 0 17_no_antialiasing
qucs_0 0 18_antialiasing
qucs_0 0 19_patched_antialiasing
IMHO, there should be an option somewhere to disable antialiasing, might add this later.

I have also modified the Edit Diagram dialog to have it look more similar to 0.0.17 and to have the data names sorted as they were before, see enclosed pictures.
qucs_0 0 17_edit_diagram
qucs_0 0 18_edit_diagram
qucs_0 0 19_patched_edit_diagram

Finally I have also slightly modified the main configure.ac to remove duplicate search paths for Qt headers and added the default path used in Slackware 14.1 (otherwise ./configure will fail)

@yodalee
Copy link
Contributor

yodalee commented Oct 27, 2014

I think this is nice, though I cannot tell the difference of graph draw in float and draw in int

@guitorri
Copy link
Member

It looks good do me. Indeed, the painter should be able to do the rounding.
I agree, the anti-aliasing can be default, but should be optional also on the Settings.
In the beginning I did not like much the anti-aliased by default, but got used to it.

@guitorri guitorri added this to the 0.0.19 milestone Oct 27, 2014
@guitorri guitorri merged commit ffb2a14 into Qucs:master Oct 27, 2014
@guitorri
Copy link
Member

Thank you for the fix. It is looking much better on my screen!

@in3otd
Copy link
Contributor Author

in3otd commented Oct 27, 2014

For clarity here is a detail of the previous pictures, zoomed in 2x, without interpolation of course;
qucs_0 0 17_no_antialiasing2
qucs_0 0 18_antialiasing2
qucs_0 0 19_patched_antialiasing2
look at the log-spaced grid lines: in 0.0.18 they are often merged together, while using float coordinates improves the look a bit. Compare also at the flat portion of the blue line and the rectangle around the marker info. Still I do not like the anti-aliased graphs, but they look a little better now. I have checked two commercial EDA SWs and both didn't use anti-aliasing for graphs and one not even for text (!). I think it might be better to have anti-aliasing turned off by default for drawings - will need to add the options for that and then we will decide what to use as default.

@guitorri
Copy link
Member

I tend to agree with you. Disable anti-aliasing by default sounds good to me. Perhaps we have separate options for text and graphics.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants