mirror of
https://github.com/agdsn/ancient-weatherstation.git
synced 2026-06-19 23:07:59 +00:00
chart:
Fixed: color options Fixed: max y-Label git-svn-id: file:///home/jan/tmp/wetterstation/trunk@105 dd492736-c11a-0410-ad51-8c26713eaf7f
This commit is contained in:
@@ -133,8 +133,8 @@ static int read_color(const char *line, void *arg){
|
||||
if (strchr(line, ':') != NULL){ /* und min. 1 : vorkommt */
|
||||
tmp = malloc(sizeof(img_color_t)); /* Neues Farbelement allocieren */
|
||||
tmp->r = strtol(strncpy(buff, line, 2), NULL, 16); /* r */
|
||||
tmp->b = strtol(strncpy(buff, line+3, 2), NULL, 16); /* b */
|
||||
tmp->g = strtol(strncpy(buff, line+6, 2), NULL, 16); /* g */
|
||||
tmp->g = strtol(strncpy(buff, line+3, 2), NULL, 16); /* g */
|
||||
tmp->b = strtol(strncpy(buff, line+6, 2), NULL, 16); /* b */
|
||||
tmp->alpha = strtol(strncpy(buff, line+9, 2), NULL, 16); /* alpha */
|
||||
|
||||
DEBUGOUT5(" Farbe gelesen: rot:%2x gelb:%2x gruen:%2x mit alpha:%2x\n", tmp->r, tmp->b, tmp->g, tmp->alpha) ;
|
||||
|
||||
@@ -116,6 +116,13 @@ label_list_ptr get_y_label_list(int c_hight, int padding){
|
||||
temp++;
|
||||
}
|
||||
|
||||
/* Bugfix: manchmal wird das obeste Label nicht angezeigt,
|
||||
* daher den Zaehler um eins erhöhen und wenn dabei ueber
|
||||
* den Bereich hinaus, dann wieder eins runter */
|
||||
num++;
|
||||
if (((temp + (num - 1)) * interval) > (real_max - 1))
|
||||
num--;
|
||||
|
||||
/* Puffer fuer die Labels */
|
||||
buff = malloc(sizeof(char)*BUFFSIZE);
|
||||
|
||||
|
||||
Reference in New Issue
Block a user