[Bf-blender-cvs] SVN commit: /data/svn/bf-blender [53370] trunk/blender/source/blender/ editors/space_image/image_draw.c: Small fix: increased precision print of color sampling float images with 1 digit.

Ton Roosendaal ton at blender.org
Fri Dec 28 14:44:47 CET 2012


Revision: 53370
          http://projects.blender.org/scm/viewvc.php?view=rev&root=bf-blender&revision=53370
Author:   ton
Date:     2012-12-28 13:44:44 +0000 (Fri, 28 Dec 2012)
Log Message:
-----------
Small fix: increased precision print of color sampling float images with 1 digit.
Now it prints 5, which shows better whether a buffer is float, or half float.

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	2012-12-28 13:34:19 UTC (rev 53369)
+++ trunk/blender/source/blender/editors/space_image/image_draw.c	2012-12-28 13:44:44 UTC (rev 53370)
@@ -146,7 +146,7 @@
 	if (channels >= 3) {
 		glColor3ubv(red);
 		if (fp)
-			BLI_snprintf(str, sizeof(str), "  R:%-.4f", fp[0]);
+			BLI_snprintf(str, sizeof(str), "  R:%-.5f", fp[0]);
 		else if (cp)
 			BLI_snprintf(str, sizeof(str), "  R:%-3d", cp[0]);
 		else
@@ -157,7 +157,7 @@
 		
 		glColor3ubv(green);
 		if (fp)
-			BLI_snprintf(str, sizeof(str), "  G:%-.4f", fp[1]);
+			BLI_snprintf(str, sizeof(str), "  G:%-.5f", fp[1]);
 		else if (cp)
 			BLI_snprintf(str, sizeof(str), "  G:%-3d", cp[1]);
 		else
@@ -168,7 +168,7 @@
 		
 		glColor3ubv(blue);
 		if (fp)
-			BLI_snprintf(str, sizeof(str), "  B:%-.4f", fp[2]);
+			BLI_snprintf(str, sizeof(str), "  B:%-.5f", fp[2]);
 		else if (cp)
 			BLI_snprintf(str, sizeof(str), "  B:%-3d", cp[2]);
 		else




More information about the Bf-blender-cvs mailing list