PaintLab/PixelFarm

About subpixel rendering

Happypig375 opened this issue · 3 comments

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?

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 (#3 (comment)).

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 #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 #16 (comment)
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.