Subversion Repositories eFlore/Projets.eflore-projets

Rev

Rev 763 | Rev 808 | Go to most recent revision | Show entire file | Ignore whitespace | Details | Blame | Last modification | View Log | RSS feed

Rev 763 Rev 797
Line 66... Line 66...
66
		$this->config = $conteneur->getParametre('Graphiques');
66
		$this->config = $conteneur->getParametre('Graphiques');
67
		$this->convertisseur = $this->config['convertisseur'];
67
		$this->convertisseur = $this->config['convertisseur'];
68
		$this->graduations_id = $this->getParametreTableau('graduations_id');
68
		$this->graduations_id = $this->getParametreTableau('graduations_id');
69
		$this->champs_ontologiques = $this->getParametreTableau('champs_ontologiques');
69
		$this->champs_ontologiques = $this->getParametreTableau('champs_ontologiques');
70
		$this->cheminGraphBase = $this->config['chemin'];
70
		$this->cheminGraphBase = $this->config['chemin'];
71
		$cacheOptions = array('mise_en_cache' => $this->config['cache']['miseEnCache'],
71
		$cacheOptions = array('mise_en_cache' => $this->config['cache_miseEnCache'],
72
								'stockage_chemin' => $this->config['cache']['stockageChemin'],
72
								'stockage_chemin' => $this->config['cache_stockageChemin'],
73
								'duree_de_vie' => $this->config['cache']['dureeDeVie']);
73
								'duree_de_vie' => $this->config['cache_dureeDeVie']);
74
		$this->cache = $conteneur->getCacheSimple($cacheOptions);
74
		$this->cache = $conteneur->getCacheSimple($cacheOptions);
75
		$this->definirVersion();
75
		$this->definirVersion();
76
		$this->definirFormat();
76
		$this->definirFormat();
77
		$this->definirTable($this->version);
77
		$this->definirTable($this->version);
78
	}
78
	}
Line 371... Line 371...
371
		return $png;
371
		return $png;
372
	}
372
	}
Line 373... Line 373...
373
	
373
	
374
	public function convertirEnPNGAvecRsvg($svg) {
374
	public function convertirEnPNGAvecRsvg($svg) {
375
		$idFichier = $this->getIdFichier();
375
		$idFichier = $this->getIdFichier();
376
		$fichierPng = $this->config['cache']['stockageChemin']."".$idFichier.'.png';
376
		$fichierPng = $this->config['cache_stockageChemin']."".$idFichier.'.png';
377
		$fichierSvg = $this->config['cache']['stockageChemin']."".$idFichier.'.svg';
377
		$fichierSvg = $this->config['cache_stockageChemin']."".$idFichier.'.svg';
378
		file_put_contents($fichierSvg, $svg);
378
		file_put_contents($fichierSvg, $svg);
379
		$commande = "rsvg-convert  $fichierSvg -w ".$this->largeurSVG ." -h ".$this->hauteurSVG ." -o $fichierPng";
379
		$commande = "rsvg-convert  $fichierSvg -w ".$this->largeurSVG ." -h ".$this->hauteurSVG ." -o $fichierPng";
380
		//echo $commande; exit;
380
		//echo $commande; exit;
381
		$rsvg = exec($commande);
381
		$rsvg = exec($commande);