[quote=“bouba”]Ok, but I tried to draw that line with other libraries. I see grey pixels at the border of the line, but with juce there is only a white line without the effect of anti-aliasing, why ? I’m new to computer graphics, and I think I’ve not again all the bases to understand everything, so sorry if my words are strange. I’ve read that there is multiple solutions to do anti-aliased lines, what is the one used in Juce ? You notice to me that I could use the EdgeTable, for now, how can I simply draw the same line as the previous code in this post in an Image, and then a PNG File ?
I need to find a library to draw musical partitions, I’ve selected 5 libraries to compare. For now I’ve tested Cairo, AGG, QtSVG, ImageMagick (witch seems to be very slow) , and Juce.
Thank your for this quick response, your message makes me realize that I had counsidered the different anti-aliased techniques used in those libraries.
PS: Sorry it’s not easy to understand me, i’m french ;-)[/quote]
If you draw a line at exactly 45 degrees, then it’s not going to need any anti-aliasing… Try some more interesting angles and see what you get. Or use Path::addLine to create a path and fill that.
Sounds like you’re missing the point slightly though, if you’re drawing musical notes - for drawing the staff, you should draw the horizontal and vertical lines with fillRect, because that won’t be blurred like an anti-aliased line would be. And for the notes, you’d use paths or fonts, not lines.