How can I render a square bitmap to an arbitrary four-sided polygon using GDI?

前端 未结 3 1844
别那么骄傲
别那么骄傲 2020-12-14 04:04

I need to paint a square image, mapped or transformed to an unknown-at-compile-time four-sided polygon. How can I do this?

Longer explanation

The specific

3条回答
  •  忘掉有多难
    2020-12-14 04:18

    Take a look at 3D Lab Vector graphics. (Specially "Football field" in the demo).


    Another cool resource is AggPas with full source included (download)

    AggPas is Open Source and free of charge 2D vector graphics library. It is an Object Pascal native port of the Anti-Grain Geometry library - AGG, originally written by Maxim Shemanarev in C++. AggPas doesn't depend on any graphic API or technology. Basically, you can think of AggPas as of a rendering engine that produces pixel images in memory from some vectorial data.

    Here is how the perspective demo looks like:

    enter image description here

    After transformation:

    enter image description here

提交回复
热议问题