当前位置:网站首页>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
边栏推荐
- Parsing complex JSON in fluent
- Netease Yunxin officially joined the smart hospital branch of China Medical Equipment Association to accelerate the construction of smart hospitals across the country
- Application and Optimization Practice of 100 million level monthly live national karaoke feed service in Tencent cloud mongodb
- Flutter 中 ValueNotifier<List<T>> 监听问题解决
- SAP Spartacus 默认路由配置的工作原理
- leetcode:6103. 从树中删除边的最小分数【dfs + 联通分量 + 子图的值记录】
- SAP commerce cloud project Spartacus getting started
- Installation avec homebrew dans un environnement Mac OS [email protected]
- DAST 黑盒漏洞扫描器 第五篇:漏洞扫描引擎与服务能力
- leetcode:152. 乘积最大子数组【考虑两个维度的dp】
猜你喜欢

Configuring assimp Library in QT environment (MinGW compiler)

QT环境下配置Assimp库(MinGW编译器)

【图像处理基础】基于matlab GUI图像曲线调整系统【含Matlab源码 1923期】

Web crawler 2: crawl the user ID and home page address of Netease cloud music reviews
![Flower shop window layout [dynamic planning]](/img/d9/6b8f9cd0f74e70b313d2571c2ded30.png)
Flower shop window layout [dynamic planning]

「连续学习Continual learning, CL」最新2022研究综述

Kdd2022 𞓜 unified session recommendation system based on knowledge enhancement prompt learning
![[leetcode]- linked list-2](/img/f7/9d4b01285fd6f7fa9f3431985111b0.png)
[leetcode]- linked list-2
![[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]

模块五作业
随机推荐
vulnhub之dc8
[solution] sword finger offer 15 Number of 1 in binary (C language)
PostgreSQL notes
KDD2022 | 基于知识增强提示学习的统一会话推荐系统
打新债注册开户有没有什么风险?安全吗?
Common concurrent testing tools and pressure testing methods
Chapter 2 construction of self defined corpus
聊聊我的远程工作体验 | 社区征文
在线协作文档综合评测 :Notion、FlowUs、Wolai、飞书、语雀、微软 Office、谷歌文档、金山文档、腾讯文档、石墨文档、Dropbox Paper、坚果云文档、百度网盘在线文档
【数学建模】基于matlab GUI随机节点的生成树【含Matlab源码 1919期】
Centos7编译安装Redis
SAP Spartacus 中的依赖注入 Dependency Injection 介绍
In 2022, where will the medium and light-weight games go?
经典Wide & Deep模型介绍及tensorflow 2代码实现
Installation avec homebrew dans un environnement Mac OS [email protected]
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)
SAP commerce cloud project Spartacus getting started
numpy中mgrid的用法
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
Comprehensive evaluation of online collaboration documents: note, flowus, WOLAI, Feishu, YuQue, Microsoft office, Google Docs, Jinshan docs, Tencent docs, graphite docs, Dropbox paper, nutcloud docs,