473,401 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,401 software developers and data experts.

How to draw graphics on a bitmap ?

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 ?


Apr 11 '06 #1
8 10261
"Oberfuhrer" <he*******@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/>
Apr 11 '06 #2

"Oberfuhrer" <he*******@yahoo.no> wrote in message
news:kY********************@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.


Apr 11 '06 #3
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" <no****@nowhere.com> schreef in bericht
news:9SW_f.47645$K11.6943@clgrps12...

"Oberfuhrer" <he*******@yahoo.no> wrote in message
news:kY********************@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.

Apr 12 '06 #4
Herfried,
"Oberfuhrer" <he*******@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
Apr 12 '06 #5
"Cor Ligthert [MVP]" <no************@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/>

Apr 12 '06 #6
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=ob...s=&safe=images

Cor


"Herfried K. Wagner [MVP]" <hi***************@gmx.at> schreef in bericht
news:%2****************@TK2MSFTNGP03.phx.gbl... "Cor Ligthert [MVP]" <no************@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/>

Apr 12 '06 #7

"Cor Ligthert [MVP]" <no************@planet.nl> wrote in message
news:%2****************@TK2MSFTNGP03.phx.gbl...
Herfried,
"Oberfuhrer" <he*******@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??

Apr 12 '06 #8
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.

"Oberfuhrer" <he*******@yahoo.no> wrote in message
news:kY********************@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 ?



Apr 14 '06 #9

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

21
by: DraguVaso | last post by:
Hi, I have an inherited DataGrid, that does lots of extra stuff. For exemple drawing a backgroundimage in every cell. The problem is that it's taking too much time (using gdi+), so I want to do...
3
by: Richard | last post by:
I have a requirement to put a GDI style circle or rectangle border around the selected row of a datagrid/ It will overlap into the row above and below the selected row. Doing this in a the OnPaint...
0
by: benfly08 | last post by:
Hi, guys. I have a program to draw bar/pie chart based on the data i hard coded in it. However, my image comes with "BLACK" background color. I don't know how to fix this. The code snippet is...
12
by: active | last post by:
I've been looking on the Internet for a way to convert a DIB to a Bitmap without success. Now I'm wondering if that is the approach I should be taking. All I want to do is display the DIB or...
1
by: Tom | last post by:
Hey, I have tried drawing a grid onto my control using the following: Private Sub VGUI_Grid(...) Handles MyBase.Paint Dim new_bitmap As Bitmap ' Make a new bitmap that fits the...
7
by: Tem | last post by:
I need to draw a black lined circle and save it as a gif file. Can this be done with wpf or do I need to use GDI+ The examples I found seem to only apply to UI elements not a file. Thank you ...
0
by: kam45 | last post by:
I did one program that draws a line with two squares at the ends and I can just click and extend each ends. It works ok but I need to move the whole line. Would anyone knows how? Private Const...
10
by: kimiraikkonen | last post by:
Hi, If previous post was missing, here's the complete one: I'm trying to draw a rectange on a picturebox image using mouse move event but the problem is that the rectangle selection / drawing...
1
by: martinsmith160 | last post by:
Hi all I am trying to create a level builder tool for a final year project and im having some problems drawing. I have placed a picture box within a panel so i can scroll around the image which is...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
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
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
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
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...
0
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new...

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.