yglukhov / nimx

GUI library
MIT License
1.1k stars 75 forks source link

Image render issues on Mac OSX #261

Closed floydnunez closed 7 years ago

floydnunez commented 7 years ago

I have an app that shows some images. On Mac OS X Sierra it displays them with some artifacts on the borders. On Windows it is displayed correctly. Haven't tried other platforms.

https://www.dropbox.com/s/ns7jjxpzeap04ph/NimxProblemDemo.zip?dl=0

I made a demo project; I made a simple circle with borders that have no transparencies. The Mac version fuzzes the borders and adds a line on the bottom and right side. Some other images add lines on the borders.

This is the circle

circle

This is the Windows 10 version how_it_looks_in_windows

This is the Mac version

how_it_looks_on_mac

My code is very simple

proc startApp() =

First create a window. Window is the root of view hierarchy.

var wnd = newWindow(newRect(40, 40, 600, 480)) 

let image = imageWithContentsOfFile("circle.png");
let iv = newImageView(newRect(100, 100, 400, 400), image, ImageFillRule.NoFill )
wnd.addSubview(iv)

runApplication: startApp()

Any ideas?

yglukhov commented 7 years ago

Should be fixed, please retest.

floydnunez commented 7 years ago

Ah I tested it! it works perfectly, thanks you very much.