1

私は SVG の初心者で、何かを修正する必要があります。

私は、名前のすぐ下にある画像で円を生成するphpforループを持っています。各画像には四角形があります。四角形は円の周りに生成されます。

現在、画像は挿入されていますが表示されていないため、画像を四角形の中央に配置して名前を表示する必要があります。

for($i=0;$i<$count;$i++) {
    $x = ($x_inicial+($raio*cos(deg2rad($teta)))) ;
    $y = ($y_inicial+($raio*sin(deg2rad($teta)))) ;
    $string .= '<line x1="'.($x_inicial+($tam/2)).'" y1="'.($y_inicial+($tam/2)).'" x2="'.($x+($tam/2)).'" y2="'.($y+($tam/2)).'"  style="stroke:#045f89;stroke-width:3"/>
           <a xlink:href="'.URL.'empresa/perfil/'.$empresas[$i]['slug'].'" >
           <rect width="'.($tam*1.4).'px"  height="'.($tam*1.4).'px" x="'.$x.'" y="'.$y.'" style="stroke:gray;stroke-width:1;fill-opacity:0;stroke-opacity:1"/>
           <image nome="'.$empresas[$i]['nome'].'" x="'.$x.'" y="'.$y.'" width="'.$tam.'px" height="'.$tam.'px" xlink:href="'.URL.$empresas[$i]['foto'].'_thumb'.$empresas[$i]['extensao'].'" class="redondo" />
            '.$empresas[$i]['nome'].'</a>';
    $teta = $teta + $razao;
}
4

0 に答える 0