Changeset View
Changeset View
Standalone View
Standalone View
source/blender/blenkernel/intern/paint.c
| Show First 20 Lines • Show All 874 Lines • ▼ Show 20 Lines | if (lumi1 < lumi2) { | ||||
| return 1; | return 1; | ||||
| } | } | ||||
| return 0; | return 0; | ||||
| } | } | ||||
| void BKE_palette_sort_hsv(tPaletteColorHSV *color_array, const int totcol) | void BKE_palette_sort_hsv(tPaletteColorHSV *color_array, const int totcol) | ||||
| { | { | ||||
| /* Sort by Hue , Saturation and Value. */ | /* Sort by Hue, Saturation and Value. */ | ||||
| qsort(color_array, totcol, sizeof(tPaletteColorHSV), palettecolor_compare_hsv); | qsort(color_array, totcol, sizeof(tPaletteColorHSV), palettecolor_compare_hsv); | ||||
| } | } | ||||
| void BKE_palette_sort_svh(tPaletteColorHSV *color_array, const int totcol) | void BKE_palette_sort_svh(tPaletteColorHSV *color_array, const int totcol) | ||||
| { | { | ||||
| /* Sort by Saturation, Value and Hue. */ | /* Sort by Saturation, Value and Hue. */ | ||||
| qsort(color_array, totcol, sizeof(tPaletteColorHSV), palettecolor_compare_svh); | qsort(color_array, totcol, sizeof(tPaletteColorHSV), palettecolor_compare_svh); | ||||
| } | } | ||||
| ▲ Show 20 Lines • Show All 1,372 Lines • Show Last 20 Lines | |||||