[Bf-blender-cvs] SVN commit: /data/svn/bf-blender [35204] trunk/blender/source/blender/ editors/space_image/image_draw.c: Sampling float colors in Image Editor only showed 3 digits precision.

Ton Roosendaal ton at blender.org
Sat Feb 26 19:39:22 CET 2011


Revision: 35204
          http://projects.blender.org/scm/viewvc.php?view=rev&root=bf-blender&revision=35204
Author:   ton
Date:     2011-02-26 18:39:21 +0000 (Sat, 26 Feb 2011)
Log Message:
-----------
Sampling float colors in Image Editor only showed 3 digits precision.
Let's make it four! :)

Modified Paths:
--------------
    trunk/blender/source/blender/editors/space_image/image_draw.c

Modified: trunk/blender/source/blender/editors/space_image/image_draw.c
===================================================================
--- trunk/blender/source/blender/editors/space_image/image_draw.c	2011-02-26 16:27:58 UTC (rev 35203)
+++ trunk/blender/source/blender/editors/space_image/image_draw.c	2011-02-26 18:39:21 UTC (rev 35204)
@@ -138,11 +138,11 @@
 
 	if(fp) {
 		if(channels==4)
-			ofs+= BLI_snprintf(str + ofs, sizeof(str)-ofs, "| R: %.3f G: %.3f B: %.3f A: %.3f ", fp[0], fp[1], fp[2], fp[3]);
+			ofs+= BLI_snprintf(str + ofs, sizeof(str)-ofs, "| R: %.4f G: %.4f B: %.4f A: %.4f ", fp[0], fp[1], fp[2], fp[3]);
 		else if(channels==1)
-			ofs+= BLI_snprintf(str + ofs, sizeof(str)-ofs, "| Val: %.3f ", fp[0]);
+			ofs+= BLI_snprintf(str + ofs, sizeof(str)-ofs, "| Val: %.4f ", fp[0]);
 		else if(channels==3)
-			ofs+= BLI_snprintf(str + ofs, sizeof(str)-ofs, "| R: %.3f G: %.3f B: %.3f ", fp[0], fp[1], fp[2]);
+			ofs+= BLI_snprintf(str + ofs, sizeof(str)-ofs, "| R: %.4f G: %.4f B: %.4f ", fp[0], fp[1], fp[2]);
 	}
 
 	if(zp)




More information about the Bf-blender-cvs mailing list