PaintContext Struct

struct QAbstractTextDocumentLayout::PaintContext

QAbstractTextDocumentLayout::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

この変数は、このペイントコンテキストをQAbstractTextDocumentLayoutdraw() 関数に渡すときにレンダリングされる選択項目のコレクションを保持します。

デフォルト値は空リストです。

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