Fix export image transprant channel error
This commit is contained in:
@ -43,6 +43,7 @@ namespace HFUTCourseSimulation {
|
|||||||
var graphics = Graphics.FromImage(img);
|
var graphics = Graphics.FromImage(img);
|
||||||
|
|
||||||
//declare graphics value
|
//declare graphics value
|
||||||
|
var background = new SolidBrush(Color.White);
|
||||||
var headerBrush = new SolidBrush(Color.Gray);
|
var headerBrush = new SolidBrush(Color.Gray);
|
||||||
var textBrush = new SolidBrush(Color.Black);
|
var textBrush = new SolidBrush(Color.Black);
|
||||||
Brush cellBrush;
|
Brush cellBrush;
|
||||||
@ -50,6 +51,9 @@ namespace HFUTCourseSimulation {
|
|||||||
|
|
||||||
var textMargin = graphics.MeasureString("测试字符", textFont).Height;
|
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
|
//output each week
|
||||||
for (int i = 0; i < weekCount; i++) {
|
for (int i = 0; i < weekCount; i++) {
|
||||||
//generate week data
|
//generate week data
|
||||||
|
Reference in New Issue
Block a user