Commit 63734c17 authored by IamIpanda's avatar IamIpanda

Merge pull request #1 from mycard/try-patch-new-bitmap

Update DataManager.cs
parents b9b0a6e7 bf24b31a
...@@ -352,7 +352,8 @@ namespace ImgGen ...@@ -352,7 +352,8 @@ namespace ImgGen
cardTexts.Add(code, text); cardTexts.Add(code, text);
if (!cardImages.ContainsKey(code)) if (!cardImages.ContainsKey(code))
{ {
Bitmap bitmap; Bitmap bitmap, bitmap_answer;
bitmap_answer = new Bitmap(177, 254);
SizeF ef; SizeF ef;
int num4; int num4;
if ((data.type & 2) != 0) if ((data.type & 2) != 0)
...@@ -419,7 +420,8 @@ namespace ImgGen ...@@ -419,7 +420,8 @@ namespace ImgGen
bitmap = new Bitmap(bTemplates[8]); 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); text.text = tosbc(text.text);
if ((data.type & 1) != 0) if ((data.type & 1) != 0)
{ {
...@@ -723,7 +725,7 @@ namespace ImgGen ...@@ -723,7 +725,7 @@ namespace ImgGen
graphics.DrawString(str3, nameFont, nameBrush, (float) 0f, (float) 0f); graphics.DrawString(str3, nameFont, nameBrush, (float) 0f, (float) 0f);
graphics.DrawString(str3, nameFont, Brushes.Gold, (float) 1f, (float) 1f); graphics.DrawString(str3, nameFont, Brushes.Gold, (float) 1f, (float) 1f);
graphics.ResetTransform(); graphics.ResetTransform();
cardImages.Add(code, bitmap); cardImages.Add(code, bitmap_answer);
} }
return 0; 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