469,642 Members | 1,282 Online
Bytes | Developer Community
New Post

Home Posts Topics Members FAQ

Post your question to a community of 469,642 developers. It's quick & easy.

using the Point object


I want to create a program that will do graphics like math functions &
fractals & stuff. I've been browsing thru books at the bookstores.
Apparently, the Point object replaced Pset. The books explain how to create a
Point object, but not how to use it. I want to be able to plot individual
pixels. I tried DrawEllipse, but that just draws circles. I reckon that I
have to somehow use the Pen & the Point object. I don't want to draw lines. I
want to be able to plot individual pixels, not circles or ellipses or lines
or boxes. Do I have to create a class & use the object to plot the pixels?
So, how do I use the Point object to plot individual pixels? Thank you. David
Jun 21 '06 #1
5 1841
Hello pcnerd,

Point does not replace PSet. Point is a coordinate, not a pixel. Two Points
make a line-segment. 4 Points make a rectangle.. etc.

Look at the Graphics object for drawing functions. You may have to resort
to drawing a rectangle with a width and height of 1.

-Boo
I want to create a program that will do graphics like math functions &
fractals & stuff. I've been browsing thru books at the bookstores.
Apparently, the Point object replaced Pset. The books explain how to
create a Point object, but not how to use it. I want to be able to
plot individual pixels. I tried DrawEllipse, but that just draws
circles. I reckon that I have to somehow use the Pen & the Point
object. I don't want to draw lines. I want to be able to plot
individual pixels, not circles or ellipses or lines or boxes. Do I
have to create a class & use the object to plot the pixels? So, how do
I use the Point object to plot individual pixels? Thank you. David

Jun 21 '06 #2
guy
try creating a bitmap, you can then use the SetPixel method to set the colour
of the point you want

checkout the BitMap class in the docs

hth

guy

"pcnerd" wrote:

I want to create a program that will do graphics like math functions &
fractals & stuff. I've been browsing thru books at the bookstores.
Apparently, the Point object replaced Pset. The books explain how to create a
Point object, but not how to use it. I want to be able to plot individual
pixels. I tried DrawEllipse, but that just draws circles. I reckon that I
have to somehow use the Pen & the Point object. I don't want to draw lines. I
want to be able to plot individual pixels, not circles or ellipses or lines
or boxes. Do I have to create a class & use the object to plot the pixels?
So, how do I use the Point object to plot individual pixels? Thank you. David

Jun 21 '06 #3

I tried using DrawEllipse. It draws circles. When I set the height & width
to one pixel, the program draws little boxes.As I previously stated , I don't
want to draw lines or circles or boxes. I want to plot INDIVIDUAL pixels.

Thank you.

"GhostInAK" wrote:
Hello pcnerd,

Point does not replace PSet. Point is a coordinate, not a pixel. Two Points
make a line-segment. 4 Points make a rectangle.. etc.

Look at the Graphics object for drawing functions. You may have to resort
to drawing a rectangle with a width and height of 1.

-Boo
I want to create a program that will do graphics like math functions &
fractals & stuff. I've been browsing thru books at the bookstores.
Apparently, the Point object replaced Pset. The books explain how to
create a Point object, but not how to use it. I want to be able to
plot individual pixels. I tried DrawEllipse, but that just draws
circles. I reckon that I have to somehow use the Pen & the Point
object. I don't want to draw lines. I want to be able to plot
individual pixels, not circles or ellipses or lines or boxes. Do I
have to create a class & use the object to plot the pixels? So, how do
I use the Point object to plot individual pixels? Thank you. David


Jun 22 '06 #4

OK, can you be more specific? Is the bitmap created in the background in
memory & then displayed? So, for example, if I wanted to display a fractal,
the fractal would be created as a bitmap & then displayed? Is that correct?

Thank you.
David

"guy" wrote:
try creating a bitmap, you can then use the SetPixel method to set the colour
of the point you want

checkout the BitMap class in the docs

hth

guy

"pcnerd" wrote:

I want to create a program that will do graphics like math functions &
fractals & stuff. I've been browsing thru books at the bookstores.
Apparently, the Point object replaced Pset. The books explain how to create a
Point object, but not how to use it. I want to be able to plot individual
pixels. I tried DrawEllipse, but that just draws circles. I reckon that I
have to somehow use the Pen & the Point object. I don't want to draw lines. I
want to be able to plot individual pixels, not circles or ellipses or lines
or boxes. Do I have to create a class & use the object to plot the pixels?
So, how do I use the Point object to plot individual pixels? Thank you. David

Jun 22 '06 #5
guy
put a picurebox on your form

create a bitmap in code

set the picureboxes image property to your bitmap

so in your case instantiate a bitmap and
use your fractal algorithm to draw on the bitmap

look at the docs for the bitmap class

hth

guy

"pcnerd" wrote:

OK, can you be more specific? Is the bitmap created in the background in
memory & then displayed? So, for example, if I wanted to display a fractal,
the fractal would be created as a bitmap & then displayed? Is that correct?

Thank you.
David

"guy" wrote:
try creating a bitmap, you can then use the SetPixel method to set the colour
of the point you want

checkout the BitMap class in the docs

hth

guy

"pcnerd" wrote:

I want to create a program that will do graphics like math functions &
fractals & stuff. I've been browsing thru books at the bookstores.
Apparently, the Point object replaced Pset. The books explain how to create a
Point object, but not how to use it. I want to be able to plot individual
pixels. I tried DrawEllipse, but that just draws circles. I reckon that I
have to somehow use the Pen & the Point object. I don't want to draw lines. I
want to be able to plot individual pixels, not circles or ellipses or lines
or boxes. Do I have to create a class & use the object to plot the pixels?
So, how do I use the Point object to plot individual pixels? Thank you. David

Jun 22 '06 #6

This discussion thread is closed

Replies have been disabled for this discussion.

Similar topics

28 posts views Thread by Daniel | last post: by
1 post views Thread by Saeed Amrollahi | last post: by
13 posts views Thread by Stumped and Confused | last post: by
3 posts views Thread by Rob | last post: by
14 posts views Thread by Peter Hallett | last post: by
65 posts views Thread by Arjen | last post: by
reply views Thread by gheharukoh7 | last post: by
By using this site, you agree to our Privacy Policy and Terms of Use.