diff options
Diffstat (limited to 'source/blender/blenlib')
-rw-r--r-- | source/blender/blenlib/BLI_math_color.h | 2 | ||||
-rw-r--r-- | source/blender/blenlib/intern/math_color.c | 6 | ||||
-rw-r--r-- | source/blender/blenlib/intern/md5.c | 2 | ||||
-rw-r--r-- | source/blender/blenlib/intern/pbvh.c | 2 | ||||
-rw-r--r-- | source/blender/blenlib/intern/voronoi.c | 12 |
5 files changed, 17 insertions, 7 deletions
diff --git a/source/blender/blenlib/BLI_math_color.h b/source/blender/blenlib/BLI_math_color.h index 7520f09fe95..6fe5d48d06e 100644 --- a/source/blender/blenlib/BLI_math_color.h +++ b/source/blender/blenlib/BLI_math_color.h @@ -67,6 +67,8 @@ void rgb_to_yuv(float r, float g, float b, float *ly, float *lu, float *lv); void rgb_to_ycc(float r, float g, float b, float *ly, float *lcb, float *lcr, int colorspace); void rgb_to_hsv(float r, float g, float b, float *lh, float *ls, float *lv); void rgb_to_hsv_v(const float rgb[3], float r_hsv[3]); +void rgb_to_hsl(float r, float g, float b, float *lh, float *ls, float *ll); +void rgb_to_hsl_v(const float rgb[3], float r_hsl[3]); void rgb_to_hsv_compat(float r, float g, float b, float *lh, float *ls, float *lv); void rgb_to_hsv_compat_v(const float rgb[3], float r_hsv[3]); void rgb_to_lab(float r, float g, float b, float *ll, float *la, float *lb); diff --git a/source/blender/blenlib/intern/math_color.c b/source/blender/blenlib/intern/math_color.c index b93597bf107..64851dbf12c 100644 --- a/source/blender/blenlib/intern/math_color.c +++ b/source/blender/blenlib/intern/math_color.c @@ -293,6 +293,12 @@ void rgb_to_hsl(float r, float g, float b, float *lh, float *ls, float *ll) *ll = l; } +/* convenience function for now */ +void rgb_to_hsl_v(const float rgb[3], float r_hsl[3]) +{ + rgb_to_hsl(rgb[0], rgb[1], rgb[2], &r_hsl[0], &r_hsl[1], &r_hsl[2]); +} + void rgb_to_hsv_compat(float r, float g, float b, float *lh, float *ls, float *lv) { float orig_h = *lh; diff --git a/source/blender/blenlib/intern/md5.c b/source/blender/blenlib/intern/md5.c index a521d0e523b..4a09afe2e3d 100644 --- a/source/blender/blenlib/intern/md5.c +++ b/source/blender/blenlib/intern/md5.c @@ -2,6 +2,8 @@ * \ingroup imbuf */ +#include "BLI_md5.h" /* own include */ + /* md5.c - Functions to compute MD5 message digest of files or memory blocks according to the definition of MD5 in RFC 1321 from April 1992. Copyright (C) 1995 Software Foundation, Inc. diff --git a/source/blender/blenlib/intern/pbvh.c b/source/blender/blenlib/intern/pbvh.c index 22597c9f8e6..d3d8d371f60 100644 --- a/source/blender/blenlib/intern/pbvh.c +++ b/source/blender/blenlib/intern/pbvh.c @@ -487,7 +487,7 @@ static void build_leaf(PBVH *bvh, int node_index, BBC *prim_bbc, /* Return zero if all primitives in the node can be drawn with the * same material (including flat/smooth shading), non-zerootherwise */ -int leaf_needs_material_split(PBVH *bvh, int offset, int count) +static int leaf_needs_material_split(PBVH *bvh, int offset, int count) { int i, prim; diff --git a/source/blender/blenlib/intern/voronoi.c b/source/blender/blenlib/intern/voronoi.c index 80a4da5cace..3030e54eb78 100644 --- a/source/blender/blenlib/intern/voronoi.c +++ b/source/blender/blenlib/intern/voronoi.c @@ -480,7 +480,7 @@ static void voronoi_removeParabola(VoronoiProcess *process, VoronoiEvent *event) voronoi_checkCircle(process, p2); } -void voronoi_finishEdge(VoronoiProcess *process, VoronoiParabola *parabola) +static void voronoi_finishEdge(VoronoiProcess *process, VoronoiParabola *parabola) { float mx; @@ -503,12 +503,12 @@ void voronoi_finishEdge(VoronoiProcess *process, VoronoiParabola *parabola) MEM_freeN(parabola); } -void voronoi_clampEdgeVertex(int width, int height, float *coord, float *other_coord) +static void voronoi_clampEdgeVertex(int width, int height, float *coord, float *other_coord) { const float corners[4][2] = {{0.0f, 0.0f}, - {width - 1, 0.0f}, - {width - 1, height - 1}, - {0.0f, height - 1}}; + {width - 1, 0.0f}, + {width - 1, height - 1}, + {0.0f, height - 1}}; int i; if (IN_RANGE_INCL(coord[0], 0, width - 1) && IN_RANGE_INCL(coord[1], 0, height - 1)) { @@ -541,7 +541,7 @@ void voronoi_clampEdgeVertex(int width, int height, float *coord, float *other_c } } -void voronoi_clampEdges(ListBase *edges, int width, int height, ListBase *clamped_edges) +static void voronoi_clampEdges(ListBase *edges, int width, int height, ListBase *clamped_edges) { VoronoiEdge *edge; |