[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:
Katayama Hirofumi MZ 2023-06-04 11:24:00 +09:00 committed by GitHub
parent b29b2682bf
commit d708c7947b
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
34 changed files with 141 additions and 132 deletions

View file

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