Commit e2a06523 authored by mercury233's avatar mercury233

format

parent 913d739a
...@@ -232,6 +232,16 @@ namespace ImgGen ...@@ -232,6 +232,16 @@ namespace ImgGen
} }
cardDatas.Add(code, data); cardDatas.Add(code, data);
if (!cardImages.ContainsKey(code)) if (!cardImages.ContainsKey(code))
{
Bitmap bitmap;
bitmap = DrawImage(code, data, text);
cardImages.Add(code, bitmap);
}
return 0;
}
}
private static Bitmap DrawImage(int code, Data data, Text text)
{ {
Bitmap bitmap; Bitmap bitmap;
SizeF ef; SizeF ef;
...@@ -708,10 +718,7 @@ namespace ImgGen ...@@ -708,10 +718,7 @@ namespace ImgGen
graphics.DrawString(str3, nameFont, nameBrush, 0f, 0f); graphics.DrawString(str3, nameFont, nameBrush, 0f, 0f);
graphics.DrawString(str3, nameFont, Brushes.Gold, 1f, 1f); graphics.DrawString(str3, nameFont, Brushes.Gold, 1f, 1f);
graphics.ResetTransform(); graphics.ResetTransform();
cardImages.Add(code, bitmap); return bitmap;
}
return 0;
}
} }
public static Bitmap Zoom(Bitmap sourceBitmap, int newWidth, int newHeight) public static Bitmap Zoom(Bitmap sourceBitmap, int newWidth, int newHeight)
......
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