架上圖片了你就可以在畫板上塗改了啊
我要寫多幾個字上去
string str = "Baidu"; //寫什麼字?
Font font = Font("宋體",30f); //字是什麼樣子的?
Brush brush = Brushes.Red; //用紅色塗上我的字吧;
PointF point = new PointF(10f,10f); //從什麼地方開始寫字捏?
//橫著寫還是豎著寫呢?
System.Drawing.StringFormat sf = new System.Drawing.StringFormat();
//還是豎著寫吧
sf.FormatFlags = StringFormatFlags.DirectionVertical
//開始寫咯
g.DrawString(str,font,brush,point,sf);
//寫好了,我要把我的作品收藏起來
image.Save("C:\\1.jpg");
——————————————————————————————————————————————
分割線哥哥
———————————————————————————————————————————————
System.Drawing.Graphics graphicsobj;
GraphicsObj = this.CreateGraphics();//e.Graphics在Form1_Paint中可以用
Pen myPen = new Pen(system.Drawing.Color.Red,5);
//x1,y1,x2,y2
GraphicsObj.DrawLine(myPen,20,20,200,210);//畫直線,斜線(x1,y1,x2,y2,起點橫縱坐標,終點橫縱坐標)
GraphicsObj.DrawRectangle(myPen,20,20,30,30);//畫矩形
GraphicsObj.DrawEllipse(myPen,20,20,50,50)//畫圓,橢圓
GraphicsObj.FillEllipse(myPen,20,20,50,50)//畫實心圓,實心橢圓
GraphicsObj.DrawPie(myPen,90,80,140,40,120,100); //畫餡餅圖形 //畫多邊形
myPen.DashStyle = System.Drawing.Drawing2D.DashStyle.Dash;//虛線筆
GraphicsObj.DrawLine(myPen,10,60,100,60);
myPen.DashStyle = System.Drawing.Drawing2D.DashStyle.DashDot;//點,短線風格的線
GraphicsObj.DrawLine(myPen, 10, 70, 100, 70);
myPen.DashStyle = System.Drawing.Drawing2D.DashStyle.DashDotDot;//雙點,短線風格的線
GraphicsObj.DrawLine(myPen, 10, 80, 100, 80);
myPen.DashStyle = System.Drawing.Drawing2D.DashStyle.Dot;//由點組成的線
GraphicsObj.DrawLine(myPen, 10, 90, 100, 90);
myPen.DashStyle = System.Drawing.Drawing2D.DashStyle.Solid;//實線筆
myPen.EndCap = System.Drawing.Drawing2D.LineCap.ArrowAnchor;//後箭頭
GraphicsObj.DrawLine(myPen,150,50,250,50);
myPen.StartCap = System.Drawing.Drawing2D.LineCap.ArrowAnchor;//前箭頭
GraphicsObj.DrawLine(myPen,150,70,250,70);
myPen.EndCap = System.Drawing.Drawing2D.LineCap.RoundAnchor;//一條線,終點是圓點
GraphicsObj.DrawLine(myPen, 150, 90, 250, 90);
myPen.EndCap = System.Drawing.Drawing2D.LineCap.SquareAnchor;//一條線,終點是方點
GraphicsObj.DrawLine(myPen, 150, 110, 250, 110);
myPen.EndCap = System.Drawing.Drawing2D.LineCap.Triangle;//一條線,終點是三角形向後
GraphicsObj.DrawLine(myPen, 150, 130, 250, 130);
myPen.EndCap = System.Drawing.Drawing2D.LineCap.DiamondAnchor;//一條線,終點是菱形
GraphicsObj.DrawLine(myPen, 150, 150, 250, 150);
易一幅圖作橢圓的背景:
Image bgimage = new Bitmap("E:2065215396.jpg");
Brush brush = new TextureBrush(bgimage); //易一幅圖作橢圓的背景
g.FillEllipse(brush,50,50,500,300);
——————————————————————————————————————————————
華麗的分割線
——————————————————————————————————————————————