Commit 193c4f70 authored by mercury233's avatar mercury233

pend pic position

parent 55323482
...@@ -255,15 +255,15 @@ namespace ImgGen ...@@ -255,15 +255,15 @@ namespace ImgGen
if (data.isType(Type.TYPE_PENDULUM)) if (data.isType(Type.TYPE_PENDULUM))
{ {
if (image.Width == 347 && image.Height == 444) if (image.Width == 347 && image.Height == 444)
graphics.DrawImage(image, 26, 103, 347, 444); graphics.DrawImage(image, 27, 103, 347, 444);
else else
{ {
graphics.FillRectangle(pendBgBrush, new Rectangle(23, 362, 354, 189)); graphics.FillRectangle(pendBgBrush, new Rectangle(23, 362, 354, 189));
float ar = image.Width / image.Height; float ar = image.Width / image.Height;
if ((ar >= 1.3) && (ar <= 1.4)) if ((ar >= 1.3) && (ar <= 1.4))
graphics.DrawImage(image, 26, 103, 347, 260); graphics.DrawImage(image, 27, 103, 347, 259);
else else
graphics.DrawImage(image, new Rectangle(26, 103, 347, 260), new Rectangle(0, 0, image.Width, image.Width * 260 / 347), GraphicsUnit.Pixel); graphics.DrawImage(image, new Rectangle(27, 103, 347, 259), new Rectangle(0, 0, image.Width, image.Width * 259 / 347), GraphicsUnit.Pixel);
} }
} }
else else
......
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