0
現在、画像の上に黒い四角形を描画しようとしていますが、画像の下には移動しません。私が押し下げようとすると、画像が黒い四角で塗りつぶされます。画像の下部に四角形が表示されない
は、ここに私のコードです:
public void AddTextToImage(string LabelText, string CardNo)
{
BitMap LabelImage = new BitMap("C:\ImageLocation");
int32 y = Convert.toInt32(CardNo;
int32 x = LabelImage.Width;
Rectangle rec = new Rectangle(Convert.ToInt32(LabelText), Convert.ToInt32(CardNo, LabelImage.Width, 250);
\\Mainly been playing with the numbers, can't figure out the right coordinates though
graphic.DrawRectangle(new Pen(Color.Black, LabelImage.Width), 0, -200, LabelImage.Width, y);
graphic.DrawString(LabelText, new Font("Tahoma", 40), Brushes.Black, new System.Drawing.Point(0,y));
picImage.Image = LabelImage;
}
コンパイルしたコードを投稿した方がずっと簡単です。 –