라이브러리

[PHP] UIDrawStroke::setThickness - 두께 설정




PHP에서 UIDrawStroke::setThickness

`UIDrawStroke::setThickness`는 PHP의 UIKit 모듈에서 사용하는 메서드로, 선의 두께를 설정하는 데 사용됩니다. 이 메서드는 `UIDrawStroke` 객체의 속성을 변경하는 데 사용됩니다.

UIDrawStroke::setThickness 사용법


`UIDrawStroke::setThickness` 메서드는 다음 형식으로 사용됩니다.

#hostingforum.kr
php

UIDrawStroke::setThickness($thickness)



* `$thickness`: 선의 두께를 나타내는 정수 값입니다. 두께는 1 이상의 정수 값이어야 합니다.

예제


다음 예제에서는 `UIDrawStroke::setThickness` 메서드를 사용하여 선의 두께를 설정하는 방법을 보여줍니다.

#hostingforum.kr
php

// UIDrawStroke 객체 생성

$stroke = new UIDrawStroke();



// 선의 두께를 5로 설정

$stroke->setThickness(5);



// 선을 그립니다.

$draw = new UIDraw();

$draw->setStroke($stroke);

$draw->setFillColor(null);

$draw->setBounds(10, 10, 100, 100);

$draw->draw();



이 예제에서는 `UIDrawStroke` 객체를 생성하고, 선의 두께를 5로 설정한 다음, 선을 그립니다.

참고


* `UIDrawStroke` 객체는 `UIDraw` 객체의 속성으로 사용됩니다.
* `UIDrawStroke` 객체의 속성을 변경하면 `UIDraw` 객체에 반영됩니다.
* 선의 두께는 1 이상의 정수 값이어야 합니다.

이러한 예제를 통해 `UIDrawStroke::setThickness` 메서드를 사용하여 선의 두께를 설정하는 방법을 이해할 수 있습니다.
  • profile_image
    나우호스팅 @pcs8404 

    호스팅포럼 화이팅!

    댓글목록

    등록된 댓글이 없습니다.

  • 전체 8,985건 / 58 페이지

검색

게시물 검색