#include <Image.h>
Inheritance diagram for Image::

Public Types | |
| enum | Type { COLOUR, GREYSCALE } |
| Possible Image palettes. More... | |
Public Methods | |
| Image (Image &) | |
| Copy Constructor. More... | |
| Image (unsigned int width, unsigned int height) | |
| Create an image with the given dimensions. More... | |
| ~Image () | |
| Destructor for Image class. More... | |
| void | set_rgb (unsigned int x, unsigned int y, PixelRGB &p) |
| Set the rgb values of a pixel specified by (x,y). More... | |
| void | set_brightness (unsigned int x, unsigned int y, PixelGrey &level) |
| Set the brightness value of a pixel specified by (x,y). More... | |
| void | get_rgb (unsigned int x, unsigned int y, PixelRGB &p) |
| Return the red, green and blue values of the pixel specified by (x,y) in the RGB Pixel p. More... | |
| void | get_brightness (unsigned int x, unsigned int y, PixelGrey &p) |
| Return the greylevel value of a pixel specified by (x,y). More... | |
| Image& | clear_rgb (int=0) |
| Set to value (clear) all of the pixels in the RGB image data. More... | |
| Image& | clear_rgb (PixelRGB &) |
| Set to value (clear) all of the pixels in the RGB image data. More... | |
| Image& | clear_brightness (int=0) |
| Set to value (clear) all of the pixels in the brightness data. More... | |
| Image& | copy (Image &img) |
| Copy all RGB and brightness data from this to img. More... | |
| Image& | operator= (Image &img) |
| Method to overload equals (=) operator for two images. More... | |
| void | update_brightness () |
| Update brightness field for all pixels, from the RGB data. | |
| bool | draw_line (int x_start, int y_start, int x_end, int y_end, PixelGrey intensity) |
| Method draws a straight line from point (x_start,y_start) to (x_end,y_end) of intensity described by brightness in PixelGrey intensity. More... | |
| bool | draw_line (int x_start, int y_start, int x_end, int y_end, PixelRGB pix) |
| Method draws a straight line from point (x_start,y_start) to (x_end,y_end) of colour described by PixelRGB pix. More... | |
| bool | draw_filled_circle (unsigned int centre_x, unsigned int centre_y, unsigned int radius, PixelGrey intensity) |
| Method draws a filled circle with centre at point (centre_x,centre_y) of radius radius and brightness described by PixelGrey intensity. More... | |
| bool | draw_filled_circle (unsigned int centre_x, unsigned int centre_y, unsigned int radius, PixelRGB pix) |
| Method draws a filled circle with centre at point (centre_x,centre_y) of radius radius and colour described by PixelRGB pix. More... | |
The Image class inherits RGB properties from the ImageRGB class and greyscale properties from the ImageGrey class. So this class can be used as either a greyscale or colour image.
Definition at line 33 of file Image.h.
|
|
Possible Image palettes.
|
|
|
Copy Constructor.
|
|
|
Create an image with the given dimensions.
|
|
|
Destructor for Image class. Frees memory allocated to array: |
|
|
Set to value (clear) all of the pixels in the brightness data.
|
|
|
Set to value (clear) all of the pixels in the RGB image data.
|
|
|
Set to value (clear) all of the pixels in the RGB image data.
|
|
|
Copy all RGB and brightness data from this to img. Throws an exception if images are of different size.
|
|
|
Method draws a filled circle with centre at point (centre_x,centre_y) of radius radius and colour described by PixelRGB pix. The method returns false if any point is outside the image. Reimplemented from ImageRGB. Definition at line 216 of file Image-draw.cpp. |
|
|
Method draws a filled circle with centre at point (centre_x,centre_y) of radius radius and brightness described by PixelGrey intensity. The method returns false if any point is outside the image. Reimplemented from ImageGrey. Definition at line 203 of file Image-draw.cpp. |
|
|
Method draws a straight line from point (x_start,y_start) to (x_end,y_end) of colour described by PixelRGB pix. The method returns false if either point is outside the image. Reimplemented from ImageRGB. Definition at line 38 of file Image-draw.cpp. |
|
|
Method draws a straight line from point (x_start,y_start) to (x_end,y_end) of intensity described by brightness in PixelGrey intensity. The method returns false if either point is outside the imagei. Reimplemented from ImageGrey. Definition at line 24 of file Image-draw.cpp. |
|
|
Return the greylevel value of a pixel specified by (x,y).
|
|
|
Return the red, green and blue values of the pixel specified by (x,y) in the RGB Pixel p.
|
|
|
Method to overload equals (=) operator for two images. Calls the copy method on img passing this as its argument.
|
|
|
Set the brightness value of a pixel specified by (x,y). Throws an exception if coordinates are not valid.
|
|
|
Set the rgb values of a pixel specified by (x,y).
|
1.2.8.1 written by Dimitri van Heesch,
© 1997-2001