このモジュールはSDL_gfxライブラリをラッピングしたものです。
この命令は試験的に実装されているものです!:pygameのバージョンが上がると、この命令は仕様が変更されたり使えなくなったりする可能性があります。 この項目にある命令を使用してプログラムを書くと、次期pygameバージョンでは正常に動かなくなることもあります。
この項目の命令の殆どでは、color引数をRGB形式の値として設定します。また RGBA形式の値でも設定ができます。 The color argument can also be an integer pixel value that is already mapped to the Surface's pixel format.
全ての命令では引数を設定する位置が厳密に決まっています。座標と半径を設定する引数位置には整数のみしか設定できません。
rectangle のようにrect型の引数を設定する命令では(x, y, w, h)のタプル型の値を設定できます。ですが、なるべくはpygame.Rect型のインスタンスを設定するほうがよいでしょう。注意してほしいのですが、pygame.Rectには図形の右下座標を表すRect.bottomrightといったような値はありません。The right and bottom attributes of a Rect lie one pixel outside of the Rect's boarder.
この命令はpygameのバージョン1.9.0で新たに実装されました。
Wraps SDL_gfx primatives.
EXPERIMENTAL!: meaning this api may change, or dissapear in later pygame releases. If you use this, your code will break with the next pygame release.
Most of the functions accept a color argument that is an RGB triplet. These can also accept an RGBA quadruplet. The color argument can also be an integer pixel value that is already mapped to the Surface's pixel format.
For all functions the arguments are strictly positional. Only integers are accepted for coordinates and radii.
For functions like rectangle that accept a rect argument any (x, y, w, h) sequence is accepted, though pygame.Rect instances are prefered. Note that for a pygame.Rect the drawing will not include Rect.bottomright. The right and bottom attributes of a Rect lie one pixel outside of the Rect's boarder.
New in pygame 1.9.0.
テクスチャー画像からsurfaceへピクセル単位でのコピー描写を行いますが、これは Surface.blit命令でのコピー描写とは異なった処理となります。また、8ビットSurfaceに対してはテクスチャ画像のピクセル単位でのコピー描写は行えません。
A per-pixel alpha texture blit to a per-pixel alpha surface will differ from a Surface.blit - draw one image onto another blit. Also, a per-pixel alpha texture cannot be used with an 8-bit per pixel destination.