PaintContext Struct
struct QAbstractTextDocumentLayout::PaintContextQAbstractTextDocumentLayout::PaintContext 클래스는 문서 레이아웃을 칠할 때 사용되는 매개변수를 정의하는 편의 클래스입니다. 더 보기...
공용 변수
QRectF | clip |
int | cursorPosition |
QPalette | palette |
QList<QAbstractTextDocumentLayout::Selection> | selections |
상세 설명
페인트 컨텍스트는 QAbstractTextDocumentLayout::draw() 함수를 사용하여 QTextDocuments의 사용자 정의 레이아웃을 렌더링할 때 사용됩니다. cursor position , default text color, clip 직사각형과 selections 컬렉션으로 지정됩니다.
QAbstractTextDocumentLayout도 참조하십시오 .
멤버 변수 문서
QRectF PaintContext::clip
이 변수는 페인팅이 필요한 단락, 프레임 또는 텍스트 주변 영역을 지정하는 레이아웃에 대한 힌트를 담고 있습니다.
이 사각형 바깥쪽은 모두 칠할 필요가 없습니다.
클립 사각형을 지정하면 큰 문서의 그리기 속도를 크게 높일 수 있습니다. 클립 사각형은 뷰포트 좌표가 아닌 문서 좌표에 있다는 점에 유의하세요. 이는 페인터에 설정된 클립 영역을 대체하는 것이 아니라 단지 힌트일 뿐입니다.
기본값은 모든 것을 그려야 함을 나타내는 널 사각형입니다.
int PaintContext::cursorPosition
이 변수는 문서 내에서 커서 선이 그려져야 하는 위치를 저장합니다.
기본값은 -1입니다.
QPalette PaintContext::palette
이 변수는 색상을 지정하지 않은 경우 텍스트에 사용되는 기본 색상을 저장합니다.
기본값은 애플리케이션의 기본 팔레트입니다.
QList<QAbstractTextDocumentLayout::Selection> PaintContext::selections
이 변수는 이 페인트 컨텍스트를 QAbstractTextDocumentLayout 의 draw() 함수에 전달할 때 렌더링될 선택 항목의 컬렉션을 보유합니다.
기본값은 선택 항목이 없음을 나타내는 빈 목록입니다.
© 2025 The Qt Company Ltd. Documentation contributions included herein are the copyrights of their respective owners. The documentation provided herein is licensed under the terms of the GNU Free Documentation License version 1.3 as published by the Free Software Foundation. Qt and respective logos are trademarks of The Qt Company Ltd. in Finland and/or other countries worldwide. All other trademarks are property of their respective owners.