如何使用wpf.i在位图图像中添加不同颜色的不同文本已经编写了代码,它只需要文本行中的一种颜色,但我想在位图中使用不同的颜色
SolidBrush brush = new SolidBrush(System.Drawing.Color.White);
System.Drawing.Brush brush1 = new SolidBrush(System.Drawing.Color.Blue);
// draw your rectangle below the original image
System.Drawing.Font font = new System.Drawing.Font("Arial", fontsize, System.Drawing.FontStyle.Bold, GraphicsUnit.Pixel);
SizeF textSize = new SizeF();
graphics.DrawString(multiLineString, font, brush1, position);
请帮我解决这个问题
答案 0 :(得分:1)
根据您的评论 - 您只需要关注: