Fix export image transprant channel error

This commit is contained in:
2018-12-26 17:14:25 +08:00
parent 8efe144685
commit 85578852da

View File

@ -43,6 +43,7 @@ namespace HFUTCourseSimulation {
var graphics = Graphics.FromImage(img);
//declare graphics value
var background = new SolidBrush(Color.White);
var headerBrush = new SolidBrush(Color.Gray);
var textBrush = new SolidBrush(Color.Black);
Brush cellBrush;
@ -50,6 +51,9 @@ namespace HFUTCourseSimulation {
var textMargin = graphics.MeasureString("测试字符", textFont).Height;
//overlay all background
graphics.FillRectangle(background, 0, 0, Blank + weekPerLine * weekWidth, Blank + (weekCount / weekPerLine + (weekCount % weekPerLine == 0 ? 0 : 1)) * weekHeight);
//output each week
for (int i = 0; i < weekCount; i++) {
//generate week data