Qt: added XOR caret composition mode.Supported only with >= Qt-4.5. Fixes #11599.

git-svn-id: trunk@20603 -
This commit is contained in:
zeljko 2009-06-12 15:39:24 +00:00
parent c21ef12e52
commit ab26d78008

View File

@ -311,7 +311,14 @@ begin
if IsValid and FVisible and FVisibleState then
begin
R := Rect(0, 0, QPixmap_width(FPixmap), QPixmap_height(FPixmap));
{$IFDEF USE_QT_45}
TQtDeviceContext(FWidget.Context).save;
TQtDeviceContext(FWidget.Context).setCompositionMode(QPainterRasterOp_NotSourceXorDestination);
TQtDeviceContext(FWidget.Context).drawPixmap(PQtPoint(@FPos), FPixmap, PRect(@R));
TQtDeviceContext(FWidget.Context).restore;
{$ELSE}
TQtDeviceContext(FWidget.Context).drawPixmap(PQtPoint(@FPos), FPixmap, PRect(@R));
{$ENDIF}
end;
end;