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全栈开发day77-博客主页

    1.文章分类 2.标签 3.归档 1) MySQL的日期格式化函数 DATE_FORMAT(字段名,格式) 2) Django ORM中如何执行SQL原生语句 (1) models.Article.o ...

  2. Python的_文件操作

    打开文件:file_obj=open("文件路径","模式",“编码”’) 其中模式有: r,以只读方式打开文件(默认) w,打开一个文件只用于写入(不存在则创 ...

  3. Bash远程代码执行漏洞(CVE-2014-6271)案例分析

    Web服务器和CGI的关系 什么是WEB服务器(IIS.Nginx.Apache) WEB服务器也称为WWW(WORLD WIDE WEB)服务器,主要功能是提供网上信息浏览服务.(1)应用层使用HT ...

  4. 三色抽卡游戏 博弈论nim

    你的对手太坏了!在每年的年度三色抽卡游戏锦标赛上,你的对手总是能打败你,他的秘诀是什么? 在每局三色抽卡游戏中,有n个卡组,每个卡组里所有卡片的颜色都相同,且颜色只会是红(R).绿(G).蓝(B)中的 ...

  5. 使用git工具上传自己的程序到github上

    一:前期准备 可以运行的项目 github账号 git工具 二:开始操作 1.创建个人github仓库 写自己项目的名字,描述,权限,README 2.新建结束后会进入如下界面 3.复制仓库地址 4. ...

  6. Linux下的Sreen命令使用

    详细的介绍请参看:http://www.cnblogs.com/mchina/archive/2013/01/30/2880680.html 一.简介 GNU Screen是一款由GNU计划开发的用于 ...

  7. Java大数相乘-hdu1063

    题目链接:http://acm.hdu.edu.cn/showproblem.php?pid=1063 题目描述: 代码实现: import java.util.Scanner; import jav ...

  8. CodeForces 433C Ryouko's Memory Note (中位数定理)

    <题目链接> 题目大意:给你一堆数字,允许你修改所有相同的数字成为别的数字,不过只能修改一次,问你修改后序列相邻数字的距离和最小是多少. 解题分析: 首先,修改不是任意的,否则那样情况太多 ...

  9. HDU 3749 Financial Crisis (点双连通+并查集)

    <题目连接> 题目大意: 给你一个(保证输入无重边,无自环)无向图,然后有下面Q条询问,每条询问为:问你u点与v点之间有几条(除了首尾两点外,其他点不重复)的路径.如果有0条或1条输出0或 ...

  10. mysql(三) 数据表的基本操作操作

    mysql(三) 数据表的基本操作操作 创建表,曾删改查,主键,外键,基本数据类型. 1. 创建表 create table 表名( 列名 类型 是否可以为空, 列名 类型 是否可以为空 )ENGIN ...