473,695 Members | 1,998 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

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 2009
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 thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

0
6697
by: Nashat Wanly | last post by:
HOW TO: Call a Parameterized Stored Procedure by Using ADO.NET and Visual C# .NET View products that this article applies to. This article was previously published under Q310070 For a Microsoft Visual Basic .NET version of this article, see 308049. For a Microsoft Visual C++ .NET version of this article, see 310071. For a Microsoft Visual J# .NET version of this article, see 320627. This article refers to the following Microsoft .NET...
28
20327
by: Daniel | last post by:
Hello =) I have an object which contains a method that should execute every x ms. I can use setInterval inside the object construct like this - self.setInterval('ObjectName.methodName()', this.pinginterval); - but is there no way to do this without using the literal ObjectName? If I write 'this.methodName()' I get "Line 1 Char 1: Object doesn't support this property or method." in IE, and nothing happens in Firebird.
1
3551
by: Saeed Amrollahi | last post by:
Dear All C++ Programmers Hello I am Saeed Amrollahi. I am a software engineer in Tehran Sewerage Company. I try to use std::map and map::find member function. I use Visual Studio .NET. my program uses two MFC classes: CRect and CPoint which represents Rectangle and Point concepts (as usual) and a user
13
9621
by: Stumped and Confused | last post by:
Hello, I really, really, need some help here - I've spent hours trying to find a solution. In a nutshell, I'm trying to have a user input a value in form's textfield. The value should then be assigned to a variable and output using document.write. (Note, there is no submit button or other form elements. Basically
3
25280
by: Todd Schinell | last post by:
Back in July, Jeffery Tan posted this: http://groups.google.com/groups?hl=en&lr=&ie=UTF-8&oe=UTF-8&selm=OWOTdf0VDHA.2296%40cpmsftngxa06.phx.gbl In response as to how to get click events from a user control to invoke a method in the parent form. This code doesn't seem to work for me, I've tried it a number of times with very simple test cases (A user control with a single button and a parent form with a single text box) and it always...
3
5332
by: Rob | last post by:
Hi all, I am having trouble converting the code below (found on http://vbnet.mvps.org/index.html?code/core/sendmessage.htm) into a format that will work using vb .NET. Can anyone have a look at it and let me know what I need to change. I have tried changing the "hwnd" type into intptr's but there seem to be other problems too, like it won't allow "lParam As Any" to be declared.
7
2579
by: Peter Row | last post by:
Hi, I've started work on my own control some parts of which use standard controls, others I need to draw on my controls surface to get the display output I require, however.... I seem to be stupid or missing the point. I used DrawString( ) as a simple test but I cannot get it to work at all unless I handle my custom controls Paint event.
14
3127
by: Peter Hallett | last post by:
I would like to set up a string array as a class member, or field, and then populate this array by reading in from a text file, but I cannot find the appropriate syntax. The getter and setter are very unhappy with the idea and the compiler refuses to play ball with any of the attempts I have made to build such a structure. There is no problem when using a single string but a two dimensional array of strings appears to be a very different...
65
3899
by: Arjen | last post by:
Hi, Form a performance perspective, is it wise to use the ref statement as much as possible? Thanks! Arjen
0
8630
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, people are often confused as to whether an ONU can Work As a Router. In this blog post, weíll explore What is ONU, What Is Router, ONU & Routerís main usage, and What is the difference between ONU and Router. Letís take a closer look ! Part I. Meaning of...
0
8568
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 effortlessly switch the default language on Windows 10 without reinstalling. I'll walk you through it. First, let's disable language synchronization. With a Microsoft account, language settings sync across devices. To prevent any complications,...
0
8982
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven tapestry of website design and digital marketing. It's not merely about having a website; it's about crafting an immersive digital experience that captivates audiences and drives business growth. The Art of Business Website Design Your website is...
0
8825
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each protocol has its own unique characteristics and advantages, but as a user who is planning to build a smart home system, I am a bit confused by the choice of these technologies. I'm particularly interested in Zigbee because I've heard it does some...
0
5839
by: conductexam | last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and then checking html paragraph one by one. At the time of converting from word file to html my equations which are in the word document file was convert into image. Globals.ThisAddIn.Application.ActiveDocument.Select();...
0
4340
by: TSSRALBI | last post by:
Hello I'm a network technician in training and I need your help. I am currently learning how to create and manage the different types of VPNs and I have a question about LAN-to-LAN VPNs. The last exercise I practiced was to create a LAN-to-LAN VPN between two Pfsense firewalls, by using IPSEC protocols. I succeeded, with both firewalls in the same network. But I'm wondering if it's possible to do the same thing, with 2 Pfsense firewalls...
0
4579
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
2
2272
muto222
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.
3
1976
bsmnconsultancy
by: bsmnconsultancy | last post by:
In today's digital era, a well-designed website is crucial for businesses looking to succeed. Whether you're a small business owner or a large corporation in Toronto, having a strong online presence can significantly impact your brand's success. BSMN Consultancy, a leader in Website Development in Toronto offers valuable insights into creating effective websites that not only look great but also perform exceptionally well. In this comprehensive...

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.