From 6e2c29aec1afb884fb6460a4ec1b3a4aea9f594a Mon Sep 17 00:00:00 2001 From: Edmar Moretti Date: Sun, 4 Mar 2018 13:53:15 -0300 Subject: [PATCH] Inclusão da opção outlinecolor na escolha de parâmetros para o mapa de referência --- ferramentas/imprimir/aggpng.php | 4 +++- ferramentas/imprimir/geotif.php | 4 +++- ferramentas/imprimir/jpeg.php | 4 +++- ferramentas/opcoes_maparef/dicionario.js | 18 ++++-------------- ferramentas/opcoes_maparef/exec.php | 5 ++++- ferramentas/opcoes_maparef/index.js | 1 + ferramentas/opcoes_maparef/template_mst.html | 9 ++------- 7 files changed, 20 insertions(+), 25 deletions(-) diff --git a/ferramentas/imprimir/aggpng.php b/ferramentas/imprimir/aggpng.php index 2f7df50..32e26af 100755 --- a/ferramentas/imprimir/aggpng.php +++ b/ferramentas/imprimir/aggpng.php @@ -136,7 +136,9 @@ $imgo->saveImage($nomer); $nomeescala = strtolower($protocolo[0])."://".$_SERVER['HTTP_HOST'].($imgo->imageurl).basename($nomer); //referencia $o = $map->reference->outlinecolor; -$o->setrgb(255,0,0); +if($o->red == -1){ + $o->setrgb(255,0,0); +} $map->preparequery(); $imgo = $map->drawreferencemap(); $nomer = ($imgo->imagepath)."ref".$nomes.".png"; diff --git a/ferramentas/imprimir/geotif.php b/ferramentas/imprimir/geotif.php index 58a5f51..ecdfaaf 100755 --- a/ferramentas/imprimir/geotif.php +++ b/ferramentas/imprimir/geotif.php @@ -131,7 +131,9 @@ $imgo->saveImage($nomer); $nomeescala = strtolower($protocolo[0])."://".$_SERVER['HTTP_HOST'].($imgo->imageurl).basename($nomer); //referência $o = $map->reference->outlinecolor; -$o->setrgb(255,0,0); +if($o->red == -1){ + $o->setrgb(255,0,0); +} $map->preparequery(); $imgo = $map->drawreferencemap(); $nomer = ($imgo->imagepath)."ref".$nomes.".tif"; diff --git a/ferramentas/imprimir/jpeg.php b/ferramentas/imprimir/jpeg.php index 582c34f..cf50288 100755 --- a/ferramentas/imprimir/jpeg.php +++ b/ferramentas/imprimir/jpeg.php @@ -134,7 +134,9 @@ $imgo->saveImage($nomer); $nomeescala = strtolower($protocolo[0])."://".$_SERVER['HTTP_HOST'].($imgo->imageurl).basename($nomer); //referência $o = $map->reference->outlinecolor; -$o->setrgb(255,0,0); +if($o->red == -1){ + $o->setrgb(255,0,0); +} $map->preparequery(); $imgo = $map->drawreferencemap(); $nomer = ($imgo->imagepath)."ref".$nomes.".jpg"; diff --git a/ferramentas/opcoes_maparef/dicionario.js b/ferramentas/opcoes_maparef/dicionario.js index 5525286..bcd1ec2 100644 --- a/ferramentas/opcoes_maparef/dicionario.js +++ b/ferramentas/opcoes_maparef/dicionario.js @@ -1,19 +1,9 @@ //+$trad(1,i3GEOF.opcoesTamanho.dicionario)+ i3GEOF.opcoesMaparef.dicionario = { - 'largura' : [ { - pt : "Largura", - en : "Width", - es : "Ancho" - } ], - 'altura' : [ { - pt : "Altura", - en : "Height", - es : "Altura" - } ], - 'valor' : [ { - pt : "Valores em pixels", - en : "Values in pixels", - es : "Valores en píxeles" + 'outlinecolor' : [ { + pt : "Cor do contorno", + en : "", + es : "" } ], 'testa' : [ { pt : "Testar", diff --git a/ferramentas/opcoes_maparef/exec.php b/ferramentas/opcoes_maparef/exec.php index 8c4c657..cbc5abb 100644 --- a/ferramentas/opcoes_maparef/exec.php +++ b/ferramentas/opcoes_maparef/exec.php @@ -11,7 +11,10 @@ switch (strtoupper($funcao)) copiaSeguranca($map_file); $map = ms_newMapObj($map_file); $r = $map->reference; - $r->updateFromString("REFERENCE SIZE " . $_POST["width"] . " " . $_POST["height"] . " END"); + //$r->updateFromString("REFERENCE SIZE " . $_POST["width"] . " " . $_POST["height"] . " END"); + $ocor = explode(",",$_POST["outlinecolor"]); + $o = $r->outlinecolor; + $o->setrgb($ocor[0],$ocor[1],$ocor[2]); $salvo = $map->save($map_file); $retorno = "ok"; $_SESSION["contadorsalva"]++; diff --git a/ferramentas/opcoes_maparef/index.js b/ferramentas/opcoes_maparef/index.js index 6f9c58b..2aa698e 100644 --- a/ferramentas/opcoes_maparef/index.js +++ b/ferramentas/opcoes_maparef/index.js @@ -50,6 +50,7 @@ i3GEOF.opcoesMaparef = { var b,box; try{ $i(iddiv).innerHTML = i3GEOF.opcoesMaparef.html(); + i3GEO.util.aplicaAquarela('form-opcoesMaparef'); i3GEO.janela.tempoMsg($trad('msg',i3GEOF.opcoesMaparef.dicionario)); } catch(erro){i3GEO.janela.tempoMsg(erro);} diff --git a/ferramentas/opcoes_maparef/template_mst.html b/ferramentas/opcoes_maparef/template_mst.html index 0bb0c35..ededbe6 100644 --- a/ferramentas/opcoes_maparef/template_mst.html +++ b/ferramentas/opcoes_maparef/template_mst.html @@ -1,14 +1,9 @@
- - + +
-
- - -
-
{{{valor}}}
\ No newline at end of file -- libgit2 0.21.2