Fix export image transprant channel error
This commit is contained in:
@ -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
|
||||
|
Reference in New Issue
Block a user