文件名称:PointIsR
- 所属分类:
- 2D图形编程
- 资源属性:
- [Windows] [Visual C] [Basic/ASP] [源码]
- 上传时间:
- 2012-11-26
- 文件大小:
- 3kb
- 下载次数:
- 0次
- 提 供 者:
- h**
- 相关连接:
- 无
- 下载说明:
- 别用迅雷下载,失败请重下,重下不扣分!
介绍说明--下载内容均来自于网络,请自行研究使用
判断点是否在区域内.
Private Sub Command1_Click()
当点与任一顶点重合时,返回“不在多边形区域”
Line (0, 0)-(500, 500), RGB(255, 255), BF
Dim hRegion As Long
Dim P() As PointAPI
ReDim P(9) As PointAPI
P(0).X = 10: P(0).Y = 190: PSet (P(0).X, P(0).Y), vbRed
P(1).X = 400: P(1).Y = 270: Line (P(0).X, P(0).Y)-(P(1).X, P(1).Y), vbRed
P(2).X = 220: P(2).Y = 70: Line -(P(2).X, P(2).Y), vbRed
P(3).X = 220: P(3).Y = 30: Line -(P(3).X, P(3).Y), vbRed
P(4).X = 50: P(4).Y = 30: Line -(P(4).X, P(4).Y), vbRed
P(5).X = 50: P(5).Y = 70: Line -(P(5).X, P(5).Y), vbRed
P(6).X = 30: P(6).Y = 70: Line -(P(6).X, P(6).Y), vbRed
P(7).X = 30: P(7).Y = 185: Line -(P(7).X, P(7).Y), vbRed
P(8).X = 85: P(8).Y = 85: Line -(P(8).X, P(8).Y), vbRed
P(9).X = 120: P(9).Y = 200: Line -(P(9).X, P(9).Y), vbRed
Line -(P(0).X, P(0).Y), vbRed
-Determine the point in the region. Private Sub Command1_Click () when the points of coincidence with any one vertex, the return of not polygon region Line (0, 0)- (500, 500), RGB (255, 255), BF Dim hRegion As Long Dim P () As PointAPI ReDim P (9) As PointAPI P (0). X = 10: P (0). Y = 190: PSet (P (0). X, P (0). Y), vbRed P (1). X = 400: P (1). Y = 270: Line (P (0). X, P (0). Y)- (P (1). X, P (1). Y ), vbRed P (2). X = 220: P (2). Y = 70: Line- (P (2). X, P (2). Y), vbRed P (3). X = 220: P (3). Y = 30: Line- (P (3). X, P (3). Y), vbRed P (4). X = 50: P (4). Y = 30: Line- (P ( 4). X, P (4). Y), vbRed P (5). X = 50: P (5). Y = 70: Line- (P (5). X, P (5). Y), vbRed P (6). X = 30: P (6). Y = 70: Line- (P (6). X, P (6). Y), vbRed P (7). X = 30: P (7 ). Y = 185: Line- (P (7). X, P (7). Y), vbRed P (8). X = 85: P (8). Y = 85: Line- (P (8) . X, P (8). Y), vbRed P (9). X = 120: P (9). Y = 200: Line- (P (9). X, P (9). Y), vbRed Line- (P (0). X, P (0). Y), vbRed
Private Sub Command1_Click()
当点与任一顶点重合时,返回“不在多边形区域”
Line (0, 0)-(500, 500), RGB(255, 255), BF
Dim hRegion As Long
Dim P() As PointAPI
ReDim P(9) As PointAPI
P(0).X = 10: P(0).Y = 190: PSet (P(0).X, P(0).Y), vbRed
P(1).X = 400: P(1).Y = 270: Line (P(0).X, P(0).Y)-(P(1).X, P(1).Y), vbRed
P(2).X = 220: P(2).Y = 70: Line -(P(2).X, P(2).Y), vbRed
P(3).X = 220: P(3).Y = 30: Line -(P(3).X, P(3).Y), vbRed
P(4).X = 50: P(4).Y = 30: Line -(P(4).X, P(4).Y), vbRed
P(5).X = 50: P(5).Y = 70: Line -(P(5).X, P(5).Y), vbRed
P(6).X = 30: P(6).Y = 70: Line -(P(6).X, P(6).Y), vbRed
P(7).X = 30: P(7).Y = 185: Line -(P(7).X, P(7).Y), vbRed
P(8).X = 85: P(8).Y = 85: Line -(P(8).X, P(8).Y), vbRed
P(9).X = 120: P(9).Y = 200: Line -(P(9).X, P(9).Y), vbRed
Line -(P(0).X, P(0).Y), vbRed
-Determine the point in the region. Private Sub Command1_Click () when the points of coincidence with any one vertex, the return of not polygon region Line (0, 0)- (500, 500), RGB (255, 255), BF Dim hRegion As Long Dim P () As PointAPI ReDim P (9) As PointAPI P (0). X = 10: P (0). Y = 190: PSet (P (0). X, P (0). Y), vbRed P (1). X = 400: P (1). Y = 270: Line (P (0). X, P (0). Y)- (P (1). X, P (1). Y ), vbRed P (2). X = 220: P (2). Y = 70: Line- (P (2). X, P (2). Y), vbRed P (3). X = 220: P (3). Y = 30: Line- (P (3). X, P (3). Y), vbRed P (4). X = 50: P (4). Y = 30: Line- (P ( 4). X, P (4). Y), vbRed P (5). X = 50: P (5). Y = 70: Line- (P (5). X, P (5). Y), vbRed P (6). X = 30: P (6). Y = 70: Line- (P (6). X, P (6). Y), vbRed P (7). X = 30: P (7 ). Y = 185: Line- (P (7). X, P (7). Y), vbRed P (8). X = 85: P (8). Y = 85: Line- (P (8) . X, P (8). Y), vbRed P (9). X = 120: P (9). Y = 200: Line- (P (9). X, P (9). Y), vbRed Line- (P (0). X, P (0). Y), vbRed
(系统自动生成,下载前可以参看下载内容)
下载文件列表
FrmMain.frm
FrmMain.frx
点是否在区域内.vbp
点是否在区域内.vbw
FrmMain.frx
点是否在区域内.vbp
点是否在区域内.vbw