mirror of
https://gitlab.com/freepascal.org/lazarus/lazarus.git
synced 2025-04-23 01:39:31 +02:00
Minor fix for timer and experimental Canvas.Pixels support.
git-svn-id: trunk@10105 -
This commit is contained in:
parent
37fa71c7aa
commit
6913093d07
@ -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);
|
||||
|
@ -1464,7 +1464,8 @@ begin
|
||||
if QEvent_type(Event) = QEventTimer then
|
||||
begin
|
||||
QEvent_accept(Event);
|
||||
CallbackFunc;
|
||||
|
||||
if Assigned(CallbackFunc) then CallbackFunc;
|
||||
end;
|
||||
end;
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user