Welcome to mirror list, hosted at ThFree Co, Russian Federation.

git.blender.org/blender.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorCampbell Barton <ideasman42@gmail.com>2012-05-22 12:24:52 +0400
committerCampbell Barton <ideasman42@gmail.com>2012-05-22 12:24:52 +0400
commit00e7a4b5a70c64c6f1961b860c50d93daee4cbf7 (patch)
tree60a0685aa0869594090bd05600fbd39d108a1634 /source/blender/editors/interface/resources.c
parentd435be750a06ca672d82192d88bb00f01b068c92 (diff)
fix [#31530] Project paint with Clipping border gives opaque background
draw clipping box alpha 0 so reprojection and rendering show the background as alpha 0.
Diffstat (limited to 'source/blender/editors/interface/resources.c')
-rw-r--r--source/blender/editors/interface/resources.c23
1 files changed, 21 insertions, 2 deletions
diff --git a/source/blender/editors/interface/resources.c b/source/blender/editors/interface/resources.c
index bf57dda44bf..9d66c9ea2e1 100644
--- a/source/blender/editors/interface/resources.c
+++ b/source/blender/editors/interface/resources.c
@@ -1028,7 +1028,7 @@ int UI_GetThemeValue(int colorid)
// get the color, range 0.0-1.0
-void UI_GetThemeColor3fv(int colorid, float *col)
+void UI_GetThemeColor3fv(int colorid, float col[3])
{
const unsigned char *cp;
@@ -1039,7 +1039,7 @@ void UI_GetThemeColor3fv(int colorid, float *col)
}
// get the color, range 0.0-1.0, complete with shading offset
-void UI_GetThemeColorShade3fv(int colorid, int offset, float *col)
+void UI_GetThemeColorShade3fv(int colorid, int offset, float col[3])
{
int r, g, b;
const unsigned char *cp;
@@ -1058,6 +1058,25 @@ void UI_GetThemeColorShade3fv(int colorid, int offset, float *col)
col[2] = ((float)b) / 255.0f;
}
+void UI_GetThemeColorShade3ubv(int colorid, int offset, unsigned char col[3])
+{
+ int r, g, b;
+ const unsigned char *cp;
+
+ cp = UI_ThemeGetColorPtr(theme_active, theme_spacetype, colorid);
+
+ r = offset + (int) cp[0];
+ CLAMP(r, 0, 255);
+ g = offset + (int) cp[1];
+ CLAMP(g, 0, 255);
+ b = offset + (int) cp[2];
+ CLAMP(b, 0, 255);
+
+ col[0] = r;
+ col[1] = g;
+ col[2] = b;
+}
+
// get the color, in char pointer
void UI_GetThemeColor3ubv(int colorid, unsigned char col[3])
{