Closed Happypig375 closed 6 years ago
Subpixel rendering may be implemented by various techniques.
This feature is not found in original agg-sharp. so I implement this with the Maxim's agg technique (https://github.com/PaintLab/PixelFarm/issues/3#issuecomment-287991561).
so my technique is based on Maxim's agg technique
Do I need to use the agg-sharp backend for subpixel rendering?
Yes,
Is any other backend unable to do this?
Is the agg-sharp backend inside the Backend.Paintfx project?
I provide 2 examples
1) Pure software subpixel rendering
(I call it SubPixelLcdEffect ,
follow the detail here => https://github.com/PaintLab/PixelFarm/blob/dev/src/PixelFarm/PixelFarm.Drawing/7_CpuBlitPainter/RenderSurface/AggRenderSurface.cs#L281)
2) Texture-based hardware-accelerated GLES (see https://github.com/PaintLab/PixelFarm/issues/3) (by create 'inverted RGBA' subpixel-rendering glyph texture, and rendering 3 times in different color channels, follow the detail here => https://github.com/PaintLab/PixelFarm/blob/dev/src/PixelFarm/PixelFarm.DrawingGL/DrawingGL/RenderSuface/GLRenderSurface.cs#L507 )
How to draw a 'crisp' glyph is not depend on 'subpixel Lcd-Effect' only.
It is also depend on the 'pixel-position' of a glyph too. => this is important.
please see https://github.com/PaintLab/PixelFarm/issues/16#issue-284363097 and follow the detail. ( you can see that pic 1, is not rendered with subpixel rendering tech, it is rendered with blue color fill over grey-scale stencil glyph, but in minor different position (x,y) )
What is Backend.Paintfx project ?
It is a (copy of) core of an old open source version of Paint.NET (Pdn) project. I try to integrate its features to the agg canvas surface
No subpixel rendering here.
Do I need to use the agg-sharp backend for subpixel rendering? Is any other backend unable to do this? Is the agg-sharp backend inside the Backend.Paintfx project?