PaintLab / PixelFarm

From Vectors to (sub) Pixels, C# 2D Rendering Library
Other
156 stars 21 forks source link

Implement System.Drawing ! #19

Open prepare opened 6 years ago

prepare commented 6 years ago

Not hurry, for study and just a fun task :)

see : comments in https://github.com/dotnet/corefx/issues/20325 esp this https://github.com/dotnet/corefx/issues/20325#issuecomment-329292891

then

use some C# => C/C++ tool to convert it to native C/C++ code.

prepare commented 6 years ago

Welcome all HELP/CONTRIBUTIONS :)

on PixelFarm,

we TRY to give a high-quality graphics rendering.

we have both software (Agg) and hardware rendering backend, based on GLES2 => then it should be rendered on any supported platforms.

multiple_gl_windows

pic 1: multiple GLES2 windows


we also have a strong text-rendering backend,( pure C#).

autofit_f1

pic 2: vertical-autofit, and horizontal fit alignment

latest_glyph_pos

pic 3: all text are arranged and rendered with our Typography(https://github.com/LayoutFarm/Typography)


Zoom into the text, yes our lib supports LCD-effect subpixel-rendering (both software and hardware).

lcd_08

pic 4: B with zoom, show lcd-effect subpixel rendering

lcd_05

lcd_07

pic 5: draw lines with lcd-effect subpixel rendering


This is our Agg (pure software, C#) result. (Hardware version soon, see more at=>https://github.com/PaintLab/PixelFarm/issues/20)

tiger

pic 6: PixelFarm's Agg (1) vs Chrome (2)

tiger2

pic 7: Agg's result, bitmap zoom-in to see fine details


The HtmlRenderer example!

I still want to render an (nearly) ACID1 page from our lib!

html_renderer_with_selection2

pic 8: HtmlRenderer on GLES2 surface, text are renderered with the Typography

also, please note the text selection on the Html Surface.

(If you want to look for related repos ...

HtmlRender => https://github.com/LayoutFarm/HtmlRenderer,

Typography => https://github.com/LayoutFarm/Typography)

prepare commented 6 years ago

BUT, It is under development.

All code are selected from permissive libs.

No any copyleft code here.


All code are in development.

All code are mess!.

I try to arrange them to fit with some

well-known frameworks

eg. Html's canvas or Windows System.Drawing


so at this point,

I think if we built a System.Drawing based on our lib => It may possible.

:)