OSDN Git Service

cache
[psychlops/cpp.git] / psychlops / core / graphic / psychlops_g_canvas.cpp
index a2f45c8..c70a353 100644 (file)
@@ -117,7 +117,7 @@ namespace Psychlops {
                loadFontMinimum();
 
                initAPIprop();
-               
+
                if(!api->vsync_available_) {
                        Rectangle *rect = new Rectangle(600, 20);
                        rect->centering(getCenter().x, getHeight()-20);
@@ -334,8 +334,12 @@ namespace Psychlops {
 
        ////    Drawing Images
 
-       Canvas& Canvas::image(const Image &img) {
-               drawImage(img, img.targetarea_.getLeft(), img.targetarea_.getTop());
+       Canvas& Canvas::image(const Image &img) {\r
+           if(img._zoom_percentage_ == 100) {
+            drawImage(img, img.targetarea_.getLeft(), img.targetarea_.getTop());\r
+           } else {
+            drawImage((Image &)img, img.targetarea_);\r
+           }
                return *this;
        }
        void Canvas::drawImage(const Image &img) {