Recent

Author Topic: [CLOSED] Question regarding clipping  (Read 1787 times)

lagprogramming

  • Sr. Member
  • ****
  • Posts: 407
[CLOSED] Question regarding clipping
« on: July 28, 2023, 09:53:23 am »
Code: Pascal  [Select][+][-]
  1. function TQtWidgetSet.RectVisible(dc : hdc; const ARect: TRect) : Boolean;
  2. var
  3.   QtDC: TQtDeviceContext;
  4. begin
  5.   {$ifdef VerboseQtWinAPI}
  6.   writeln('[WinAPI RectVisible] ');
  7.   {$endif}
  8.   Result := False;
  9.   if not IsValidDC(DC) then Exit;
  10.   QtDC := TQtDeviceContext(DC);
  11.   // as MSDN says only clipping region can play here
  12.   if QtDC.getClipping then
  13.     Result := QtDC.getClipRegion.containsRect(ARect);
  14. end;

Should RectVisible return true only when QtDC.getClipping is true?
« Last Edit: July 28, 2023, 02:21:21 pm by lagprogramming »

zeljko

  • Hero Member
  • *****
  • Posts: 1719
    • http://wiki.lazarus.freepascal.org/User:Zeljan
Re: Question regarding clipping
« Reply #1 on: July 28, 2023, 09:56:09 am »
Yes

 

TinyPortal © 2005-2018