|
dev
newsgroups
|
|||||||||||||||||||||||
|
|||||||||||||||||||||||
win32 in memory drawingDoes 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 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 "Rain" <R***@discussions.microsoft.com> a écrit dans le message de news: 78A4FFCE-13BA-4C91-8D8C-F5D157690***@microsoft.com...Show quote > 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 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.. Show quote "Steve B." wrote: > 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 > > "Rain" <R***@discussions.microsoft.com> a écrit dans le message de news: > 78A4FFCE-13BA-4C91-8D8C-F5D157690***@microsoft.com... > > 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 > > > In short, i was looking for a win32 gdi version of the code you just
posted... thanks! Show quote "Rain" wrote: > 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.. > > "Steve B." wrote: > > > 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 > > > > "Rain" <R***@discussions.microsoft.com> a écrit dans le message de news: > > 78A4FFCE-13BA-4C91-8D8C-F5D157690***@microsoft.com... > > > 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 > > > > > > 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 "Rain" <R***@discussions.microsoft.com> a écrit dans le message de news: 43D433E3-2227-43C5-9057-0983C3621***@microsoft.com...Show quote > In short, i was looking for a win32 gdi version of the code you just > posted... thanks! > > "Rain" wrote: > >> 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.. >> >> "Steve B." wrote: >> >> > 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 >> > >> > "Rain" <R***@discussions.microsoft.com> a écrit dans le message de >> > news: >> > 78A4FFCE-13BA-4C91-8D8C-F5D157690***@microsoft.com... >> > > 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 >> > >> > >> > Im still using C#.net so it means im still under dotnet.framework
Show quote "Steve B." wrote: > 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 > > "Rain" <R***@discussions.microsoft.com> a écrit dans le message de news: > 43D433E3-2227-43C5-9057-0983C3621***@microsoft.com... > > In short, i was looking for a win32 gdi version of the code you just > > posted... thanks! > > > > "Rain" wrote: > > > >> 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.. > >> > >> "Steve B." wrote: > >> > >> > 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 > >> > > >> > "Rain" <R***@discussions.microsoft.com> a écrit dans le message de > >> > news: > >> > 78A4FFCE-13BA-4C91-8D8C-F5D157690***@microsoft.com... > >> > > 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 > >> > > >> > > >> > > > > I don't understand what you are looking for.
Do you want to use .Net programming or Win32 programming ??? Steve "Rain" <R***@discussions.microsoft.com> a écrit dans le message de news: 06CBF922-1410-4A74-A571-2BF4126DC***@microsoft.com...Show quote > Im still using C#.net so it means im still under dotnet.framework > > "Steve B." wrote: > >> 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 >> >> "Rain" <R***@discussions.microsoft.com> a écrit dans le message de news: >> 43D433E3-2227-43C5-9057-0983C3621***@microsoft.com... >> > In short, i was looking for a win32 gdi version of the code you just >> > posted... thanks! >> > >> > "Rain" wrote: >> > >> >> 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.. >> >> >> >> "Steve B." wrote: >> >> >> >> > 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 >> >> > >> >> > "Rain" <R***@discussions.microsoft.com> a écrit dans le message de >> >> > news: >> >> > 78A4FFCE-13BA-4C91-8D8C-F5D157690***@microsoft.com... >> >> > > 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 >> >> > >> >> > >> >> > >> >> >> |
|||||||||||||||||||||||