Minor fix for timer and experimental Canvas.Pixels support.

git-svn-id: trunk@10105 -
This commit is contained in:
sekelsenmat 2006-10-25 18:47:15 +00:00
parent 37fa71c7aa
commit 6913093d07
2 changed files with 18 additions and 2 deletions

View File

@ -130,8 +130,23 @@ begin
end;
function TQtWidgetSet.DCGetPixel(CanvasHandle: HDC; X, Y: integer): TGraphicsColor;
{var
Color: QColorH;}
begin
Result:=clNone;
Result := clNone;
if not IsValidDC(CanvasHandle) then Exit;
if (TQtDeviceContext(CanvasHandle).vImage <> nil) then
begin
Result := TColor(QImage_pixel(TQtDeviceContext(CanvasHandle).vImage, X, Y));
{ Color := QColor_create(QImage_pixel(TQtDeviceContext(CanvasHandle).vImage, X, Y));
Result := RGBToColor(QColor_red(Color), QColor_green(Color), QColor_blue(Color));
QColor_destroy(Color);}
end;
end;
procedure TQtWidgetSet.DCSetPixel(CanvasHandle: HDC; X, Y: integer; AColor: TGraphicsColor);

View File

@ -1464,7 +1464,8 @@ begin
if QEvent_type(Event) = QEventTimer then
begin
QEvent_accept(Event);
CallbackFunc;
if Assigned(CallbackFunc) then CallbackFunc;
end;
end;