473,396 Members | 2,068 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,396 software developers and data experts.

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 8416
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 thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

0
by: Brett | last post by:
I have a program that prints 2 different reports and I have 2 different printers (hp 9000, hp9050). The first report prints perfectly on both printers. The second only prints pefectly on the...
2
by: qumpus | last post by:
My program right now generates USPS style shipping label using System.Drawing.Graphics. It works fine except that the printer prints really slowly. I want to make my program take advantage of true...
1
by: syd | last post by:
I want to cut a graphic up into smaller pieces. The graphic is part of a org chart on a web page - after i took all the time to draw all those regions to map out hyperlinks - i got the idea to use...
2
by: David Scemama | last post by:
Hi, I'm looking for a way to display semi graphic characters in a multi line text control or in a rich text control. I've tried with all the characters of the extended ASCII table (code page...
1
by: hamil | last post by:
I am trying to print a graphic file (tif) and also use the PrintPreview control, the PageSetup control, and the Print dialog control. The code attached is a concatination of two examples taken out...
5
by: Simon Friso | last post by:
Hello, I'm looking for a graphic control I can use in .NET. I need the following features: - drawing shapes - filling shapes with color, gradient or texture - drawing splines, arcs and...
6
by: André | last post by:
Hi, I made a webform for a survey, with multiple-choice questions. The results of each question is put into a table e.g.: values frequency 1 6 2 3 3 32 4 ...
1
by: icepick72 | last post by:
On an academic note, I want to copy a Graphic to an Image (Bitmap). I have the Graphic object but not the origin image from which it originates; this is because I'm overriding the PrintDocument...
7
by: winzone | last post by:
I used system.drawing.graphic in C# to draw the Rectangle and Ellipse in PictureBox. In my PC and other my buddy PC show the drawing graphic and color. But my customer PC doesn't show the drawing...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
0
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
0
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...
0
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...
0
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.