/*
- * Copyright (C) 2009-2010 Andy Spencer <andy753421@gmail.com>
+ * Copyright (C) 2009-2011 Andy Spencer <andy753421@gmail.com>
*
* This program is free software: you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
extern AWeatherColormap colormaps[];
+static inline guint8 *colormap_get(AWeatherColormap *colormap, float value)
+{
+ int idx = value * colormap->scale + colormap->shift;
+ return colormap->data[CLAMP(idx, 0, colormap->len)];
+}
+
#endif