라이브러리
[PHP] ImagickPixel::clear - 이 객체와 관련된 리소스를 지웁니다.
ImagickPixel::clear
ImagickPixel::clear 메소드는 ImagickPixel 객체의 값을 초기화합니다. 초기화된 값은 ImagickPixel::getColorValue() 메소드에 의해 반환됩니다.
사용 예제
#hostingforum.kr
php
<?php
// ImagickPixel 객체를 생성합니다.
$pixel = new ImagickPixel('rgb(255, 0, 0)');
// 초기화된 값을 확인합니다.
echo "초기화 전 색상: " . $pixel->getColorValue(Imagick::COLOR_RED) . "
";
// clear 메소드를 호출하여 초기화합니다.
$pixel->clear();
// 초기화된 값을 확인합니다.
echo "초기화 후 색상: " . $pixel->getColorValue(Imagick::COLOR_RED) . "
";
?>
결과
#hostingforum.kr
초기화 전 색상: 255
초기화 후 색상: 0
설명
ImagickPixel::clear 메소드는 ImagickPixel 객체의 값을 초기화합니다. 초기화된 값은 ImagickPixel::getColorValue() 메소드에 의해 반환됩니다. 초기화된 값은 0이 됩니다.
참고
ImagickPixel::clear 메소드는 ImagickPixel 객체의 값을 초기화합니다. 초기화된 값은 ImagickPixel::getColorValue() 메소드에 의해 반환됩니다. 초기화된 값은 0이 됩니다.
예제 코드
#hostingforum.kr
php
<?php
// ImagickPixel 객체를 생성합니다.
$pixel = new ImagickPixel('rgb(255, 0, 0)');
// 초기화된 값을 확인합니다.
echo "초기화 전 색상: " . $pixel->getColorValue(Imagick::COLOR_RED) . "
";
// clear 메소드를 호출하여 초기화합니다.
$pixel->clear();
// 초기화된 값을 확인합니다.
echo "초기화 후 색상: " . $pixel->getColorValue(Imagick::COLOR_RED) . "
";
// clear 메소드를 호출하여 초기화합니다.
$pixel->clear();
// 초기화된 값을 확인합니다.
echo "초기화 후 색상: " . $pixel->getColorValue(Imagick::COLOR_RED) . "
";
?>
결과
#hostingforum.kr
초기화 전 색상: 255
초기화 후 색상: 0
초기화 후 색상: 0
설명
ImagickPixel::clear 메소드는 ImagickPixel 객체의 값을 초기화합니다. 초기화된 값은 ImagickPixel::getColorValue() 메소드에 의해 반환됩니다. 초기화된 값은 0이 됩니다. clear 메소드를 호출하여 초기화한 후, 초기화된 값을 확인할 수 있습니다.
-
- 나우호스팅 @pcs8404
-
호스팅포럼 화이팅!
댓글목록
등록된 댓글이 없습니다.