이미지 처리 및 GD imagestringup

(PHP 4, PHP 5, PHP 7, PHP 8)

imagestringup — 문자열을 세로로 그리기


설명

imagestringup(
    GdImage $image,
    GdFont|int $font,
    int $x,
    int $y,
    string $string,
    int $color
): bool
                

주어진 좌표에 수직으로 string을 그립니다.


매개변수

image
imagecreatetruecolor()와 같은 이미지 생성 함수 중 하나에서 반환되는 GdImage 객체.
font
latin2 인코딩(여기서 더 높은 숫자는 더 큰 글꼴에 해당) 또는 imageloadfont()에 의해 반환된 GdFont 인스턴스의 내장 글꼴의 경우 1, 2, 3, 4, 5가 될 수 있습니다.
x
왼쪽 하단 모서리의 x 좌표입니다.
y
왼쪽 하단 모서리의 y 좌표입니다.
string
쓸 문자열입니다.
color
imagecolorallocate()로 생성된 색상 식별자입니다.

반환 값

성공하면 true를, 실패하면 false를 반환합니다.


변경 로그

버전 설명
8.1.0 font 매개변수는 이제 GdFont 인스턴스와 int를 모두 허용합니다. 이전에는 int만 허용되었습니다.
8.0.0 image는 이제 GdImage 인스턴스를 반환합니다. 이전에는 리소스가 필요했습니다.

Examples

예제 #1 imagestringup() 예제

                  
<?php
// create a 100*100 image
$im = imagecreatetruecolor(100, 100);

// Write the text
$textcolor = imagecolorallocate($im, 0xFF, 0xFF, 0xFF);
imagestringup($im, 3, 40, 80, 'gd library', $textcolor);

// Save the image
imagepng($im, './stringup.png');
imagedestroy($im);
?>
                  
                

위의 예는 다음과 유사한 결과를 출력합니다.

function imagestringup


기타