当前位置:网站首页>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
边栏推荐
- Data governance does everything
- Can compass open an account for stock trading? Is it safe?
- KDD2022 | 基于知识增强提示学习的统一会话推荐系统
- 不同的子序列问题I
- [fundamentals of image processing] GUI image histogram equalization system based on MATLAB [including Matlab source code 1924]
- leetcode:1567. 乘积为正数的最长子数组长度【dp[i]表示以i结尾的最大长度】
- Common concurrent testing tools and pressure testing methods
- 矩阵求导及其链式法则
- QT环境下配置Assimp库(MinGW编译器)
- 这个算BUG吗?乱填的字母是否可以关闭
猜你喜欢
![[fundamentals of image processing] GUI image curve adjustment system based on MATLAB [including Matlab source code 1923]](/img/e8/6342f2dc6e7f06a847852ce4b40719.jpg)
[fundamentals of image processing] GUI image curve adjustment system based on MATLAB [including Matlab source code 1923]

What are the accounting elements

矩阵求导及其链式法则

用C#通过sql语句操作Sqlserver数据库教程

【数学建模】基于matlab GUI随机节点的生成树【含Matlab源码 1919期】

Data governance does everything

leetcode:6107. 不同骰子序列的数目【dp六个状态 + dfs记忆化】

QT环境下配置Assimp库(MinGW编译器)
![leetcode:1567. Length of the longest subarray whose product is a positive number [dp[i] indicates the maximum length ending with I]](/img/a4/c5c31de7a0a3b34a188bfec0b5d184.png)
leetcode:1567. Length of the longest subarray whose product is a positive number [dp[i] indicates the maximum length ending with I]

AI intelligent matting tool - hair can be seen
随机推荐
[mathematical modeling] spanning tree based on Matlab GUI random nodes [including Matlab source code 1919]
Usage of MGrid in numpy
The latest 2022 research review of "continuous learning, CL"
LabVIEW Arduino tcp/ip remote smart home system (project part-5)
Yolov6: un cadre de détection de cibles rapide et précis est Open Source
How to create an OData service with the graphical modeler on the sap BTP platform
fastadmin极光推送发送消息的时候registration_id多个用逗号分割后无效
会计要素包括哪些内容
AI intelligent matting tool - hair can be seen
LabVIEW Arduino TCP/IP远程智能家居系统(项目篇—5)
Common concurrent testing tools and pressure testing methods
YuMinHong: New Oriental does not have a reversal of falling and turning over, destroying and rising again
ICML2022 | Neurotoxin:联邦学习的持久后门
API管理之利剑 -- Eolink
Leetcode(452)——用最少数量的箭引爆气球
亿级月活全民K歌Feed业务在腾讯云MongoDB中的应用及优化实践
Some ways out for older programmers
关于appium踩坑 :Encountered internal error running command: Error: Cannot verify the signature of (已解决)
leetcode:6103. 从树中删除边的最小分数【dfs + 联通分量 + 子图的值记录】
基于启发式搜索的一字棋