Re: Smooth lines in Picturebox



"Schmidt" <sss@xxxxxxxxx> wrote in message
news:emlHy4h7GHA.4572@xxxxxxxxxxxxxxxxxxxxxxx

VBs builtin Drawing-Methods (GDI-Wrappers) against the
usual PictureBoxes are nice to use sometime, but performance
wise they cannot cope with the direct GDI-usage of course
(especially the 'Print-' and "Pixel-Calls" are very slow on VB
-Pictureboxes).

Yes. I'm aware of those things, and I fully understand the difference
between addressing bitmap pixels (either using VB or the API) as against
addressing the pixel data in a VB Byte array. In fact I very often use that
technique myself for all sorts of things. But I'm still a little surprised
by the fact that your Byte array "mode 4" code is as fast or faster than the
equivalent API StretchBlt call. Mind you, perhaps I shouldn't be too
surprised. I once wrote some standard VB code when I had VB5 which used Byte
arrays to perform a "replace substrings with different substrings" in some
large text strings and when VB6 eventually came out I was a little surprised
to discover that my own VB5 code was as fast as and often faster than the
new native VB6 Replace function. Your "stretch" code is very nice by the
way. Excellent stuff.

Mike



.



Relevant Pages