Crippled graphics...

G

Guest

Jeff Garcia deserves to play!!!

Anyway, why has Microsoft eliminated the "Point" and "Pset" functions in VB.NET from what was already a limited selection of graphical functions in earlier versions of VB? Any chance of doing reasonably sophisticated graphical work in a picturebox control or any other control that supports graphics has been crippled. The "Point" function returns the pixel color at the given coordinates. The "Pset" function allows you to set the pixel color at the given coordinates. I ask you, what two functions could be more indispensable to any graphical tool kit than functions such as these? Yet, Microsoft feels a need to eliminate them. Is this an oversight? Is it malice

I tried allowing the upgrade wizard for VB.NET to upgrade a VB6 project I've been developing. What a mess! It was like hurricane Hugo had passed through. I had about a thousand exeptions to deal with, not to mention that graphics support had been turned inside out and cut down to size which meant that many key procedures could not be upgraded. Moreover, the graphical work I did for the picturebox control in VB6 simply cannot be duplicated in VB.NET by any means I know of. The only thing I can do would be to start from scratch with Visual c++ or do something with OpenGL or ActiveX. It's a shame. The graphics I designed were really quite slick, and fairly simple to code. They consisted of an arrow that moved along a line in response to a MouseMove event. As the arrow moved back and forth so did a field of stars, representing all the constellations in the sky at a chosen location on earth, arc back and forth in time in response to the arrow. This was just a preliminary to something more ambitious, but the point is I could have done all the necessary graphical work with the simple, easily accessable VB6 functions. There's a lot you can do with just the "Point" "Pset" and "Clear" functions

I was fairly happy with VB6, but I'm disappointed in Microsoft's sloppy treatment of VB in its .NET incarnation. Point and Pset are not the only hitches in this latest tinkering, there is also OLE support, debugging, form sizing, etc. But that's for another topic. I want to learn .NET, but thank God I still have my Visual Studio 6.0. That one goes into the vault until something better comes along.
 
C

Cor

Hi Egbert,

I am not that old, but I thought there where the same discussions when Ford
was changing his 2 shift gearbox from the T ford for something else.

But there where a lot who did use there T Ford for a long time after that
and where very happy with it.

Just a thought

Cor
 
C

Chris Dunaway

Anyway, why has Microsoft eliminated the "Point" and "Pset" functions in VB.NET

I don't fully understand their reasoning, but it has something to do with
resolution independence.

In any event, the bitmap class supports GetPixel and SetPixel, and also the
LockBits method which lets you get to the raw pixel data. Perhaps that can
help you.

Also, check out this FAQ:

http://www.bobpowell.net/gdiplus_faq.htm
 
J

Jay B. Harlow [MVP - Outlook]

Chris,
I don't know the specifics either, SetPoint would be nice and I believe not
that hard to implement, especially seeing we can use DrawLine (or is it
DrawRectangle) to "fake it".

GetPoint would be challenging!

Remember that the Graphics object has Page Transforms, World Transforms, and
aliasing! So I would expect logical SetPoint & GetPoint over physical
SetPixel & GetPixel.

So I may call SetPoint with color 1, however calling GetPoint on the exact
same coordinates, immediately after SetPoint, may return a plethora of
colors, as the logical point actually covers multiple physical points, and
each of those physical points may be a slightly different color due to
aliasing. Or completely different colors If I was using the floating point
versions of the draw methods. Unless of course SetPoint & GetPoint are
limited to physical coordinates which means they are too limited so why
bother, we can use Bitmap.GetPixel & Bitmap.SetPixel.

I am sure there are other technical reasons as to why it was omitted.
I don't fully understand their reasoning, but it has something to do with
resolution independence.
I suspect device independence also, how do you GetPoint on a printer? Of
course the Graphics object for the Printer could maintain a bitmap of the
points being printed. Lets see how much memory for the bitmap would this be
for legal paper on my 1200 dpi true color printer. ;-)

Also I question when you really need to return the color of a "point" you
just displayed, I would expect that information would be maintained in some
object within my program.

I'm not seeing anything at http://longhorn.msdn.microsoft.com/ that would
suggest this has changed in Whidbey or Longhorn.

Just a thought
Jay
 
G

Guest

I am not that old, but I thought there where the same discussions when For
Yes, but when Ford upgraded his gearbox he didn't decide to remove the wheels from the car at the same time

In any case friend, your comment is no solution. Unless you can suggest an alternative I can actually work with, you're just flapping your jaws for no good purpose
 
G

Guest

In any event, the bitmap class supports GetPixel and SetPixel, and also th
I know about GetPixel and SetPixel for the bitmap class. My problem is I have a display of hundreds of stars to deal with and each star needs to be individually plotted as it moves across the display. I'm not so sure that constantly modifying and reloading a bitmap would be the most efficient way to do that. Then again, it may be no less efficient than using "Point" and "Pset". I don't know

The LockBits method sounds interesting. I'll look into that

Thanks...
 
C

Cor

Hi Egbert,
Yes, but when Ford upgraded his gearbox he didn't decide to remove the
wheels from the car at the same time.
In any case friend, your comment is no solution. Unless you can suggest
an alternative I can actually work with, you're just flapping your jaws for
no good purpose.

I think I would have the solution for you, but for you it is only jaws.
I should not know why I would help you.

Bye

Cor
 
G

Guest

I should not know why I would help you

You would help me for the simple pleasure of doing it. Why else? You would help me to exercise your skills as a programmer and your skills as a communicator. I'm not trying to win a popularity contest here. I'm just a seeker of information who appreciates a little intellectual honesty from time to time.
 
C

Cor

Hi Eggbert,

The same question of you came when Microsoft changed the posibility to use
direct adressing the memory map of a screen. There is never been a
replacement for that, you had to take another approach to reach your goals.

Therefore was my answer about the T Ford when you said why did they changed
it and the function never came back.

There are a lot of examples in the VB resource kit.

One of them is a clock. It is moving very actual with a lot of points
changing and you can move it all over the screen.

I would look for it if I was you because you told something about moving
stars.

The resource kit you can find:
http://msdn.microsoft.com/vbasic/vbrkit/default.aspx

The example I think fits you is in "Window" applications

Samples, Gdi Clock.

I hope this helps you?

Cor
 
C

Crirus

There is a class bitmap that have this two methods... SetPixel and GetPixel
You draw anything you want in such a bitmap offscreen and then just draw
whole bitmap in a picture box

--
Ceers,
Crirus

------------------------------
If work were a good thing, the boss would take it all from you

------------------------------

eggbert said:
Jeff Garcia deserves to play!!!!

Anyway, why has Microsoft eliminated the "Point" and "Pset" functions in
VB.NET from what was already a limited selection of graphical functions in
earlier versions of VB? Any chance of doing reasonably sophisticated
graphical work in a picturebox control or any other control that supports
graphics has been crippled. The "Point" function returns the pixel color at
the given coordinates. The "Pset" function allows you to set the pixel
color at the given coordinates. I ask you, what two functions could be more
indispensable to any graphical tool kit than functions such as these? Yet,
Microsoft feels a need to eliminate them. Is this an oversight? Is it
malice?
I tried allowing the upgrade wizard for VB.NET to upgrade a VB6 project
I've been developing. What a mess! It was like hurricane Hugo had passed
through. I had about a thousand exeptions to deal with, not to mention that
graphics support had been turned inside out and cut down to size which meant
that many key procedures could not be upgraded. Moreover, the graphical
work I did for the picturebox control in VB6 simply cannot be duplicated in
VB.NET by any means I know of. The only thing I can do would be to start
from scratch with Visual c++ or do something with OpenGL or ActiveX. It's a
shame. The graphics I designed were really quite slick, and fairly simple
to code. They consisted of an arrow that moved along a line in response to
a MouseMove event. As the arrow moved back and forth so did a field of
stars, representing all the constellations in the sky at a chosen location
on earth, arc back and forth in time in response to the arrow. This was
just a preliminary to something more ambitious, but the point is I could
have done all the necessary graphical work with the simple, easily
accessable VB6 functions. There's a lot you can do with just the "Point"
"Pset" and "Clear" functions.
I was fairly happy with VB6, but I'm disappointed in Microsoft's sloppy
treatment of VB in its .NET incarnation. Point and Pset are not the only
hitches in this latest tinkering, there is also OLE support, debugging, form
sizing, etc. But that's for another topic. I want to learn .NET, but thank
God I still have my Visual Studio 6.0. That one goes into the vault until
something better comes along.
 
C

Crirus

VB 6 is nothing compared to NET... I waited for such a thing as NET 3 years

Just grab a book and get into NET in a real application, dont espect to
convert everything from 6 to NET, especialy Graphics


--
Ceers,
Crirus

------------------------------
If work were a good thing, the boss would take it all from you

------------------------------

eggbert said:
Jeff Garcia deserves to play!!!!

Anyway, why has Microsoft eliminated the "Point" and "Pset" functions in
VB.NET from what was already a limited selection of graphical functions in
earlier versions of VB? Any chance of doing reasonably sophisticated
graphical work in a picturebox control or any other control that supports
graphics has been crippled. The "Point" function returns the pixel color at
the given coordinates. The "Pset" function allows you to set the pixel
color at the given coordinates. I ask you, what two functions could be more
indispensable to any graphical tool kit than functions such as these? Yet,
Microsoft feels a need to eliminate them. Is this an oversight? Is it
malice?
I tried allowing the upgrade wizard for VB.NET to upgrade a VB6 project
I've been developing. What a mess! It was like hurricane Hugo had passed
through. I had about a thousand exeptions to deal with, not to mention that
graphics support had been turned inside out and cut down to size which meant
that many key procedures could not be upgraded. Moreover, the graphical
work I did for the picturebox control in VB6 simply cannot be duplicated in
VB.NET by any means I know of. The only thing I can do would be to start
from scratch with Visual c++ or do something with OpenGL or ActiveX. It's a
shame. The graphics I designed were really quite slick, and fairly simple
to code. They consisted of an arrow that moved along a line in response to
a MouseMove event. As the arrow moved back and forth so did a field of
stars, representing all the constellations in the sky at a chosen location
on earth, arc back and forth in time in response to the arrow. This was
just a preliminary to something more ambitious, but the point is I could
have done all the necessary graphical work with the simple, easily
accessable VB6 functions. There's a lot you can do with just the "Point"
"Pset" and "Clear" functions.
I was fairly happy with VB6, but I'm disappointed in Microsoft's sloppy
treatment of VB in its .NET incarnation. Point and Pset are not the only
hitches in this latest tinkering, there is also OLE support, debugging, form
sizing, etc. But that's for another topic. I want to learn .NET, but thank
God I still have my Visual Studio 6.0. That one goes into the vault until
something better comes along.
 

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