#1 2011-01-16 16:04:37

Starkis
Member
From: Up in the space
Registered: 2011-01-16
Posts: 27

Optimized bitmaps

In near future I'll need to work with the TBitmap, TCanvas, TPen and TBrush type objects and such type objects I'll have many. I don't estimate requirement for the PNG, JPG formats (but you know how it happens), so should I use GDI+ for more optimized work with the graphics? or should I look into graphics library for that (they have TBitmap32 & etc)? or there is already optimized TBitmap version? smile
it would be nice to use everything from one source - memory manager, RTL, graphics, controls wink

LVCL also looks great and promising, but it provide only (minor?) subset of original VCL control (dropdowns, buttons, checkbox, forms/dialogs, panels) capabilities

Last edited by Starkis (2011-01-16 16:05:55)


--- we no need no water, let the ... burn ---

Offline

#2 2011-01-17 07:19:49

ab
Administrator
From: France
Registered: 2010-06-21
Posts: 14,713
Website

Re: Optimized bitmaps

GDI will work very well, about speed and memory consumption.
GDI+ could allow better rendering quality, with anti-aliasing. See http://en.wikipedia.org/wiki/Spatial_anti-aliasing.

GDI is used when you call TBitmap, TCanvas, TPen and TBrush type objects.
GDI+ would use dedicated classes, not the standard TCanvas. The most advanced classes I found out was http://www.bilsen.com/gdiplus/index.shtml for Delphi 2009 and later.

With our SynGDI library, you can write your code using "classic" TCanvas/TPen/TBrush classes, then render it using GDI+. You can even render any component (using the PaintTo method assigned to a TMetaFileCanvas) and draw it with the anti-aliasing of GDI+.

We use these technologies to provide a full reporting workflow: reports using SQLite3Pages (with anti-aliasing), PDF generation using SynPDF. From the same code using "regular" TCanvas methods.

The problem with using GDI+ dedicated classes or TBitmap32 or the great AggPas - see http://www.crossgl.com/aggpas - is that you'll have to use dedicated classes, not TCanvas methods.

I would like (but I need some time for it) to implement a TMetaFile enumerator using AggPas as backend, instead of GDI+.
I guess the result will be interesting, faster than GDI+, perhaps with even better quality.

LVCL is only a subset... because it's a LightVCL. wink

Offline

#3 2011-01-20 08:44:08

ab
Administrator
From: France
Registered: 2010-06-21
Posts: 14,713
Website

Re: Optimized bitmaps

Starkis wrote:

hmm, that's nice to have RTL, GDI and MM from one hands smile any new versions or additions of them? wink

What do you mean exactly?

Offline

#4 2011-01-20 13:45:56

ab
Administrator
From: France
Registered: 2010-06-21
Posts: 14,713
Website

Re: Optimized bitmaps

What's wrong with the current GDI+ implementation in SynGDIPlus?

Offline

Board footer

Powered by FluxBB