X-Git-Url: https://www.fleuret.org/cgi-bin/gitweb/gitweb.cgi?p=folded-ctf.git;a=blobdiff_plain;f=rgb_image_subpixel.h;h=57d41e219a3900ac996ae32535ec83b4bbe42d1e;hp=778f0840806872098ec26d696609c7b4ed946d8f;hb=aed34255065b18c445d096f51bd2091833810a81;hpb=20ec321944108cd1fe74b37ea45db3ba1a2d526a diff --git a/rgb_image_subpixel.h b/rgb_image_subpixel.h index 778f084..57d41e2 100644 --- a/rgb_image_subpixel.h +++ b/rgb_image_subpixel.h @@ -18,7 +18,12 @@ // Contact for comments & bug reports // /////////////////////////////////////////////////////////////////////////// -// A simple color image class +/* + + Same as RGBImage, but with sub-pixel resolution to produce nifty + smoothing in the drawings. + + */ #ifndef RGB_IMAGE_SUBPIXEL_H #define RGB_IMAGE_SUBPIXEL_H @@ -27,18 +32,15 @@ #include "rgb_image.h" class RGBImageSubpixel : public RGBImage { - static const int _scale = 8; + static const int scale = 8; public: RGBImageSubpixel(int width, int height); RGBImageSubpixel(RGBImage *image); virtual ~RGBImageSubpixel(); - inline int width() const { return _width / _scale; } - inline int height() const { return _height / _scale; } - - virtual void read_ppm(const char *filename); - virtual void write_ppm(const char *filename); + inline int width() const { return _width / scale; } + inline int height() const { return _height / scale; } virtual void read_png(const char *filename); virtual void write_png(const char *filename);