我认为第二个项目意味着这需要非仿射变换.
Random extra notes
Four-sided? It is plausible that to be completely correct,the tile should be
mapped to a polygon with more than four points,but for our purposes
and at the scale it is drawn,a square -> other four-cornered-polygon
transformation should be enough.
Why preferably GDI only? All rendering so far is done using GDI,and I want to keep the code (a) fast and (b) requiring as few extra
libraries as possible. I am aware of 07000 and have been experimenting with them
today,but even after experimenting with them I’m not sure if they’re
flexible enough for this purpose. If they are,I haven’t managed to
figure it out,and so I’d really appreciate some sample code.
GDI+ is also ok since we use it elsewhere,but I know it can be slow,and speed is
important here.
One other alternative is anything 07001- /
07002-specific; this program is written mostly in C++ using
the VCL,and the graphics in question are currently painted to a
TCanvas with a mix of 07003 and raw WinAPI/GDI calls.
Overlaying images: One final caveat is that one colour in the tile may be for color-key
transparency: that is,all the white (say) squares in the above tile
should be transparent when drawn over whatever is underneath.
Currently,tiles are drawn to square or axis-aligned rectangular
targets using 07004.
I’m sorry for all the extra caveats that make this question more complicated
than ‘what algorithm should I use?’ But I will happily accept answers with
only algorithmic information too.