Docjar: A Java Source and Docuemnt Enginecom.*    java.*    javax.*    org.*    all    new    plug-in

Quick Search    Search Deep

Source code: com/port80/graph/dot/impl/DotLine.java


1   //
2   // Copyright(c) 2002, Chris Leung
3   //
4   
5   package com.port80.graph.dot.impl;
6   
7   /** Wrapper of a dynamic allocated array of DotPoint.
8    */
9   public class DotLine {
10      double x1, y1, x2, y2;
11      public DotLine() {}
12      public DotLine(DotLine line) {
13          this.x1 = line.x1;
14          this.y1 = line.y1;
15          this.x2 = line.x2;
16          this.y2 = line.y2;
17      }
18      public DotLine(double x1, double y1, double x2, double y2) {
19          this.x1 = x1;
20          this.y1 = y1;
21          this.x2 = x2;
22          this.y2 = y2;
23      }
24      public void set(DotPoint a, DotPoint b) {
25          x1 = a.x;
26          y1 = a.y;
27          x2 = b.x;
28          y2 = b.y;
29      }
30  }
31