grogerteal wrote:
Hello,
I am pretty new to programming and would like someone to help me get
started on the program that I need to make.
I hope it is not hard to do, but what I would like is a simple app that
has a label which returns the color of a pixel that is in position x,y on
the screen (i.e. the desktop @ 1024 x 768 pixels), where x and y are of
course variable.
Here are some issues as to why the C++ language does not include
support for graphics.
1. Definition of a pixel.
Yes, we know that a pixel is a picture element. But that seems to
be the best we can do.
Is the pixel color, black/white or grayscale?
How is the pixel represented?
One bit?
8 bits?
24 bits?
How many bits per color?
What is the order of the color?
What is the color space? (RGB? CMYK? HSB?)
What is the physical size of the pixel?
Is the pixel round or rectangular?
2. A Screen is commonly a collection of rows of pixels.
Are the rows interlaced in memory or contiguous?
How many pixels in the row are visible?
How many pixels per unit distance? (dots per inch?)
3. Accessing the pixels.
Are the pixels memory mapped or device (I/O) mapped?
If memory mapped, are they in the user's memory space?
If device mapped, how are they accessed?
Does a One turn on the pixel or turn it off?
Does the pixel have other attributes, such as intensity?, Blinking?
Can one read a pixel or is it a Write-Only Memory?
All of the above issues are different on each platform, including
those platforms that don't have screens (such as a dishwasher,
and a vending machine). Some platforms even have screens that
use vectors instead of pixels.
This is why many of the people in this newsgroup direct
questions about graphics to the platform specific newsgroups.
Read the FAQs and welcome.txt below.
--
Thomas Matthews
C++ newsgroup welcome message:
http://www.slack.net/~shiva/welcome.txt
C++ Faq:
http://www.parashift.com/c++-faq-lite
C Faq:
http://www.eskimo.com/~scs/c-faq/top.html
alt.comp.lang.learn.c-c++ faq:
http://www.comeaucomputing.com/learn/faq/
Other sites:
http://www.josuttis.com -- C++ STL Library book