合成モード

QPainter における合成モードの動作を解説します。

画像レイヤーに合成モードを適用するアプリケーション

最も一般的な合成モードは、「Source」と「SourceOver」の2つです。「Source」は、不透明なオブジェクトをペイントデバイス上に描画するために使用されます。このモードでは、ソースの各ピクセルが、宛先の対応するピクセルを置き換えます。「SourceOver」合成モードでは、ソースオブジェクトは透明であり、宛先オブジェクトの上に重ねて描画されます。

これらの標準モードに加え、QtではT. PorterおよびT. Duffによって定義された合成モードの完全なセットを定義しています。詳細については、QPainter のドキュメントを参照してください。

サンプルプロジェクト @ code.qt.io

© 2026 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.