벡터 변형
QPainterPath 의 요소를 조작하는 방법을 보여줍니다.
렌즈 모양의 벡터 변형 필드를 정의하고 이를 경로의 모든 지점에 적용합니다. 즉, 화면에 렌더링되는 것은 픽셀 조작이 아니라 글리프 자체의 수정된 벡터 표현입니다. 이는 변형된 글리프에 대한 앤티앨리어싱 가장자리의 높은 품질에서 확인할 수 있습니다.
상당히 복잡한 경로를 얻기 위해 사용자가 텍스트를 입력하고 텍스트를 경로로 변환할 수 있도록 했습니다. 이 작업은 QPainterPath::addText() 함수를 사용하여 수행됩니다.
렌즈는 QPainter::drawEllipse() 호출 한 번으로 그려지며, QRadialGradient 을 사용하여 특수한 색상 테이블로 채워 태양의 반사 효과와 그림자 효과를 줍니다. 렌즈는 더 나은 성능을 위해 픽셀맵으로 캐시됩니다.
© 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.