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. 一起学Hadoop——使用自定义Partition实现hadoop部分排序

    排序在很多业务场景都要用到,今天本文介绍如何借助于自定义Partition类实现hadoop部分排序.本文还是使用java和python实现排序代码. 1.部分排序. 部分排序就是在每个文件中都是有序 ...

  2. Python_collections_namedtuple可命名元组

    namedtuple:用来构建带字段名的元组 import collections # 创建类,两种创建方法 MytupleClass = collections.namedtuple('Mytupl ...

  3. Flink--DateSet的Transformation简单操作

    flatMap函数 //初始化执行环境 val env: ExecutionEnvironment = ExecutionEnvironment.getExecutionEnvironment //加 ...

  4. day3逻辑运算符

    今天主讲逻辑运算符 以下是老师的大纲: # + - * / % ** // # == != <> # count = count + 1      count += 1 # count = ...

  5. linux定时任务相关

    定时任务所在文件夹 /etc/crontab 定时任务重启命令 service crond restart

  6. 数据库相关--net start mysql 服务无法启动(win7系统)解决

    系统:win7 旗舰版 64位 MySQL:8.0.11 家里台式机上不久之前安装了MySQL,一段时间没碰过后,突然启动不了了(我有一头小毛驴,我从来也不骑,有一天我心血来潮骑它去赶集) 先是在系统 ...

  7. SQL 2016 正式版 安装过程

    1.点击全新安装 2.接着就是下一步,下一步... 3.选择你要安装的功能    [可以利用PolyBase,使用标准TSQL查询hadoop数据,但这里我不需要装] 4.设置排序规则 5.设置登录用 ...

  8. re模块、hashlib模块

    一.re模块 1.什么是正则? 正则就是用一系列具有特殊含义的字符组成一套规则,该规则用来描述具有某一特征的字符串,正则就是用来去一个大的字符串中匹配出符合规则的子字符串 2.为何要用正则? 用户注册 ...

  9. 按字典序依次打印只由1~n组成的n位数

    //我的dfs入门.将1~n一次填入数组然后打印. #include<stdio.h> #include<string.h> ]; ]; void dfs(int,int); ...

  10. Squid快速入门(yum安装)

    加油站代理服务器 前言 Squid是一个Linux系统下优秀的代理服务器软件.Squid可以配置普通上网代理(正向代理).反向代理.透明代理.Squid接收用户的下载申请,并自动处理所下载的数据.当一 ...