Fix GDI+ graphics error

This commit is contained in:
2018-12-26 17:07:41 +08:00
parent c6012ef490
commit 8efe144685

View File

@ -92,7 +92,7 @@ namespace HFUTCourseSimulation {
var rect = new RectangleF(cellx * BodyCellWidth, celly * BodyCellHeight, BodyCellWidth, celly * BodyCellHeight);
graphics.DrawString(courses.Name, textFont, textBrush, rect);
var thisTextMargin = graphics.MeasureString(courses.Name, textFont, BodyCellWidth).Height;
graphics.DrawString(courses.Desc, textFont, textBrush, cellx * BodyCellWidth, celly * BodyCellHeight + textMargin);
graphics.DrawString(courses.Desc, textFont, textBrush, cellx * BodyCellWidth, celly * BodyCellHeight + thisTextMargin);
}
//reset