当前位置:网站首页>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
边栏推荐
- 经典Wide & Deep模型介绍及tensorflow 2代码实现
- VB.net类库(进阶版——1)
- 模块五作业
- Netease Yunxin officially joined the smart hospital branch of China Medical Equipment Association to accelerate the construction of smart hospitals across the country
- 如何用 SAP BTP 平台上的图形建模器创建一个 OData 服务
- curl: (35) LibreSSL SSL_connect: SSL_ERROR_SYSCALL in connection
- numpy中mgrid的用法
- y48.第三章 Kubernetes从入门到精通 -- Pod的状态和探针(二一)
- Android mediacodec hard coded H264 file (four), ByteDance Android interview
- What are the accounting elements
猜你喜欢

【图像处理基础】基于matlab GUI图像直方图均衡化系统【含Matlab源码 1924期】

CVPR 2022 - Interpretation of selected papers of meituan technical team

YOLOv6:又快又准的目标检测框架开源啦

Yolov6: un cadre de détection de cibles rapide et précis est Open Source

Convolutional neural network (CNN) explanation and tensorflow2 code implementation
![leetcode:6103. Delete the minimum score of the edge from the tree [DFS + connected component + value record of the subgraph]](/img/16/8dc63e6494b3f23e2685e287abc94c.png)
leetcode:6103. Delete the minimum score of the edge from the tree [DFS + connected component + value record of the subgraph]

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

LabVIEW Arduino TCP/IP远程智能家居系统(项目篇—5)

龙芯中科科创板上市:市值357亿 成国产CPU第一股
![leetcode:141. Circular linked list [hash table + speed pointer]](/img/19/f918f2cff9f831d4bbc411fe1b9776.png)
leetcode:141. Circular linked list [hash table + speed pointer]
随机推荐
如何在 SAP BTP 平台上启用 HANA Cloud 服务
Kdd2022 𞓜 unified session recommendation system based on knowledge enhancement prompt learning
诗尼曼家居冲刺A股:年营收近12亿 红星美凯龙与居然之家是股东
尚硅谷DolphinScheduler视频教程发布
DAST 黑盒漏洞扫描器 第五篇:漏洞扫描引擎与服务能力
【图像处理基础】基于matlab GUI图像曲线调整系统【含Matlab源码 1923期】
在线协作文档综合评测 :Notion、FlowUs、Wolai、飞书、语雀、微软 Office、谷歌文档、金山文档、腾讯文档、石墨文档、Dropbox Paper、坚果云文档、百度网盘在线文档
买股票通过中金证券经理的开户二维码开户资金是否安全?想开户炒股
The importance of using fonts correctly in DataWindow
Vulnhub's DC8
Vulnhub's dc9
leetcode:152. 乘积最大子数组【考虑两个维度的dp】
Final part of web crawler: send directional messages to 100000 Netease cloud users
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)
leetcode:1567. 乘积为正数的最长子数组长度【dp[i]表示以i结尾的最大长度】
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
leetcode:710. 黑名单中的随机数【映射思维】
Leetcode(452)——用最少数量的箭引爆气球
Test comparison of linear model LN, single neural network SNN, deep neural network DNN and CNN
数据治理啥都干