tweak image stamp, was 1px overlap and text was drawn too far up.
authorCampbell Barton <ideasman42@gmail.com>
Sun, 1 May 2011 09:39:32 +0000 (09:39 +0000)
committerCampbell Barton <ideasman42@gmail.com>
Sun, 1 May 2011 09:39:32 +0000 (09:39 +0000)
source/blender/blenkernel/intern/image.c

index 28559812f4d8f068fc52e8936138ddc8c5de9523..8598ec1063e938c194f77941a235c44984d14db8 100644 (file)
@@ -675,8 +675,10 @@ void BKE_image_all_free_anim_ibufs(int cfra)
 
 int BKE_imtype_to_ftype(int imtype)
 {
-       if(imtype==0)
+       if(imtype==R_TARGA)
                return TGA;
+       else if(imtype==R_RAWTGA)
+               return RAWTGA;
        else if(imtype== R_IRIS) 
                return IMAGIC;
 #ifdef WITH_HDR
@@ -703,10 +705,6 @@ int BKE_imtype_to_ftype(int imtype)
        else if (imtype==R_DPX)
                return DPX;
 #endif
-       else if (imtype==R_TARGA)
-               return TGA;
-       else if(imtype==R_RAWTGA)
-               return RAWTGA;
 #ifdef WITH_OPENJPEG
        else if(imtype==R_JP2)
                return JP2;
@@ -1044,7 +1042,6 @@ void BKE_stamp_buf(Scene *scene, Object *camera, unsigned char *rect, float *rec
                BLF_boundbox(mono, "j", &box);
                y_ofs = (int)(baseline - box.ymin);
                if(y_ofs < 0) y_ofs= 0; /* should never happen */
-               y_ofs++;
        }
 
        x= 0;
@@ -1063,7 +1060,7 @@ void BKE_stamp_buf(Scene *scene, Object *camera, unsigned char *rect, float *rec
                BLF_draw_buffer(mono, stamp_data.file);
 
                /* the extra pixel for background. */
-               y -= 4;
+               y -= 5;
        }
 
        /* Top left corner, below File */
@@ -1078,7 +1075,7 @@ void BKE_stamp_buf(Scene *scene, Object *camera, unsigned char *rect, float *rec
                BLF_draw_buffer(mono, stamp_data.note);
 
                /* the extra pixel for background. */
-               y -= 4;
+               y -= 5;
        }
        
        /* Top left corner, below File (or Note) */
@@ -1093,7 +1090,7 @@ void BKE_stamp_buf(Scene *scene, Object *camera, unsigned char *rect, float *rec
                BLF_draw_buffer(mono, stamp_data.date);
 
                /* the extra pixel for background. */
-               y -= 4;
+               y -= 5;
        }
 
        /* Top left corner, below File, Date or Note */