Find centralized, trusted content and collaborate around the technologies you use most.
Teams
Q&A for work
Connect and share knowledge within a single location that is structured and easy to search.
だから私は画像に影を付ける方法を知っています。そして、画像の長方形の部分をブリットする方法を知っています。しかし、たとえば、三角形はどうでしょうか。それとも台形?(例: http://i.imgur.com/Gtwhs.png )
これを聞いてから 1 分後、少なくともシェーディングの方法がわかりました。いつもそうじゃない?
とにかく、基本的には次のような単純なものになります。
surface.blit(image, pos, area) pygame.draw.polygon(surface, (0,0,0,128), pointlist, 0)
ここで、128 は必要なアルファ値であり、pointlist は必要なセクションの周りの頂点のリストです。