Pset (x, y), color
在隆回等地區(qū),都構(gòu)建了全面的區(qū)域性戰(zhàn)略布局,加強(qiáng)發(fā)展的系統(tǒng)性、市場(chǎng)前瞻性、產(chǎn)品創(chuàng)新能力,以專注、極致的服務(wù)理念,為客戶提供網(wǎng)站制作、網(wǎng)站設(shè)計(jì) 網(wǎng)站設(shè)計(jì)制作按需網(wǎng)站建設(shè),公司網(wǎng)站建設(shè),企業(yè)網(wǎng)站建設(shè),品牌網(wǎng)站建設(shè),成都全網(wǎng)營(yíng)銷,成都外貿(mào)網(wǎng)站制作,隆回網(wǎng)站建設(shè)費(fèi)用合理。
其中x,y是所畫點(diǎn)的坐標(biāo)值,color是點(diǎn)的顏色值,比如:
Me.PSet (100, 100), vbRed '在當(dāng)前窗體的(100,100)位置畫一個(gè)紅色的點(diǎn)
又比如:
Picture1.PSet (Picture1.ScaleWidth \ 2, Picture1.ScaleHeight \ 2), vbBlue '在Picture1中的中心位置畫一個(gè)藍(lán)色的點(diǎn)
畫點(diǎn):
在PictureBox的Paint事件里面:
dim myGraphics=e.Graphics
Dim myPointArray As Point() = {New Point(0, 0), New Point(50, 30), New Point(30, 60)}
myGraphics.DrawPolygon(myPen, myPointArray)
畫圓:
Dim g As Graphics
g = PictureBox1.CreateGraphics
g.FillEllipse(Brushes.Red, x, y, 10, 10)
自己用GDI+畫的 無(wú)論什么什么尺寸的picturebox都行
不過(guò)別太小了o(∩_∩)o
代碼放在哪里自己決定啊
最好是放在 picturebox的resize時(shí)間里
每次picturebox大小改變都重畫一次坐標(biāo)
Dim b As New Bitmap(PictureBox1.Width, PictureBox1.Height)
Dim g As Graphics = Graphics.FromImage(b)
g.Clear(Color.White)
Dim p As New Pen(Color.Black)
p.EndCap = Drawing2D.LineCap.ArrowAnchor
g.DrawLine(p, 30, PictureBox1.Height - 30, 30, 30)
g.DrawLine(p, 30, PictureBox1.Height - 30, PictureBox1.Width - 30, PictureBox1.Height - 30)
Dim i As Integer
Dim bs As New SolidBrush(Color.Green)
Dim po As New Point
po.X = 0
po.Y = PictureBox1.Height - 35
For i = 700 To 1000 Step 50
g.DrawString(i, Me.Font, bs, po.X, po.Y)
g.DrawLine(p, po.X + 28, po.Y + 5, po.X + 30, po.Y + 5)
po.Y -= (PictureBox1.Height - 100) / 6
Next
po.X = 30
po.Y = PictureBox1.Height - 30
For i = 0 To 40 Step 5
g.DrawString(i, Me.Font, bs, po.X, po.Y + 5)
g.DrawLine(p, po.X, po.Y + 2, po.X, po.Y)
po.X += (PictureBox1.Width - 100) / 8
Next
PictureBox1.Image = b
vb中畫點(diǎn)用Pset方法。根據(jù)查詢相關(guān)公開信息顯示,vb中畫點(diǎn),畫線,畫圓分別用Pset、Line、Circle方法進(jìn)行繪制。
Dim b As New Bitmap(320, 200)'定義圖像寬高
Dim clrs As Color=Color.Black
for y as int32=1 to 199
for x as int32=1 to 319
if x=y then
clrs = Color.White'假設(shè)是對(duì)角線,x=y時(shí)使用白色
else
clrs = Color.Black'平時(shí)使用黑色
endif
b.SetPixel(x, y, clrs)'畫點(diǎn)
next
next
b.Save("test.tif", System.Drawing.Imaging.ImageFormat.Tiff)'保存到圖片文件
==================
原創(chuàng)例子,祝進(jìn)步!!
本文題目:vbnet畫點(diǎn) vb畫點(diǎn)用什么方法
分享地址:http://chinadenli.net/article10/dodsedo.html
成都網(wǎng)站建設(shè)公司_創(chuàng)新互聯(lián),為您提供做網(wǎng)站、電子商務(wù)、響應(yīng)式網(wǎng)站、虛擬主機(jī)、品牌網(wǎng)站設(shè)計(jì)、網(wǎng)站建設(shè)
聲明:本網(wǎng)站發(fā)布的內(nèi)容(圖片、視頻和文字)以用戶投稿、用戶轉(zhuǎn)載內(nèi)容為主,如果涉及侵權(quán)請(qǐng)盡快告知,我們將會(huì)在第一時(shí)間刪除。文章觀點(diǎn)不代表本網(wǎng)站立場(chǎng),如需處理請(qǐng)聯(lián)系客服。電話:028-86922220;郵箱:631063699@qq.com。內(nèi)容未經(jīng)允許不得轉(zhuǎn)載,或轉(zhuǎn)載時(shí)需注明來(lái)源: 創(chuàng)新互聯(lián)