{{newin (日本語)|[[11.0 (日本語)|11.0]]|110|type=関数}}
Gets the DPI scale factor of the window.

DPI スケールファクターは相対ピクセル密度を意味します。The pixel density inside the window might be greater (or smaller) than the "size" of the window. For example on a retina screen in Mac OS X with the <code>highdpi</code> [[love.window.setMode|window flag]] enabled, the window may take up the same physical size as an 800x600 window, but the area inside the window uses 1600x1200 pixels. <code>love.graphics.getDPIScale()</code> would return <code>2</code> in that case.

The [[love.window.fromPixels]] and [[love.window.toPixels]] functions can also be used to convert between units.

The <code>highdpi</code> window flag must be enabled to use the full pixel density of a Retina screen on Mac OS X and iOS. The flag currently does nothing on Windows and Linux, and on Android it is effectively always enabled.

== 関数 ==
=== 概要 ===
<source lang="lua">
scale = love.graphics.getDPIScale( )
</source>
=== 引数 ===
なし。
=== 返値 ===
{{param (日本語)|number|scale|The pixel scale factor associated with the window.}}

== 注釈 ==
The units of [[love.graphics.getWidth]], [[love.graphics.getHeight]], [[love.mouse.getPosition]], mouse events, [[love.touch.getPosition]], and touch events are always in DPI-scaled units rather than pixels. In LÖVE 0.10 and older they were in pixels.

== 関連 ==
* [[parent::love.graphics (日本語)]]
* [[love.graphics.getDimensions (日本語)]]
* [[love.graphics.getPixelDimensions (日本語)]]
* [[love.window.toPixels (日本語)]]
* [[love.window.fromPixels (日本語)]]
* [[love.window.setMode (日本語)]]
* [[Config Files (日本語)]]

[[Category:Functions (日本語)]]
{{#set:Sub-Category=Window (日本語)}}
{{#set:Description=Gets the DPI scale factor of the window.}}
== そのほかの言語 ==
{{i18n (日本語)|love.graphics.getDPIScale}}