Now supports resized views with window to map coordinates translation.
Added missing stdio include for fprintf.