I'm drawing an image with the custom UI in a composition window. I'm on Macbook Pro retina display and all image pixels appear to be 2x2 device pixels. Documentation sais:
To support HiDPI and Retina Displays, you can use offscreen images that are twice the size, and then use the Transform function to scale the image down in half before drawing it.
I tried it but with no luck, the image appeared to be on a correct place and size, but quality became even worse. Also experimented with different antialiasing polices, but it seems they affect drawbot only. My current approach is:
//Prepare Image twice bigger
Transform( /*with a scale down matrix*/)
DrawImage( /*with the image twice the size*/ )
It doesn't solve the issue and Transform operation seems to work in ordinary (not hiDPI) space. Am I missing something? Is it supported in AE somehow?
imageRef is returned NewImageFromBuffer and the buffer for this function should be prepared with having in mind whether the current display is Retina or not and whether Retina display is connected at all.
Thanks for the answer! Unfortunately, it didn't help me with the original question. I've already known how to scale the image, but the issue is that when I draw it all pixels are still twice the actual device pixes. It seems that drawbot doesn't truly support retina displays and can't draw high dpi images. Even all AE tools like roto masks and puppets are blurry on the retina screen because of it. Have you managed to fix this behavior?
For instance here's a zoomed screenshot with mask line. The blue square is a single device pixel, but the line rasterized to 2x2 pixels. Background plate, at the same time, looks ok and uses hi dpi of the screen.