Qt: Added GetPixelsPerInch() into qtproc.

git-svn-id: trunk@12274 -
This commit is contained in:
zeljko 2007-10-01 14:29:29 +00:00
parent a05aa657e8
commit 58e28c5a9d

View File

@ -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.