Board index » delphi » ANN: Graphics32 0.97 is available for download

ANN: Graphics32 0.97 is available for download

Couldn't withstand not mentioning it here.

Just finished a new version of Graphics32, completely redesigned, even
faster then it was before, easier to use, and absolutely free.

Graphics32 features include:

-Fast per-pixel access;
-Bitmap alpha blending (including per-pixel alpha blending);
-Pixel and line antialiasing (combined with alpha blending);
-Locking the bitmap for safe multithreading;
-Enhanced scaling of bitmaps;
-Linear transformations of bitmaps: rotations, scaling, etc. with sub-pixel
accuracy;
-Flicker free image displaying component with optimized double buffering;
-Multiple cusmomizible, easy-to-use overlay layers (sprites);
-A property editor for RGB and alpha channel loading;
-Design-time support of image formats supported by TPicture;

Comes with sources, examples and documentation.

See the link below for more info.

--
Alex Denissov
http://www.geocities.com/den_alex

 

Re:ANN: Graphics32 0.97 is available for download


Quote
> Comes with sources, examples and documentation.

> See the link below for more info.

> --
> Alex Denissov
> http://www.geocities.com/den_alex

Hello Alex!
 If i use a TBitmap32 for Doublebuffering of my Component it would be faster
?
 Also if it's faster how much faster ?

Thanx. =)

Re:ANN: Graphics32 0.97 is available for download


Hi Gate,

The thing is that the standard double buffering in TWinControl recreates the
backbuffer each time the control receives WM_PAINT message from Windows.
This takes time or cource. The TPaintBox32 from the library, maintains the
TBitmap32-based back buffer all the time and it does not perform that
reallocation.

The only situation when it recreates the buffer is that it changes in size.
Probably, in later versions, I'll change that a little bit, by allowing the
buffer to be slightly larger than the control's size, so that it will not be
recreated it when the size change is small.

How much faster? Good question, haven't benchmarked this stuff yet, but to
estimate, think of excluding the following piece of code (approximately) for
each control's update:

MemBitmap := CreateCompatibleBitmap(DC, ClientRect.Right,
ClientRect.Bottom);
MemDC := CreateCompatibleDC(0);
OldBitmap := SelectObject(MemDC, MemBitmap);
Perform(WM_ERASEBKGND, MemDC, MemDC);
...
WMPaint(Message);
...
EndPaint(Handle, PS);
SelectObject(MemDC, OldBitmap);
DeleteDC(MemDC);
DeleteObject(MemBitmap);

...and this is not mentioning that in my case I can now blend overlays to a
normal 32-bit bitmap and not using that pretty slow msimg32.dll

--
Alex Denissov
http://www.geocities.com/den_alex

Quote
"Gate" <g...@hotmail.com> wrote in message

news:8egqvg$rd86@bornews.borland.com...
Quote
> Hello Alex!
>  If i use a TBitmap32 for Doublebuffering of my Component it would be
faster
> ?
>  Also if it's faster how much faster ?

> Thanx. =)

Re:ANN: Graphics32 0.97 is available for download


In article <8eg0eo$l...@bornews.borland.com>,
  "Alex Denissov" <deni...@uwidnsor.ca> wrote:

Quote
> Just finished a new version of Graphics32, completely redesigned, even
> faster then it was before, easier to use, and absolutely free.
> Alex Denissov  http://www.geocities.com/den_alex

Hi, recently I have written to you, but I haven't seen an answer yet.
(I'm the the one that have spot the bug about the small rectangles.
I've just downloaded the new version, and I've seen that the small bug
is fixed. Good.)

At page 17 of your (good) 0.97 manual you show exactly the same
performance test results, but your system clock is raised from 550 to
575 MHz (!). It's strange.

Anyway, I have just recompiled my small program (you can find the
version that uses Graphics32 V.0.95 at
http://digilander.iol.it/maffia/leonardo/) and I have measured about a
43% of the previosus speed. (the program uses essentially DrawLineFS in
my test).
My tests are far from conclusive, but if you want I can make more
rigorous tests.

I'm only a Delphi beginner, and I can easly made a mistake. But I have
not changed the sources of my little program (I have only added Image32
to the Uses list and changed something about the fonts).

It's possible that this big slow down is real? Why?

Thank you for your very valuable component,

bearish hugs.

Sent via Deja.com http://www.deja.com/
Before you buy.

Re:ANN: Graphics32 0.97 is available for download


Quote
"Paul Nicholls" <phan...@southcom.com.au> wrote in message

news:390ccb0c@dnews...

Quote
> Alex, I don't suppose you have a Delphi 3 version of the source
> code/package, etc?

Nope, I don't have D3, but I suppose it is possible to modify it to work
with D3,

-ByteMaps.pas unit - don't use it since it is based on dynamic arrays
-Graphics32.pas for line stippling - comment out all line stipplig and the
TArrayOfColor32 type declaration;
-Image32.pas - remove lines 891 and 892;
-Transform32.pas - remove lines 253 through 376, 388, 397, 404-468 this
disables interpolation in linear transformations.
-Graphics32Reg - well, I do not remember exactly, you'll definitely have to
remove all ListDrawValue and PropDrawValue methods from property editors...
maybe something else

Good luck

--
Alex Denissov
http://www.geocities.com/den_alex

Re:ANN: Graphics32 0.97 is available for download


Hmm, I've had a look at the examples and they seem very impressive.  I will
have to try them out :)

--
Thanks,
Paul Nicholls.
****************************************************************************
****************
 IF YOU WANT TO EARN MONEY WHILE YOU SURF ON THE NET GO HERE:
           http://www.alladvantage.com/go.asp?refid=BEM-274

****************************************************************************
****************
 Home Page: www.southcom.com.au/~phantom
 Email         : phan...@southcom.com.au

Quote
Alex Denissov <deni...@uwidnsor.ca> wrote in message

news:8eg0eo$lg14@bornews.borland.com...
Quote
> Couldn't withstand not mentioning it here.

> Just finished a new version of Graphics32, completely redesigned, even
> faster then it was before, easier to use, and absolutely free.

> Graphics32 features include:

> -Fast per-pixel access;
> -Bitmap alpha blending (including per-pixel alpha blending);
> -Pixel and line antialiasing (combined with alpha blending);
> -Locking the bitmap for safe multithreading;
> -Enhanced scaling of bitmaps;
> -Linear transformations of bitmaps: rotations, scaling, etc. with
sub-pixel
> accuracy;
> -Flicker free image displaying component with optimized double buffering;
> -Multiple cusmomizible, easy-to-use overlay layers (sprites);
> -A property editor for RGB and alpha channel loading;
> -Design-time support of image formats supported by TPicture;

> Comes with sources, examples and documentation.

> See the link below for more info.

> --
> Alex Denissov
> http://www.geocities.com/den_alex

Re:ANN: Graphics32 0.97 is available for download


Alex, I don't suppose you have a Delphi 3 version of the source
code/package, etc?

--
Thanks,
Paul Nicholls.
****************************************************************************
****************
 IF YOU WANT TO EARN MONEY WHILE YOU SURF ON THE NET GO HERE:
           http://www.alladvantage.com/go.asp?refid=BEM-274

****************************************************************************
****************
 Home Page: www.southcom.com.au/~phantom
 Email         : phan...@southcom.com.au

Quote

> Alex Denissov <deni...@uwidnsor.ca> wrote in message
> news:8eg0eo$lg14@bornews.borland.com...
> > Couldn't withstand not mentioning it here.

> > Just finished a new version of Graphics32, completely redesigned, even
> > faster then it was before, easier to use, and absolutely free.

> > Graphics32 features include:

> > -Fast per-pixel access;
> > -Bitmap alpha blending (including per-pixel alpha blending);
> > -Pixel and line antialiasing (combined with alpha blending);
> > -Locking the bitmap for safe multithreading;
> > -Enhanced scaling of bitmaps;
> > -Linear transformations of bitmaps: rotations, scaling, etc. with
> sub-pixel
> > accuracy;
> > -Flicker free image displaying component with optimized double
buffering;
> > -Multiple cusmomizible, easy-to-use overlay layers (sprites);
> > -A property editor for RGB and alpha channel loading;
> > -Design-time support of image formats supported by TPicture;

> > Comes with sources, examples and documentation.

> > See the link below for more info.

> > --
> > Alex Denissov
> > http://www.geocities.com/den_alex

Re:ANN: Graphics32 0.97 is available for download


I've forgotten to tell that I have used very short DrawLineFS in the
test of my program.

The small rectangles aren't good yet.
In TBitmap32.FrameRectS maybe you can change form:

  ...
  TestSwap(X1, X2);
  TestSwap(Y1, Y2);
  DrawHorzLineS(X1, Y1, X2, Value);
  DrawHorzLineS(X1, Y2, X2, Value);
  if Y2 > Y1 + 1 then
  begin
    DrawVertLineS(X1, Y1 + 1, Y2 - 1, Value);
    DrawVertLineS(X2, Y1 + 1, Y2 - 1, Value);
  end;
  ...

to:

  ...
  TestSwap(X1, X2);
  TestSwap(Y1, Y2);
  DrawHorzLineS(X1, Y1, X2, Value);
  if y2>y1 then
    DrawHorzLineS(X1, Y2, X2, Value);
  if Y2 > Y1 + 1 then
  begin
    DrawVertLineS(X1, Y1 + 1, Y2 - 1, Value);
    DrawVertLineS(X2, Y1 + 1, Y2 - 1, Value);
  end;
  ...

And so on for FrameRectTS (or something similar).

Otherwise if you set the pen trasparency to 128 and then you do:

FrameRectTS(10, 10, 30, 10)
FrameRectTS(10, 30, 30, 31)

you obtaint two rectangles of different opacity.

I still get some ERangeError in SetPixelS, GetScanLine and GetPixel
when I use non antialiased graphics (lines) (I have to switch off the
range error checking).

Thank you for your attention,
Bearish hugs

Sent via Deja.com http://www.deja.com/
Before you buy.

Other Threads