Commit bf24b31a authored by IamIpanda's avatar IamIpanda

Update DataManager.cs

[try] Change mode to create a new bitmap
[warn] This code is not tested.
parent b9b0a6e7
......@@ -352,7 +352,8 @@ namespace ImgGen
cardTexts.Add(code, text);
if (!cardImages.ContainsKey(code))
{
Bitmap bitmap;
Bitmap bitmap, bitmap_answer;
bitmap_answer = new Bitmap(177, 254);
SizeF ef;
int num4;
if ((data.type & 2) != 0)
......@@ -419,7 +420,8 @@ namespace ImgGen
bitmap = new Bitmap(bTemplates[8]);
}
}
Graphics graphics = Graphics.FromImage(bitmap);
Graphics graphics = Graphics.FromImage(bitmap_answer);
grpahics.DrawImage(bitmap, 0, 0);
text.text = tosbc(text.text);
if ((data.type & 1) != 0)
{
......@@ -723,7 +725,7 @@ namespace ImgGen
graphics.DrawString(str3, nameFont, nameBrush, (float) 0f, (float) 0f);
graphics.DrawString(str3, nameFont, Brushes.Gold, (float) 1f, (float) 1f);
graphics.ResetTransform();
cardImages.Add(code, bitmap);
cardImages.Add(code, bitmap_answer);
}
return 0;
}
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment