Example #1
0
 static function createImageFleche($windRosaceImg, $spot)
 {
     $cercleColor = imagecolorallocate($windRosaceImg, 103, 113, 121);
     // Cercle
     imageellipse($windRosaceImg, LargeurImg / 2, HauteurImg / 2, 2 * RayonCercle, 2 * RayonCercle, $cercleColor);
     //on créé un cercle
     $listOrientation = $spot->getWindOrientation();
     $moveArray = RosaceWindManage::getMoveArray();
     $colorArray = RosaceWindManage::getColorArray($windRosaceImg);
     foreach ($listOrientation as $orientation) {
         try {
             $points = $moveArray[$orientation->getOrientation()]['points'];
             $angle = $orientation->getOrientationDeg();
             $couleur = $colorArray[$orientation->getState()];
             imagefilledpolygon($windRosaceImg, RosaceWindManage::translate_poly($points, $angle, LargeurImg / 2, HauteurImg / 2, 0, 0), 8, $couleur);
         } catch (\Exception $e) {
         }
     }
 }