Hey all, I have a project that I am working on and I have noticed that my NSRect that I draw at a certain x, y coordinate that would be the center for the resolution I am working on, is not the center if the resolution changes. I understand how it all works.
The Issue is that my project is going to be displayed on multiple resolutions does anyone know of a possible solution to centering the NSrect regardless of what aspect or resolution the screen is in. I have my classes declared as NSPanels that have custom drawing. Any ideas on a possible solution would be helpful. Thanks all.
This is the NSRect x, y, width, height
NSRect windowFrame = NSMakeRect(400, 500, 500, 100);
then
window = [[Mainbox alloc] initWithContentRect:windowFrame
styleMask:NSBorderlessWindowMask
backing:NSBackingStoreBuffered
defer:NO];