Yanesdk で FillRectangle を行う(v1.55)
まず、どこかで1x1の白のテクスチャを作ります。
Bitmap bitmap = new Bitmap(1, 1, PixelFormat.Format32bppArgb); bitmap.SetPixel(0, 0, Color.FromArgb(255, 255, 255, 255)); texture = new Yanesdk.Draw.GlTexture(); texture.SetBitmap(bitmap);
で、このテクスチャを使って拡大して転送すればいけます。
public void FillRectangle(int x, int y, int width, int height, int r, int g, int b, int a) { // アルファを使う場合にはあらかじめ Screen.BlendSrcAlpha をしておくこと。 int r2, b2, g2, a2; Screen.GetColor(r2, g2, b2, a2); Screen.SetColor(r, g, b, a); Screen.Blt(texture, x, y, null, new Size(width, height)); Screen.SetColor(r2, g2, b2, a2); }