468,738 Members | 2,515 Online
Bytes | Developer Community
New Post

Home Posts Topics Members FAQ

Post your question to a community of 468,738 developers. It's quick & easy.

Fast Graphic Drawing

I would like to ask you, if you know about something like Tanner
Helland's graphic tutorials
(http://tannerhelland.tripod.com/VBGr...torial.htm)but VB.Net
compatibile.

I need to create bitmap in array and then draw it on PictureBox or
Form but fast... Classic methode bitmap.SetPixel is very slow...

Please help me.
Thanks.
pr**********@szm.sk

----== Posted via Newsfeed.Com - Unlimited-Uncensored-Secure Usenet News==----
http://www.newsfeed.com The #1 Newsgroup Service in the World! >100,000 Newsgroups
---= 19 East/West-Coast Specialized Servers - Total Privacy via Encryption =---
Nov 20 '05 #1
2 8066
Hi,

Create a bitmap. Create a graphics class from the bitmap. Draw on
the bitmap. Set the picturebox's image to the bitmap. Note the graphics
class does not have a drawpoint method draw a line with the same start and
stop point instead or an ellipse with a width of 1.

Dim bm As New Bitmap(100, 100)

Dim g As Graphics = Graphics.FromImage(bm)

g.DrawRectangle(Pens.Red, 0, 0, 50, 50)

g.FillEllipse(Brushes.Green, 10, 10, 50, 50)

g.DrawLine(Pens.Blue, 60, 60, 60, 60)

g.DrawEllipse(Pens.Blue, 60, 60, 1, 1)

picturebox1.image = bm

Ken

----------------------

"predseda" <pr**********@szm-dot-sk.no-spam.invalid> wrote in message
news:3f**********@127.0.0.1...
I would like to ask you, if you know about something like Tanner
Helland's graphic tutorials
(http://tannerhelland.tripod.com/VBGr...torial.htm)but VB.Net
compatibile.

I need to create bitmap in array and then draw it on PictureBox or
Form but fast... Classic methode bitmap.SetPixel is very slow...

Please help me.
Thanks.
pr**********@szm.sk

----== Posted via Newsfeed.Com - Unlimited-Uncensored-Secure Usenet
News==----
http://www.newsfeed.com The #1 Newsgroup Service in the World! >100,000
Newsgroups
---= 19 East/West-Coast Specialized Servers - Total Privacy via Encryption
=---

Nov 20 '05 #2
* pr**********@szm-dot-sk.no-spam.invalid (predseda) scripsit:
I would like to ask you, if you know about something like Tanner
Helland's graphic tutorials
(http://tannerhelland.tripod.com/VBGr...torial.htm)but VB.Net
compatibile.

I need to create bitmap in array and then draw it on PictureBox or
Form but fast... Classic methode bitmap.SetPixel is very slow...


You will have to use C#'s 'unsafe' blocks to get really fast graphics
operations (you can encapsulate the routines in a C# class library and
use this library in your VB.NET application).

More info:

Part 1: <http://www.codeproject.com/cs/media/csharpgraphicfilters11.asp>
Part 2: <http://www.codeproject.com/cs/media/csharpfilters.asp>
Part 3: <http://www.codeproject.com/cs/media/edge_detection.asp>
Part 4: <http://www.codeproject.com/cs/media/imageprocessing4.asp>
Part 5: <http://www.codeproject.com/cs/media/DisplacementFilters.asp>

--
Herfried K. Wagner [MVP]
<http://www.mvps.org/dotnet>
Nov 20 '05 #3

This discussion thread is closed

Replies have been disabled for this discussion.

Similar topics

2 posts views Thread by qumpus | last post: by
1 post views Thread by syd | last post: by
2 posts views Thread by David Scemama | last post: by
5 posts views Thread by Simon Friso | last post: by
6 posts views Thread by André | last post: by
1 post views Thread by icepick72 | last post: by
reply views Thread by zhoujie | last post: by
xarzu
2 posts views Thread by xarzu | last post: by
By using this site, you agree to our Privacy Policy and Terms of Use.