Commit bb97597ad039b0fb656c9b07d0882633e4b843a1

Authored by Edmar Moretti
1 parent 35d4db39

--no commit message

Showing 1 changed file with 23 additions and 11 deletions   Show diff stats
classesphp/classe_temas.php
... ... @@ -1163,11 +1163,13 @@ function: adicionaLabel
1163 1163 Adiciona LABEL em uma classe de um tema
1164 1164 */
1165 1165 function adicionaLabel($novac,$wrap,$fonte,$tamanho,$angulo,$fundo,$sombra,$cor,$outlinecolor,$shadowcolor,$shadowsizex,$shadowsizey,$force,$mindistance,$minfeaturesize,$offsetx,$offsety,$partials,$position,$texto=""){
1166   - while($novac->numlabels > 0){
1167   - $novac->removeLabel(0);
  1166 + if($this->vi >= 60300){
  1167 + while($novac->numlabels > 0){
  1168 + $novac->removeLabel(0);
  1169 + }
1168 1170 }
1169 1171 if($texto == ""){
1170   - if($this->vi >= 60200){
  1172 + if($this->vi >= 60300){
1171 1173 $indiceLabel = $novac->addLabel(new labelObj());
1172 1174 $label = $novac->getLabel($indiceLabel);
1173 1175 }
... ... @@ -1175,7 +1177,7 @@ Adiciona LABEL em uma classe de um tema
1175 1177 $label = $novac->label;
1176 1178 }
1177 1179 }
1178   - elseif ($novac->numlabels == 0){
  1180 + elseif ($this->vi >= 60300 && $novac->numlabels == 0){
1179 1181 if($wrap != ""){
1180 1182 $s = "CLASS LABEL WRAP '$wrap' TEXT '".$texto."' END END";
1181 1183 $novac->updateFromString($s);
... ... @@ -1185,8 +1187,8 @@ Adiciona LABEL em uma classe de um tema
1185 1187 $novac->updateFromString($s);
1186 1188 }
1187 1189 }
1188   -
1189   - if($this->vi >= 60200){
  1190 +
  1191 + if($this->vi >= 60300){
1190 1192 $label = $novac->getLabel(0);
1191 1193 }
1192 1194 else{
... ... @@ -1206,11 +1208,21 @@ Adiciona LABEL em uma classe de um tema
1206 1208 $label->set("type",MS_BITMAP);
1207 1209 //$label->set("font",$fonte);
1208 1210 $t = MS_TINY;
1209   - if ($tamanho > 5 ){$t = MS_TINY;}
1210   - if ($tamanho >= 7 ){$t = MS_SMALL;}
1211   - if ($tamanho >= 10 ){$t = MS_MEDIUM;}
1212   - if ($tamanho >= 12 ){$t = MS_LARGE;}
1213   - if ($tamanho >= 14 ){$t = MS_GIANT;}
  1211 + if ($tamanho > 5 ){
  1212 + $t = MS_TINY;
  1213 + }
  1214 + if ($tamanho >= 7 ){
  1215 + $t = MS_SMALL;
  1216 + }
  1217 + if ($tamanho >= 10 ){
  1218 + $t = MS_MEDIUM;
  1219 + }
  1220 + if ($tamanho >= 12 ){
  1221 + $t = MS_LARGE;
  1222 + }
  1223 + if ($tamanho >= 14 ){
  1224 + $t = MS_GIANT;
  1225 + }
1214 1226 $label->set("size",$t);
1215 1227 }
1216 1228 $label->set("angle",$angulo);
... ...