텍스트가 "텍스트 정렬 오른쪽"으로 지정하고 싶습니다.PHP : imagettftext 텍스트 정렬 (RTL)
$url = "#";
$input = @file_get_contents($url) or die('Fehler!');
if(preg_match_all('~<span class="a">\s*(.*?)\s*</span>~si', $input, $item_name));
$image = imagecreatefrompng("bg.png");
imagesavealpha($image, true);
imagealphablending($image, true);
$finalImage = imagecreatetruecolor(800,200);
$font = '../arial.ttf';
$color = imagecolorallocate($finalImage, 0, 0, 0);
$color_time = imagecolorallocate($finalImage, 100, 100, 100);
imagettftext($image, 10, 0, 23, 15, $color, $font, $item_name[1][0]);
imagettftext($image, 10, 0, 22, 33, $color, $font, $item_name[1][1]);
imagettftext($image, 10, 0, 22, 51, $color, $font, $item_name[1][2]);
imagettftext($image, 10, 0, 22, 69, $color, $font, $item_name[1][3]);
imagettftext($image, 10, 0, 22, 87, $color, $font, $item_name[1][4]);
imagettftext($image, 10, 0, 22, 105, $color, $font, $item_name[1][5]);
imagettftext($image, 10, 0, 22, 123, $color, $font, $item_name[1][6]);
imagettftext($image, 10, 0, 22, 141, $color, $font, $item_name[1][7]);
imagettftext($image, 10, 0, 22, 159, $color, $font, $item_name[1][8]);
imagettftext($image, 10, 0, 22, 177, $color, $font, $item_name[1][9]);
imagettftext($image, 10, 0, 22, 195, $color, $font, $item_name[1][10]);
header('Content-type: image/png');
imagepng($image);
알고 계십니까? 나는 그것을 얻지 않기 때문에. 나는 이미 많은 구글. 너희들은 내가 PHP에 진짜로 들어 있지 않다는 것을 알아야한다. 왜 내가 도움이 필요한지. 질문이 있으시면 문의하십시오! FUNC의
은 당신이 그것을 말해 텍스트를두고 하나님. "왼쪽 정렬"또는 "오른쪽 맞춤"이 없습니다. 직접 구현해야합니다. http://php.net/manual/en/function.imagettfbbox.php –
@MarcB ok, 어떻게? – ZarneXxX
링크를 읽으십시오. 주어진 도구를 사용하는 방법을 배우십시오. "find 함수'do_exactly_what_I_need()'"의 사고 방식에서 빠져 나와'use(); simple_tools(); 제공된(); 달성하기 위해(); 복잡한 _things(); ' –