if (src_pointf.X >= srcx && src_pointf.X < srcx + srcwidth && src_pointf.Y >= srcy && src_pointf.Y < srcy+srcheight) *dst_color = resample_bitmap_pixel(&src_area, src_data, bitmap->width, bitmap->height, &src_pointf, imageAttributes, interpolation); else
*dst_color = 0;
*dst_color = imageAttributes->outside_color;
It's like this for a reason. This isn't out of the bounds of the source image, which is when imageAttributes would apply. This is out of the bounds of the parallelogram we're drawing, and we should be leaving that pixel alone.