Bartosz Kosiorek (@gang65) commented about dlls/gdiplus/graphics.c:
// PixelOffsetMode None and HighSpeed is not drawing outside dst_area,
// that's why we are using ceilf and floorf.
dst_area.left = ceilf(dst_area_left);
dst_area.top = ceilf(dst_area_top);
dst_area.right = floorf(dst_area_right);
dst_area.bottom = floorf(dst_area_bottom);
}
else
{
// Based on experiments dst_area with value 0.5 should be rounded to 0.0
// That't why we are adding 0.4999 instead of 0.5
dst_area.left = (INT)(dst_area_left + 0.4999);
dst_area.top = (INT)(dst_area_top + 0.4999);
dst_area.right = (INT)(dst_area_right + 0.4999);
dst_area.bottom = (INT)(dst_area_bottom + 0.4999);
}
Based on experiments I have managed to check how destination size is calculated.