創(chuàng)建Graphics對象,可以調(diào)用CreateGraphics()直接做圖也可以創(chuàng)建Bitmap對象然后調(diào)用Graphics.FromBitmap(b)得到Graphics G
公司主營業(yè)務:網(wǎng)站建設、網(wǎng)站設計、移動網(wǎng)站開發(fā)等業(yè)務。幫助企業(yè)客戶真正實現(xiàn)互聯(lián)網(wǎng)宣傳,提高企業(yè)的競爭能力。創(chuàng)新互聯(lián)公司是一支青春激揚、勤奮敬業(yè)、活力青春激揚、勤奮敬業(yè)、活力澎湃、和諧高效的團隊。公司秉承以“開放、自由、嚴謹、自律”為核心的企業(yè)文化,感謝他們對我們的高要求,感謝他們從不同領域給我們帶來的挑戰(zhàn),讓我們激情的團隊有機會用頭腦與智慧不斷的給客戶帶來驚喜。創(chuàng)新互聯(lián)公司推出衡山免費做網(wǎng)站回饋大家。
G.Clear(Colors.Black)
G.DrawLine(Pens.White, 畫線的坐標
工具 -新建-z軸矢量。在再你要變坐標的地方的一點 點擊一下讓z軸向上,就可以了。
Dim g As Graphics = PictureBox1.CreateGraphics
g.TranslateTransform(2, 2) ‘定義原點坐標
g.ScaleTransform(1, -1) ’X軸不變,反轉(zhuǎn)Y軸
以PictureBox1中(2,2)點為新的原點(0,0)
向右為X軸正方向 向上為Y軸正方向
123456789101112Dim picX, picY, x1, y1, x2, y2, a href=";tn=44039180_cprfenlei=mv6quAkxTZn0IZRqIHckPjm4nH00T1YLPhmknAcvPjNhnvRYPAF90ZwV5Hcvrjm3rH6sPfKWUMw85HfYnjn4nH6sgvPsT6KdThsqpZwYTjCEQLGCpyw9Uz4Bmy-bIi4WUvYETgN-TLwGUv3EnHb3rjbkrjc3rHc4nHn1rj0vPs" target="_blank" class="baidu-highlight"gdi/aX, a href=";tn=44039180_cprfenlei=mv6quAkxTZn0IZRqIHckPjm4nH00T1YLPhmknAcvPjNhnvRYPAF90ZwV5Hcvrjm3rH6sPfKWUMw85HfYnjn4nH6sgvPsT6KdThsqpZwYTjCEQLGCpyw9Uz4Bmy-bIi4WUvYETgN-TLwGUv3EnHb3rjbkrjc3rHc4nHn1rj0vPs" target="_blank" class="baidu-highlight"gdi/aYpicX = 0 '要轉(zhuǎn)換的Picture1坐標XpicY = 0 '要轉(zhuǎn)換的Picture1坐標Yx1 = Picture1.ScaleLefty1 = Picture1.ScaleTopx2 = Picture1.ScaleLeft + Picture1.ScaleWidthy2 = Picture1.ScaleTop + Picture1.ScaleHeight '記錄原先的坐標系統(tǒng)Picture1.ScaleMode = 3 '坐標系統(tǒng)設為像素a href=";tn=44039180_cprfenlei=mv6quAkxTZn0IZRqIHckPjm4nH00T1YLPhmknAcvPjNhnvRYPAF90ZwV5Hcvrjm3rH6sPfKWUMw85HfYnjn4nH6sgvPsT6KdThsqpZwYTjCEQLGCpyw9Uz4Bmy-bIi4WUvYETgN-TLwGUv3EnHb3rjbkrjc3rHc4nHn1rj0vPs" target="_blank" class="baidu-highlight"gdi/aX = Round((picX - x1) / (x2 - x1) * Picture1.ScaleWidth)gdiY = Round((picY - y1) / (y2 - y1) * Picture1.ScaleHeight)MsgBox "Picture1的坐標(" picX "," picY ")轉(zhuǎn)為GDI坐標是(" gdiX "," gdiY ")"Picture1.Scale (x1, y1)-(x2, y2) '改回原先的坐標系統(tǒng)