Ray Tracer Common Project
Image rendering program based on the ray tracing technique.
Public Member Functions | List of all members
rt::bitmap Class Reference

Load an image from the file system. More...

#include <bitmap.hpp>

Inheritance diagram for rt::bitmap:
rt::image

Public Member Functions

 bitmap (const std::string &filename)
 Make a bitmap from a file name.
 
virtual color get_pixel (int x, int y) const
 
virtual void set_pixel (int x, int y, const color &c)
 Sets a pixel to a given color.
 
- Public Member Functions inherited from rt::image
 image (int width, int height)
 
 image (const image &img)
 
virtual ~image ()
 
virtual int width () const
 
virtual int height () const
 
virtual image copy () const
 
virtual void blit (image &dst, const rect &srcrect, int dstx, int dsty) const
 
virtual void blit (image &dst, int dstx, int dsty) const
 
virtual void draw_line (int x1, int y1, int x2, int y2, const color &c)
 
virtual void draw_rect (int x1, int y1, int x2, int y2, const color &c)
 
virtual void fill_rect (int x1, int y1, int x2, int y2, const color &c)
 

Additional Inherited Members

- Protected Member Functions inherited from rt::image
 image ()
 
- Protected Attributes inherited from rt::image
SDL_Surface * data
 

Detailed Description

Load an image from the file system.

The Bitmap is a 24 or 32 bits image loaded from the file system.

Member Function Documentation

◆ get_pixel()

color rt::bitmap::get_pixel ( int  x,
int  y 
) const
virtual
Returns
The color of a pixel

Reimplemented from rt::image.


The documentation for this class was generated from the following files: