Home All Groups Group Topic Archive Search About

How to draw graphics on a bitmap ?

Author
11 Apr 2006 9:11 PM
Oberfuhrer
I am an old mathematician, who in my sparetime work on a topic oriented math
application.

I have converted from old, dry Fortran to the more intuitive and juicy
VB.net and Windows.

In particular i would like to have options to draw graphics straight to a
bitmap object.
A typical example would be to save a plot of a function y=f(x) drawn on a
control.

To figure out where to set individual pixels for lines and fonts may be
possible after some struggle,
but maybe there is a better approach around? Is it possible to get a
graphics object for a bitmap ?

Author
11 Apr 2006 9:57 PM
Herfried K. Wagner [MVP]
"Oberfuhrer" <henric***@yahoo.no> schrieb:
> Is it possible to get a graphics object for a bitmap ?

'Graphics.FromImage'.

--
M S   Herfried K. Wagner
M V P  <URL:http://dotnet.mvps.org/>
V B   <URL:http://classicvb.org/petition/>
Author
12 Apr 2006 6:33 AM
Cor Ligthert [MVP]
Herfried,

> "Oberfuhrer" <henric***@yahoo.no> schrieb:

You answer questions from people with this kind of nicks? If it was from
Germany, Swiss or Austria, I even could understand it because I do not know
if it is used by instance at the scouts.

In this case it is somebody from Norway and therefore it can only mean
something as this, what is my only result in Wikepedia.

http://en.wikipedia.org/wiki/Oberf%C3%BChrer

Let us keep this newsgroup free from politics or things that can hurt
people.

Just my opinion.

Cor
Author
12 Apr 2006 10:18 AM
Herfried K. Wagner [MVP]
"Cor Ligthert [MVP]" <notmyfirstn***@planet.nl> schrieb:
> You answer questions from people with this kind of nicks? If it was from
> Germany, Swiss or Austria, I even could understand it because I do not
> know if it is used by instance at the scouts.

What if this is the person's last name?

--
M S   Herfried K. Wagner
M V P  <URL:http://dotnet.mvps.org/>
V B   <URL:http://classicvb.org/petition/>
Author
12 Apr 2006 10:39 AM
Cor Ligthert [MVP]
Herfried,

> What if this is the person's last name?

Can be, but would be very unlikely for somebody from Norway they have
suffered from last Europen war you know. More if you look in the Norge
language for oberfuhrer on Google.

http://www.google.com/search?as_q=oberfuhrer&num=10&hl=en&c2coff=1&btnG=Google+Search&as_epq=&as_oq=&as_eq=&lr=lang_no&as_ft=i&as_filetype=&as_qdr=all&as_occt=any&as_dt=i&as_sitesearch=&as_rights=&safe=images

Cor




Show quoteHide quote
"Herfried K. Wagner [MVP]" <hirf-spam-me-here@gmx.at> schreef in bericht
news:%23hL6iphXGHA.3740@TK2MSFTNGP03.phx.gbl...
> "Cor Ligthert [MVP]" <notmyfirstn***@planet.nl> schrieb:
>> You answer questions from people with this kind of nicks? If it was from
>> Germany, Swiss or Austria, I even could understand it because I do not
>> know if it is used by instance at the scouts.
>
> What if this is the person's last name?
>
> --
> M S   Herfried K. Wagner
> M V P  <URL:http://dotnet.mvps.org/>
> V B   <URL:http://classicvb.org/petition/>
Author
12 Apr 2006 5:47 PM
Homer J Simpson
"Cor Ligthert [MVP]" <notmyfirstn***@planet.nl> wrote in message
news:%23kCiGrfXGHA.1476@TK2MSFTNGP03.phx.gbl...
> Herfried,
>
>> "Oberfuhrer" <henric***@yahoo.no> schrieb:
>
> You answer questions from people with this kind of nicks? If it was from
> Germany, Swiss or Austria, I even could understand it because I do not
> know if it is used by instance at the scouts.

You don't REALLY think I am Homer J Simpson do you??
Author
11 Apr 2006 11:21 PM
Homer J Simpson
Show quote Hide quote
"Oberfuhrer" <henric***@yahoo.no> wrote in message
news:kYidnVGvY-UNhqHZRVnzvA@telenor.com...
> I am an old mathematician, who in my sparetime work on a topic oriented
> math application.
>
> I have converted from old, dry Fortran to the more intuitive and juicy
> VB.net and Windows.
>
> In particular i would like to have options to draw graphics straight to a
> bitmap object.
> A typical example would be to save a plot of a function y=f(x) drawn on a
> control.
>
> To figure out where to set individual pixels for lines and fonts may be
> possible after some struggle,
> but maybe there is a better approach around? Is it possible to get a
> graphics object for a bitmap ?

There are many ways to do that. One is to link in a chart tool from, say,
Excel and use that. Or you can draw directly onto a PictureBox which I have
done to emulate a plotter. There are graphics primitives in the system.
Author
12 Apr 2006 6:22 AM
Peter Proost
Hi an other good reference to look at for drawing in dot net is
http://www.bobpowell.net/

Greetz Peter

--
Programming today is a race between software engineers striving to build
bigger and better idiot-proof programs, and the Universe trying to produce
bigger and better idiots. So far, the Universe is winning. (Rich Cook)

"Homer J Simpson" <nob***@nowhere.com> schreef in bericht
news:9SW_f.47645$K11.6943@clgrps12...
Show quoteHide quote
>
> "Oberfuhrer" <henric***@yahoo.no> wrote in message
> news:kYidnVGvY-UNhqHZRVnzvA@telenor.com...
> > I am an old mathematician, who in my sparetime work on a topic oriented
> > math application.
> >
> > I have converted from old, dry Fortran to the more intuitive and juicy
> > VB.net and Windows.
> >
> > In particular i would like to have options to draw graphics straight to
a
> > bitmap object.
> > A typical example would be to save a plot of a function y=f(x) drawn on
a
> > control.
> >
> > To figure out where to set individual pixels for lines and fonts may be
> > possible after some struggle,
> > but maybe there is a better approach around? Is it possible to get a
> > graphics object for a bitmap ?
>
> There are many ways to do that. One is to link in a chart tool from, say,
> Excel and use that. Or you can draw directly onto a PictureBox which I
have
> done to emulate a plotter. There are graphics primitives in the system.
>
>
>
>
Author
14 Apr 2006 5:44 PM
Bob Powell [MVP]
The GDI+ FAQ has the answer to this question..

There is a caveat however...

You cannot draw directly onto a bitmap having an indexed pixel format. They
will throw an exception. These include some of the TIFF formats and GIF.


--
Bob Powell [MVP]
Visual C#, System.Drawing

Ramuseco Limited .NET consulting
http://www.ramuseco.com

Find great Windows Forms articles in Windows Forms Tips and Tricks
http://www.bobpowell.net/tipstricks.htm

Answer those GDI+ questions with the GDI+ FAQ
http://www.bobpowell.net/faqmain.htm

All new articles provide code in C# and VB.NET.
Subscribe to the RSS feeds provided and never miss a new article.



Show quoteHide quote
"Oberfuhrer" <henric***@yahoo.no> wrote in message
news:kYidnVGvY-UNhqHZRVnzvA@telenor.com...
>I am an old mathematician, who in my sparetime work on a topic oriented
>math application.
>
> I have converted from old, dry Fortran to the more intuitive and juicy
> VB.net and Windows.
>
> In particular i would like to have options to draw graphics straight to a
> bitmap object.
> A typical example would be to save a plot of a function y=f(x) drawn on a
> control.
>
> To figure out where to set individual pixels for lines and fonts may be
> possible after some struggle,
> but maybe there is a better approach around? Is it possible to get a
> graphics object for a bitmap ?
>
>
>
>
>
>
>
>