ベクトルの変形
QPainterPath の要素を操作する方法を示す.
レンズの形をしたベクトル変形フィールドを定義し、これをパス内のすべての点に適用する。つまり、画面にレンダリングされるのはピクセル操作ではなく、グリフそのものの修正されたベクトル表現である。これは、変形されたグリフのアンチエイリアスされたエッジの質の高さからわかる。
かなり複雑なパスを得るために、ユーザがテキストを入力し、そのテキストをパスに変換できるようにしています。これはQPainterPath::addText() 関数を使って行われます。
レンズはQPainter::drawEllipse() を 1 回呼び出すだけで描画され、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.