当前位置:网站首页>VB. Net class library (Advanced - 2 overload)
VB. Net class library (Advanced - 2 overload)
2022-06-26 21:55:00 【Xiaoyu 163】
This time, let's see how a function drives different parameters

We see :
The green part :1 individual ( common 2 individual )
We are in the class library main Add 2 Segment function :
''' <summary>
''' This is a coordinate system without letters
''' </summary>
''' <param name="picWidth"> Get the length of the picture </param>
''' <param name="picHeight"> Get the height of the picture </param>
''' <param name="AxisColor"> The color of the axis </param>
''' <param name="penwidth"> Pen thickness </param>
''' <returns></returns>
Public Function CreateAxis(picWidth As Integer, picHeight As Integer, AxisColor As Color, penwidth As Single)
' Draw the axis in red
Dim p As New Pen(AxisColor, penwidth)
' Arrow at the end of the axis
p.EndCap = Drawing2D.LineCap.ArrowAnchor
' Coordinate origin
Dim originPointX As Point = New Point(0, picHeight / 2)
Dim originPointY As Point = New Point(picWidth / 2, picHeight)
' Draw abscissa
g.DrawLine(p, originPointX, New Point(picWidth, picHeight / 2))
' Draw ordinate --http://blog.csdn.net/uruseibest
g.DrawLine(p, originPointY, New Point(picWidth / 2, 0))
'g.DrawString("y", New Font(" Song style ", 10, FontStyle.Italic), New SolidBrush(AxisColor), New Point(185, 1))
'g.DrawString("x", New Font(" Song style ", 10, FontStyle.Italic), New SolidBrush(AxisColor), New Point(390, 205))
Return Image
End Function
''' <summary>
''' Compared with the previous function, there is more than one coordinate system letter , namely X O Y
''' </summary>
''' <param name="picWidth"> Get the length of the picture </param>
''' <param name="picHeight"> Get the height of the picture </param>
''' <param name="AxisColor"> The color of the axis </param>
''' <param name="penwidth"> Pen thickness </param>
'''<param name="font"> typeface </param>
''' <returns></returns>
Public Overridable Function CreateAxis(picWidth As Integer, picHeight As Integer, AxisColor As Color, penwidth As Single, font As Font)
Dim brush As New SolidBrush(AxisColor)
' Draw the axis in red
Dim p As New Pen(AxisColor, penwidth)
' Arrow at the end of the axis
p.EndCap = Drawing2D.LineCap.ArrowAnchor
' Coordinate origin
Dim originPointX As Point = New Point(0, picHeight / 2)
Dim originPointY As Point = New Point(picWidth / 2, picHeight)
' Draw abscissa
g.DrawLine(p, originPointX, New Point(picWidth, picHeight / 2))
' Draw ordinate --http://blog.csdn.net/uruseibest
g.DrawLine(p, originPointY, New Point(picWidth / 2, 0))
g.DrawString("y", font, brush, New Point(picWidth / 2 - 15, 1))
g.DrawString("x", font, brush, New Point(picWidth - 10, picHeight / 2 + 10))
g.DrawString("o", font, brush, New Point(picWidth / 2 - 10, picHeight / 2 + 10))
Return Image
End FunctionThe second paragraph :Public Overridable Function CreateAxis(picWidth As Integer, picHeight As Integer, AxisColor As Color, penwidth As Single, font As Font)
end function
Is an overload , It is worth noting that : The parameters are different
边栏推荐
- fastadmin极光推送发送消息的时候registration_id多个用逗号分割后无效
- leetcode:141. Circular linked list [hash table + speed pointer]
- Android mediacodec hard coded H264 file (four), ByteDance Android interview
- Some ways out for older programmers
- Configuring assimp Library in QT environment (MinGW compiler)
- 茂莱光学科创板上市:拟募资4亿 范一与范浩兄弟为实控人
- DLA model (classification model + improved segmentation model) + deformable convolution
- nmap参数详解
- DLA模型(分类模型+改进版分割模型) + 可变形卷积
- 不同的子序列问题I
猜你喜欢

茂莱光学科创板上市:拟募资4亿 范一与范浩兄弟为实控人

Shiniman household sprint A shares: annual revenue of nearly 1.2 billion red star Macalline and incredibly home are shareholders
![[mathematical modeling] spanning tree based on Matlab GUI random nodes [including Matlab source code 1919]](/img/0c/17efaaa2488451b6dd15d9db33eba7.jpg)
[mathematical modeling] spanning tree based on Matlab GUI random nodes [including Matlab source code 1919]

在Flutter中解析复杂的JSON

Data governance does everything

会计要素包括哪些内容

MATLAB与Mysql数据库连接并数据交换(基于ODBC)

360手机助手首家接入APP签名服务系统 助力隐私安全分发

VB.net类库(进阶版——1)

诗尼曼家居冲刺A股:年营收近12亿 红星美凯龙与居然之家是股东
随机推荐
Matrix derivation and its chain rule
Hands on deep learning pytorch version 3 - Data Preprocessing
DAST black box vulnerability scanner part 5: vulnerability scanning engine and service capability
传纸条【动态规划】
Is it safe to buy stocks and open accounts through the account QR code of the CICC securities manager? Want to open an account for stock trading
Some ways out for older programmers
2022年,中轻度游戏出海路在何方?
Word chess based on heuristic search
打新债注册开户有没有什么风险?安全吗?
VB.net类库(进阶版——1)
Common configuration of jupyterlab
Leetcode(122)——买卖股票的最佳时机 II
卷积神经网络(CNN)详解及TensorFlow2代码实现
模块五作业
矩阵求导及其链式法则
线性模型LN、单神经网络SNN、深度神经网络DNN与CNN测试对比
Usage of MGrid in numpy
Common concurrent testing tools and pressure testing methods
LabVIEW Arduino TCP/IP远程智能家居系统(项目篇—5)
尚硅谷DolphinScheduler视频教程发布