当前位置:网站首页>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
边栏推荐
- Using C to operate SQLSERVER database through SQL statement tutorial
- Is there any risk for flush to register and open an account? Is it safe?
- Sword finger offer 12 Path in matrix
- Leetcode(763)——划分字母区间
- Some ways out for older programmers
- vulnhub之DC9
- 卷积神经网络(CNN)详解及TensorFlow2代码实现
- 【题解】剑指 Offer 15. 二进制中1的个数(C语言)
- ICML2022 | Neurotoxin:联邦学习的持久后门
- AI智能抠图工具--头发丝都可见
猜你喜欢

Configure redis master-slave and sentinel sentinel in the centos7 environment (solve the problem that the sentinel does not switch when the master hangs up in the ECS)

The importance of using fonts correctly in DataWindow

How to analyze financial expenses

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

MATLAB and MySQL database connection and data exchange (based on ODBC)
![Flower shop window layout [dynamic planning]](/img/d9/6b8f9cd0f74e70b313d2571c2ded30.png)
Flower shop window layout [dynamic planning]

网络爬虫2:抓取网易云音乐评论用户ID及主页地址
![[solution] sword finger offer 15 Number of 1 in binary (C language)](/img/ab/149775ae8ed94464efdf6921c1022a.png)
[solution] sword finger offer 15 Number of 1 in binary (C language)

Matrix derivation and its chain rule

协同过滤进化版本NeuralCF及tensorflow2实现
随机推荐
诗尼曼家居冲刺A股:年营收近12亿 红星美凯龙与居然之家是股东
y48.第三章 Kubernetes从入门到精通 -- Pod的状态和探针(二一)
Using C to operate SQLSERVER database through SQL statement tutorial
茂莱光学科创板上市:拟募资4亿 范一与范浩兄弟为实控人
买股票通过中金证券经理的开户二维码开户资金是否安全?想开户炒股
中金证券经理给的开户二维码办理股票开户安全吗?我想开个户
Kdd2022 𞓜 unified session recommendation system based on knowledge enhancement prompt learning
LabVIEW Arduino TCP/IP远程智能家居系统(项目篇—5)
传纸条【动态规划】
Shiniman household sprint A shares: annual revenue of nearly 1.2 billion red star Macalline and incredibly home are shareholders
网络爬虫2:抓取网易云音乐评论用户ID及主页地址
leetcode:141. 环形链表【哈希表 + 快慢指针】
Netease Yunxin officially joined the smart hospital branch of China Medical Equipment Association to accelerate the construction of smart hospitals across the country
Which securities company is the most convenient, safe and reliable for opening an account
leetcode:6103. 从树中删除边的最小分数【dfs + 联通分量 + 子图的值记录】
在哪个平台买股票开户最安全?求分享
打新债注册开户有没有什么风险?安全吗?
指南针能开户炒股吗?安全吗?
网络爬虫终篇:向10万级网易云用户发送定向消息
大龄程序员的一些出路