I have this description of an UML diagram to make an implementation file for a shape that we need to display, and one of the functions described as:
The createNewtonImageFile() function should write the image to the file specified by the class variable file name, with a 24-bit depth (by using the appropriate base class functions).
It is given the header base class to create a bitmap, and its .o file, so i have no access to the .cpp file.
so basically i have the header file for bitmapImage.h, bitmapImage.o (these are given). and now i need to work on the header file for newtonTypeClass.h and newtonTypeImp.cpp(this is where i need to code the function described above ,from the base bitmapImage.h)
The question is, what function do i need to call from this header bitmap file, to do what
the description is telling me, and how to call it in the implementation file newtonTypeImp that im coding.
this is the header of the bitmap file, the one that has the required function
/*
A class for working with the Windows Bitmap File Format.
Supports bit depths of 16, 24, and 32 with uncompressed pixel data.
This does not support compressed bitmaps or bit depths of 1,4, or 8.
Compression is rarely used with this file format, though.
Colors can be specified in RGB format (red, green, and blue
intensity values)
Red, Green, Blue colors range from 0-255
(0 -> off to 255 -> full intensity)
For red, it would be (255, 0, 0) and in hex, (0xff0000).
As a single value, 0xff0000 is 16,711,680
For green, it would be (0, 255, 0) and in hex, (0x00ff00).
As a single value, 0x00ff00 is 65,280
*/
class bitmapImage
{
private:
int width, height;
int **pixelData;
void freePixelData();