1
0
mirror of https://github.com/agdsn/ancient-weatherstation.git synced 2026-06-19 23:07:59 +00:00
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:
losinshi
2006-09-18 09:36:53 +00:00
parent 3ed6936371
commit ae2a7c106e
4 changed files with 30 additions and 23 deletions
+2 -2
View File
@@ -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) ;
+7
View File
@@ -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);