win32 in memory drawing

G

Guest

Does anyone have a sample code for this? I want to draw an image in memory
into another image using C# and win32 gdi.. if its confusing i'll rephrase
it. I want to draw many images into one image in memory using win32 gdi
(sample using bitblt or any suggested win32 that works the fastest) since the
..NET gdi is very slow in drawing graphics in my own opinion. I would really
appreciate any help. please any smaple code at all would be very much
approciated. Thank You so much in advace.

Stan
 
S

Steve B.

From my memory :

using System;
using System.Drawing;
using System.Drawing.Imaging;


.....

Bitmap bmp = new Bitmap(100,100);

using(Graphics g = Graphics.FromImage(bmp))
{
g.Clear(Color.Black);
g.DrawLine(Pens.Red,0,0,99,99);
g.DrawLine(Pens.Blue, 0,99,99,0);
}

And now you can use your bitmap as you want...

HTH
 
G

Guest

I have one question, did u just use the .net gdi (because the one you used
was a simple .NET graphics)? i was asking for the win32 gdi version.. Thanks
though..
 
G

Guest

In short, i was looking for a win32 gdi version of the code you just
posted... thanks!
 
S

Steve B.

You are not in the right group for that. Here it is a group for .Net
programming.

Ask the question in microsoft.public.platformsdk.gdi which is more accurate.

HTH,
Steve
 
S

Steve B.

I don't understand what you are looking for.
Do you want to use .Net programming or Win32 programming ???

Steve
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top