I would make a Line class having start and end point of the line in struct Point and make list of that class instead of having four arrays.

public class MyLine
{
public Point StartPoint {get; set;}
public Point EndPoint {get; set;} public void DrawLine()
{
//Draw line code goes here
}
}

Now you have line class with required field and method to draw line. You drawLines method that might be in some other class will create list of MyLine class and can draw that list of Lines using Line class method DrawLine

private void DrawLines()
{
List<MyLine> listMyLines = new List<MyLine>();
listMyLines.Add(new MyLine{StartPoint = new Point(0, 100), EndPoint = new Point(334, 100)}); for (int i = 0; i < listMyLines.Count; i++)
{
listMyLines[i].DrawLine();
}
}

C# Draw multiple Lines的更多相关文章

  1. Linux/shell: Concatenate multiple lines to one line

    $ cat file START Unix Linux START Solaris Aix SCO 1. Join the lines following the pattern START with ...

  2. Latex: Expression under summation on multiple lines

    Purpose Describe the sum symbol like this: zebk=1Nk∑i∈Rkj∈W(i)∩Rkmax(fi−fj) Solution code z_{ebk}=\f ...

  3. matlab-可视化图像阈值选择GUI工具

    话不多说,先看图,这是导入一张图后运行的效果. 在此函数中,左图是灰度图加上colorBar后的彩色效果图,右图是二值化后的图,下面是可调节阈值的灰度直方图. 左上角的按钮是回归初始状态,右上角的按钮 ...

  4. vbscript multiple line syntax

    Vbscript 如何将输出内容换行? ' VbCrLf represetns Carriage return–linefeed combination, for more information s ...

  5. abap alv multiple header using write

    A standard SAP ALV list report will show only one line header, but there will be a requirement somed ...

  6. Draw your Next App Idea with Ink to Code

    Imagine that you’ve just been struck by inspiration for your next great app. You might start by jott ...

  7. CF961D Pair Of Lines

    题目描述 You are given n n n points on Cartesian plane. Every point is a lattice point (i. e. both of it ...

  8. Codeforces 961 D Pair Of Lines

    题目描述 You are given nn points on Cartesian plane. Every point is a lattice point (i. e. both of its c ...

  9. [shell test] multiple conditions

      Classic technique (escape metacharacters): if[ \( $g -eq 1-a "$c"="123" \) -o ...

随机推荐

  1. python全栈开发day60-django_app ORM 完整登录案例

    day60 内容回顾: 1. HTTP协议: 1.请求(浏览器发给服务端的消息——request) 请求方法 URL 协议版本\r\n k1:v1\r\n k2:v2\r\n \r\n 请求体 —— ...

  2. weblogic弱密码检测

    http://www.secbox.cn/hacker/tools/6252.html http://60.12.168.73:8088/console/login/LoginForm.jsp htt ...

  3. python---读取/写入excel用例数据

    使用excel管理用例 ①.读取excel的用例数据,每一类参数保存在list中返回:②.那么接下来使用unitest编写用例时,可以去调用这个函数.使用里面的数据: 个人认为好处是,大部分人还是习惯 ...

  4. 15行Python 仿百度搜索引擎

    开发工具:PyCharm 开发环境:python3.6 + flask + requests 开发流程: 1. 启动一个web服务 from flask import Flask app = Flas ...

  5. react学习二 生命周期

    转自:https://www.cnblogs.com/gdsblog/p/7348375.html react 中compent getDefaultProps object getDefaultPr ...

  6. miniui格式化日期的方法

    <div field="InsertTime" renderer="ondayRenderer" headerAlign="center&quo ...

  7. VS2017动态链接库(.dll)的生成与使用

    转 https://blog.csdn.net/m0_37170593/article/details/76445972 这里以VS2017为例子,讲解一下动态链接库(.dll)的生成与使用. 一.动 ...

  8. GYM 101755 K.Video Reviews 【贪心】+【二分】

    <题目链接> 题目大意: 一家公司想让n个人给他们的产品评论,所以依次去找这n个人,第i个人会评论当且仅当已经有ai个人评论或他确实对这个产品感兴趣,但是这n个人都不对这个产品感兴趣,问这 ...

  9. RFC2616-HTTP1.1-Methods(方法规定部分—单词注释版)

    part of Hypertext Transfer Protocol -- HTTP/1.1RFC 2616 Fielding, et al. 9 Method Definitions The se ...

  10. Farewell Party-构造

    Farewell Party 思路 : 转换思路 ,有 a [ i ] 个不相等的 ,那么至少得有 n - a [ i ]个与它相等的. 但是有可能与它拥有相同数目的有很多. 但是为了能够最终 分配成 ...