下面是C随机数格点值等值线绘制案例(包含源码),希望对大家有些帮助!
源码:usi
gSystemusi
gSystemCollectio
sGe
ericusi
gSystemCompo
e
tModelusi
gSystemDatausi
gSystemDrawi
gusi
gSystemTextusi
gSystemWi
dowsForms
f
amespaceMyCo
tour
publicpartialclassfrmMai
Form
regio
属性
publicstaticboolshowPoi
tfalsepublicstaticbooldrawLi
estrueprivatefloat_Datasummary等值线原始格点数据summarypublicfloatData
getretur
_Dataset_Datavalue
privatefloat_Co
tourValuessummary等值线值数组summarypublicfloatCo
tourValues
getretur
_Co
tourValuesset_Co
tourValuesvalue
e
dregio
regio
窗体所有操作
publicfrmMai
I
itializeCompo
e
tMakeTestDatasetColorggpictureBox1CreateGraphics
privatevoidbutto
1_Clickobjectse
derEve
tArgse
thistimer1E
abledfalsei
itValue重新初始化绘制路径的数组
fMakeTestDatapictureBox1Refresh
privatevoidpictureBox1_Pai
tobjectse
derPai
tEve
tArgse
ifthisData
ullretur
Stri
gFormatsf
ewStri
gFormatsfAlig
me
tStri
gAlig
me
tCe
tersfLi
eAlig
me
tStri
gAlig
me
tCe
terPe
pe
ewPe
ColorDarkGray1绘制等值线ifdrawLi
es
thisplotCo
toureGraphicspictureBox1Size绘制网格iffrmMai
showPoi
t
i
twwpictureBox1WidthDataGetLe
gth01x轴间隔长度i
tyypictureBox1HeightDataGetLe
gth11y轴间隔长度
绘制网格横竖线fori
tp0pDataGetLe
gth0p
eGraphicsDrawLi
epe
ewPoi
tpww0
ewPoi
tpwwpictureBox1Height
fori
tk0kDataGetLe
gth1k
eGraphicsDrawLi
epe
ewPoi
t0kyy
ewPoi
tpictureBox1Widthkyy
绘制网格斜线fori
tj0jDataGetLe
gth01j
fori
ti1iDataGetLe
gth1i
eGraphicsDrawLi
epe
ewPoi
tjwwi1yy
ewPoi
tj1wwiyy
eGraphicsDrawLi
epe
ewPoi
tjwwiyy
ewPoi
tj1wwi1yy
f绘制格点值fori
tj0jDataGetLe
gth1j
fori
ti0iDataGetLe
gth0i
eGraphicsDrawStri
gDataijToStri
g