OSDN Git Service

cache
[psychlops/cpp.git] / psychlops / core / graphic / psychlops_g_image.cpp
index d003429..4d58af9 100644 (file)
@@ -106,7 +106,8 @@ namespace Psychlops {
                width_ = 0;
                height_ = 0;
                pixcomp_ = RGB;
-               pixprec_ = BYTE;
+               pixprec_ = BYTE;\r
+               _zoom_percentage_ = 100;
        }
 
 
@@ -251,6 +252,11 @@ void Image::pix_ub_bits_mono_(int ix, int iy, double lum) {
        *(++p) = (unsigned char)0;
 }
 */
+       Image& Image::_zoom_(const double percentage) {\r
+           _zoom_percentage_ = percentage;\r
+           targetarea_.resize(width_*(percentage/100.0), height_*(percentage/100.0));\r
+           return *this;\r
+       }
        Image& Image::alpha(const double a)
        {
                for(int y=0; y<getHeight(); y++)