C++Builder Programming Forum
C++Builder  |  Delphi  |  FireMonkey  |  C/C++  |  Free Pascal  |  Firebird
볼랜드포럼 BorlandForum
 경고! 게시물 작성자의 사전 허락없는 메일주소 추출행위 절대 금지
C++빌더 포럼
Q & A
FAQ
팁&트릭
강좌/문서
자료실
컴포넌트/라이브러리
메신저 프로젝트
볼랜드포럼 홈
헤드라인 뉴스
IT 뉴스
공지사항
자유게시판
해피 브레이크
공동 프로젝트
구인/구직
회원 장터
건의사항
운영진 게시판
회원 메뉴
북마크
볼랜드포럼 광고 모집

C++빌더 Q&A
C++Builder Programming Q&A
[38407] Re:[질문]Canvas에 관한 질문 입니다.
만복대.산수유 [origin] 886 읽음    2004-12-15 22:00
speed 님이 쓰신 글 :
: Canvas의
: Canvas->Polyline( ),  Canvas->Polygon( )
: 위의 두메소드 차이점이 뭔가요?
:
: 테스트 해보니 기능상 똑같은 것 같은데...
:
: 아시는 분  좀 알려주세요...

빌더의 도움말에 따르면 아래와 같습니다.
Polygon:
1. 첫번째 점에서 두번째 점으로 선을 그리는 등 마지막 점까지 선을 그린 다음
2. 마지막 점에서 첫번째 점 사이에 선을 그립니다.
3. 선들로 둘러싸인 내부를 현재의 Brush로 칠합니다.

Polyline:
1. 첫번째 점에서 두번째 점으로 선을 그리는 등 마지막 점까지 선을 그립니다.
결국 Polyline으로 Polygon의 효과를 내려면 Polyline의 Points 인수의 마지막 점에 첫번째 점을 다시 지정해주어야 하고 별도로 내부를 칠해주어야 합니다.


TCanvas::Polygon

Draws a series of lines on the canvas connecting the points passed in and closing the shape by drawing a line from the last point to the first point.

void __fastcall Polygon(const TPoint * Points, const int Points_Size);

Description

Use Polygon to draw a closed, many-sided shape on the canvas, using the value of Pen. After drawing the complete shape, Polygon fills the shape using the value of Brush.

The Points parameter is an array of points that give the vertices of the polygon.

The Points_Size parameter is the index of the last point in the array (one less than the total number of points).

The first point is always connected to the last point.

To draw a polygon on the canvas, without filling it, use the Polyline method, specifying the first point a second time at the end.

+ -

관련 글 리스트
38404 [질문]Canvas에 관한 질문 입니다. speed 783 2004/12/15
38407     Re:[질문]Canvas에 관한 질문 입니다. 만복대.산수유 886 2004/12/15
Google
Copyright © 1999-2015, borlandforum.com. All right reserved.