Ignore:
Timestamp:
Feb 23, 2013, 6:10:29 PM (12 years ago)
Author:
chronos
Message:
  • Upraveno: Generování obrázku meteostanice
File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/temp/meteo/load_meteo.php

    r488 r489  
    7777    $Image->Line(0, 16, $Width - 1, 16);
    7878    $Image->Font->Color = COLOR_BLACK;
    79     $Image->TextOut(($Width - $Image->TextWidth($this->Name)) / 2, 13, $this->Name);
     79    $Text = 'Meteo '.$this->Name;
     80    $Image->TextOut(($Width - $Image->TextWidth($Text)) / 2, 13, $Text);
    8081    $Image->Font->Size = 30;
    8182    $Text = $this->Data['Temperature'].'°C';
     
    9091    $Text = 'Vítr: '.$this->Data['WindSpeed'].' m/s';
    9192    $Image->TextOut(($Width - $Image->TextWidth($Text)) / 2, $Height - 22, $Text);
    92     $Text = date("d.m.Y H:i:s", $this->Data['Time']);
     93    $Text = date("d.n.Y H:i:s", $this->Data['Time']);
    9394    $Image->TextOut(($Width - $Image->TextWidth($Text)) / 2, $Height - 6, $Text);
    9495    $Image->SaveToFile($FileName);
     
    109110$Meteo->Name = 'Koliba Zděchov';
    110111//$Meteo->LoadTestData();
    111 $Meteo->DownloadData();
    112 $Meteo->CreateImage('koliba.png');
     112while(1)
     113{
     114  $Meteo->DownloadData();
     115  $Meteo->CreateImage('koliba.png');
     116  sleep(10);
     117}
    113118
    114119?>
Note: See TracChangeset for help on using the changeset viewer.