Different rendering under MacOS X and Windows 7


#1

I've got the same rendering engine accross all platforms, however it seems that juce graphics render differently on mac and on pc

Win 7 :

Mac Os X : 

The antialising is done differently, I suppose it's because of core graphics. There's no horizontal antialiasing on vertical lines on the PC version. Is there a way to have the PC version antialiased too ?  Maybe by switching to open GL ? 


#2

Can you post the few lines involved in the core of your paint() callback? I have gotten pretty used to anti-aliasing on vertical lines and learned how to "control" them if I want to avoid it (e.g. for gridlines) by using coordinates "between" the pixels (+0.5f). Are your horizontal points maybe clamped to .5f values?


#3

You can also use drawVerticalLine if you want to avoid antialiasing at all. 


#4

What if you want aliasing on Windows like you get on OSX? :)


#5

I'm starting to see the problem :-)


#6

@Peter Emanuel : I use int coordinates so I don't think that's the problem

@Patrick : yep seen that but I want the antialiasing. I'd like to have windows behave like mac OS, not the opposite ;)


#7

You didn't actually say how you're drawing this, but I guess you're rendering an image and then stretching it when you draw it? If so, that's not a particularly good or fast way to draw a waveform (just using a Path is usually best), and at such extreme transformations each rendering engine will have different rendering artifacts. The fastest engine will be openGL of course, but I really wouldn't recommend doing this with images at all.


#8

You're a psychic ! Yes indeed that's what I do. Will follow you advice, thanks a lot !