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:
authorBrecht Van Lommel <brechtvanlommel@gmail.com>2018-08-14 21:03:08 +0300
committerBrecht Van Lommel <brechtvanlommel@gmail.com>2018-08-14 21:03:08 +0300
commite6af1e447871a66dc5808e9544e459008c4c1977 (patch)
tree1d986b4979f61b9f902da3c63f6384006a205029 /source/blender/editors/interface
parenta3c9f4de7041993ace15078e9943dc2e2c7c1fff (diff)
Cleanup: remove unused theme color functions using legacy GL.
Diffstat (limited to 'source/blender/editors/interface')
-rw-r--r--source/blender/editors/interface/resources.c113
1 files changed, 0 insertions, 113 deletions
diff --git a/source/blender/editors/interface/resources.c b/source/blender/editors/interface/resources.c
index 72023ebf2ae..7b6f6d0038b 100644
--- a/source/blender/editors/interface/resources.c
+++ b/source/blender/editors/interface/resources.c
@@ -799,51 +799,6 @@ void UI_Theme_Restore(struct bThemeState *theme_state)
g_theme_state = *theme_state;
}
-/* for space windows only */
-void UI_ThemeColor(int colorid)
-{
- const unsigned char *cp;
-
- cp = UI_ThemeGetColorPtr(theme_active, theme_spacetype, colorid);
- glColor3ubv(cp);
-
-}
-
-/* plus alpha */
-void UI_ThemeColor4(int colorid)
-{
- const unsigned char *cp;
-
- cp = UI_ThemeGetColorPtr(theme_active, theme_spacetype, colorid);
- glColor4ubv(cp);
-}
-
-/* set the color with offset for shades */
-void UI_ThemeColorShade(int colorid, int offset)
-{
- unsigned char col[4];
- UI_GetThemeColorShade4ubv(colorid, offset, col);
- glColor4ubv(col);
-}
-
-void UI_ThemeColorShadeAlpha(int colorid, int coloffset, int alphaoffset)
-{
- int r, g, b, a;
- const unsigned char *cp;
-
- cp = UI_ThemeGetColorPtr(theme_active, theme_spacetype, colorid);
- r = coloffset + (int) cp[0];
- CLAMP(r, 0, 255);
- g = coloffset + (int) cp[1];
- CLAMP(g, 0, 255);
- b = coloffset + (int) cp[2];
- CLAMP(b, 0, 255);
- a = alphaoffset + (int) cp[3];
- CLAMP(a, 0, 255);
-
- glColor4ub(r, g, b, a);
-}
-
void UI_GetThemeColorShadeAlpha4ubv(int colorid, int coloffset, int alphaoffset, unsigned char col[4])
{
int r, g, b, a;
@@ -891,58 +846,6 @@ void UI_GetThemeColorBlend3f(int colorid1, int colorid2, float fac, float r_col[
r_col[2] = ((1.0f - fac) * cp1[2] + fac * cp2[2]) / 255.0f;
}
-/* blend between to theme colors, and set it */
-void UI_ThemeColorBlend(int colorid1, int colorid2, float fac)
-{
- unsigned char col[3];
- UI_GetThemeColorBlend3ubv(colorid1, colorid2, fac, col);
- glColor3ubv(col);
-}
-
-/* blend between to theme colors, shade it, and set it */
-void UI_ThemeColorBlendShade(int colorid1, int colorid2, float fac, int offset)
-{
- int r, g, b;
- const unsigned char *cp1, *cp2;
-
- cp1 = UI_ThemeGetColorPtr(theme_active, theme_spacetype, colorid1);
- cp2 = UI_ThemeGetColorPtr(theme_active, theme_spacetype, colorid2);
-
- CLAMP(fac, 0.0f, 1.0f);
- r = offset + floorf((1.0f - fac) * cp1[0] + fac * cp2[0]);
- g = offset + floorf((1.0f - fac) * cp1[1] + fac * cp2[1]);
- b = offset + floorf((1.0f - fac) * cp1[2] + fac * cp2[2]);
-
- CLAMP(r, 0, 255);
- CLAMP(g, 0, 255);
- CLAMP(b, 0, 255);
-
- glColor3ub(r, g, b);
-}
-
-/* blend between to theme colors, shade it, and set it */
-void UI_ThemeColorBlendShadeAlpha(int colorid1, int colorid2, float fac, int offset, int alphaoffset)
-{
- int r, g, b, a;
- const unsigned char *cp1, *cp2;
-
- cp1 = UI_ThemeGetColorPtr(theme_active, theme_spacetype, colorid1);
- cp2 = UI_ThemeGetColorPtr(theme_active, theme_spacetype, colorid2);
-
- CLAMP(fac, 0.0f, 1.0f);
- r = offset + floorf((1.0f - fac) * cp1[0] + fac * cp2[0]);
- g = offset + floorf((1.0f - fac) * cp1[1] + fac * cp2[1]);
- b = offset + floorf((1.0f - fac) * cp1[2] + fac * cp2[2]);
- a = alphaoffset + floorf((1.0f - fac) * cp1[3] + fac * cp2[3]);
-
- CLAMP(r, 0, 255);
- CLAMP(g, 0, 255);
- CLAMP(b, 0, 255);
- CLAMP(a, 0, 255);
-
- glColor4ub(r, g, b, a);
-}
-
void UI_FontThemeColor(int fontid, int colorid)
{
unsigned char color[4];
@@ -1210,22 +1113,6 @@ void UI_GetThemeColorType4ubv(int colorid, int spacetype, char col[4])
col[3] = cp[3];
}
-/* blends and shades between two char color pointers */
-void UI_ColorPtrBlendShade3ubv(const unsigned char cp1[3], const unsigned char cp2[3], float fac, int offset)
-{
- int r, g, b;
- CLAMP(fac, 0.0f, 1.0f);
- r = offset + floorf((1.0f - fac) * cp1[0] + fac * cp2[0]);
- g = offset + floorf((1.0f - fac) * cp1[1] + fac * cp2[1]);
- b = offset + floorf((1.0f - fac) * cp1[2] + fac * cp2[2]);
-
- r = r < 0 ? 0 : (r > 255 ? 255 : r);
- g = g < 0 ? 0 : (g > 255 ? 255 : g);
- b = b < 0 ? 0 : (b > 255 ? 255 : b);
-
- glColor3ub(r, g, b);
-}
-
void UI_GetColorPtrShade3ubv(const unsigned char cp[3], unsigned char col[3], int offset)
{
int r, g, b;