mirror of
https://github.com/reactos/reactos.git
synced 2025-08-05 19:33:16 +00:00
[MSPAINT] Use better units for image resolution (#5301)
Our paint program used the pixels per meter (PPM) unit but this unit is hardly used in the world. Let's use DPI (dots per inch) and/or pixels per centimeter (PPCM). CORE-18867
This commit is contained in:
parent
b29b2682bf
commit
d708c7947b
34 changed files with 141 additions and 132 deletions
|
@ -16,10 +16,11 @@ SYSTEMTIME fileTime;
|
|||
|
||||
/* FUNCTIONS ********************************************************/
|
||||
|
||||
// Convert DPI (dots per inch) into PPM (pixels per meter)
|
||||
float PpmFromDpi(float dpi)
|
||||
// Convert DPI (dots per inch) into PPCM (pixels per centimeter)
|
||||
float PpcmFromDpi(float dpi)
|
||||
{
|
||||
return dpi / 0.0254; // 1 DPI is 0.0254 meter.
|
||||
// 1 DPI is 0.0254 meter. 1 centimeter is 1/100 meter.
|
||||
return dpi / (0.0254f * 100.0f);
|
||||
}
|
||||
|
||||
HBITMAP
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue