mirror of
https://gitlab.com/freepascal.org/lazarus/lazarus.git
synced 2025-08-27 13:00:17 +02:00
Qt: Added GetPixelsPerInch() into qtproc.
git-svn-id: trunk@12274 -
This commit is contained in:
parent
a05aa657e8
commit
58e28c5a9d
@ -38,6 +38,7 @@ uses
|
||||
GraphType;
|
||||
|
||||
procedure FillStandardDescription(var Desc: TRawImageDescription);
|
||||
function GetPixelsPerInch: Integer;
|
||||
function GetUtf8String(S: String): WideString;
|
||||
|
||||
implementation
|
||||
@ -90,4 +91,17 @@ begin
|
||||
Result := S;
|
||||
end;
|
||||
|
||||
{------------------------------------------------------------------------------
|
||||
Function: GetPixelsPerInch
|
||||
Params: none
|
||||
Returns: pixels per inch value eg. 96
|
||||
------------------------------------------------------------------------------}
|
||||
function GetPixelsPerInch: Integer;
|
||||
var
|
||||
QtDC: QPaintDeviceH;
|
||||
begin
|
||||
QtDC := QWidget_to_QPaintDevice(QApplication_desktop);
|
||||
Result := QPaintDevice_logicalDpiY(QtDC);
|
||||
end;
|
||||
|
||||
end.
|
||||
|
Loading…
Reference in New Issue
Block a user