Topic is quite old, but probably the reason is drawing order.
graphics.color = Color.Blue; graphics.fillRect(0,0,800,600); graphics.drawImage(image,0,0);
it might be:
graphics.drawImage(image,0,0); graphics.color = Color.Blue; graphics.fillRect(0,0,800,600);
then we get bue area, instead of black.
I think, that there may be few different reasons for such blur.
In some cases it may be controlled by OS, but most probably it's not our case.
It may be somehow corellated with textue sampler interpolation technique, that samples pixels at the center of pixel (at 0.5x, 0.5y coord, for example), so that UV coords passed to sampler must take it into account.
Most probably, as far as i see, it's result of how fonts managed in Kha. When you load new font, tool, named Kravur creates font texture. And then during render process function getBakedQuad() takes small quad for each rendered character. It's part of optimization for render process. Therefore we have multiple points, where font can be resized and resampled.
Please, note, that i'm not very familiar with Kha, so my statements may be completely wrong.
One possible solution, that I see, to achieve pixel-perfect fonts - is to bake your font into texture, for example with this online tool: http://kvazars.com/littera/
And then adopt graphics2 internals to use your texture, instead of loading from *.ttf
I got little issue, while trying to use linc_imgui installed with haxelib instead of adding it to Libraries directory.
During comilation it says: "linc_imgui.h: No such file or directory"
May be korefile.js not get parsed, when library placed in haxe/lib directory?
I decided to use haxelib instead of Libraries dir, cause i want to add this demo into linc_imgui tests directory.
In that case we end up with this directories structure:
I'm not sure if it's OK to create such circular dependencies within git.
However, please, clarify - is it possible to use library, installed with haxelib, like:
haxelib git linc_imgui https://github.com/CoruNethron/linc_imgui
If that library contains korefile.js and some native code?
Got it to work just now. Started with this bindings: https://github.com/Aidan63/linc_imgui
Actually there was no modifications needed, not to Kha nor to linc_imgui, but setup takes some time.
I'll try to create pull request, to add Kha test target to linc_imgui.