Lines Matching defs:slots
5282 struct nk_chart_slot slots[NK_CHART_MAX_SLOT];
24070 {struct nk_chart_slot *slot = &chart->slots[chart->slot++];
24111 struct nk_chart_slot *slot = &chart->slots[chart->slot++];
24144 step = g->w / (float)g->slots[slot].count;
24145 range = g->slots[slot].max - g->slots[slot].min;
24146 ratio = (value - g->slots[slot].min) / range;
24148 if (g->slots[slot].index == 0) {
24150 g->slots[slot].last.x = g->x;
24151 g->slots[slot].last.y = (g->y + g->h) - ratio * (float)g->h;
24153 bounds.x = g->slots[slot].last.x - 2;
24154 bounds.y = g->slots[slot].last.y - 2;
24157 color = g->slots[slot].color;
24159 NK_INBOX(i->mouse.pos.x,i->mouse.pos.y, g->slots[slot].last.x-3, g->slots[slot].last.y-3, 6, 6)){
24163 color = g->slots[slot].highlight;
24166 g->slots[slot].index += 1;
24171 color = g->slots[slot].color;
24172 cur.x = g->x + (float)(step * (float)g->slots[slot].index);
24174 nk_stroke_line(out, g->slots[slot].last.x, g->slots[slot].last.y, cur.x, cur.y, 1.0f, color);
24186 color = g->slots[slot].highlight;
24192 g->slots[slot].last.x = cur.x;
24193 g->slots[slot].last.y = cur.y;
24194 g->slots[slot].index += 1;
24211 if (chart->slots[slot].index >= chart->slots[slot].count)
24213 if (chart->slots[slot].count) {
24214 float padding = (float)(chart->slots[slot].count-1);
24215 item.w = (chart->w - padding) / (float)(chart->slots[slot].count);
24219 color = chart->slots[slot].color;;
24220 item.h = chart->h * NK_ABS((value/chart->slots[slot].range));
24222 ratio = (value + NK_ABS(chart->slots[slot].min)) / NK_ABS(chart->slots[slot].range);
24225 ratio = (value - chart->slots[slot].max) / chart->slots[slot].range;
24228 item.x = chart->x + ((float)chart->slots[slot].index * item.w);
24229 item.x = item.x + ((float)chart->slots[slot].index);
24237 color = chart->slots[slot].highlight;
24240 chart->slots[slot].index += 1;
24258 switch (win->layout->chart.slots[slot].type) {