mirror of
https://gitlab.com/freepascal.org/lazarus/lazarus.git
synced 2025-08-12 22:19:18 +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;
|
end;
|
||||||
|
|
||||||
function TQtWidgetSet.DCGetPixel(CanvasHandle: HDC; X, Y: integer): TGraphicsColor;
|
function TQtWidgetSet.DCGetPixel(CanvasHandle: HDC; X, Y: integer): TGraphicsColor;
|
||||||
|
{var
|
||||||
|
Color: QColorH;}
|
||||||
begin
|
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;
|
end;
|
||||||
|
|
||||||
procedure TQtWidgetSet.DCSetPixel(CanvasHandle: HDC; X, Y: integer; AColor: TGraphicsColor);
|
procedure TQtWidgetSet.DCSetPixel(CanvasHandle: HDC; X, Y: integer; AColor: TGraphicsColor);
|
||||||
|
@ -1464,7 +1464,8 @@ begin
|
|||||||
if QEvent_type(Event) = QEventTimer then
|
if QEvent_type(Event) = QEventTimer then
|
||||||
begin
|
begin
|
||||||
QEvent_accept(Event);
|
QEvent_accept(Event);
|
||||||
CallbackFunc;
|
|
||||||
|
if Assigned(CallbackFunc) then CallbackFunc;
|
||||||
end;
|
end;
|
||||||
end;
|
end;
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user