Press n or j to go to the next uncovered block, b, p or k for the previous block.
| 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 | 1x 1x 1x 1x 1x 1x 1x 1x 1x 1x 1x 1x 1x 1x 1x 1x 1x 1x 1x 1x 1x 1x 1x 1x 1x 1x 1x 1x 1x 1x 1x 1x 1x 1x 1x 1x 3052x 3052x 3052x 3052x 3052x 1x 1x 86813x 86813x 86813x 86813x 86813x 86813x 86813x 86813x 78544x 78544x 78544x 78544x 78544x 78544x 78544x 78544x 1x 1x 86813x 1x 1x 86813x 1x 1x 86813x 1x 1x 19x 1x 1x 15x 1x 1x 44725x 1x | /*----------------------------------------------------------------------+
| Title: LineElement.ts |
| A port of the software Geometry Applet by |
| Author: David E. Joyce |
| Department of Mathematics and Computer Science |
| Clark University |
| Worcester, MA 01610-1477 |
| U.S.A. |
| |
| http://aleph0.clarku.edu/~djoyce/home.html |
| djoyce@clarku.edu |
| |
| Date: February, 1996. Version 2.0.0 May, 1997. |
| TypeScript Port: 2019, Nelson Brown, brownnrl@gmail.com |
| https://www.nelsonbrown.net/ |
+----------------------------------------------------------------------*/
import {PointElement} from "../point/PointElement";
import {GeomElement} from "../GeomElement";
import {SlateCanvas} from "../../Slate";
interface ILineElementConstructor {
A : PointElement;
B : PointElement;
}
export class LineElement extends GeomElement {
protected _A : PointElement;
get A() : PointElement { return this._A; }
protected _B : PointElement;
get B() : PointElement { return this._B; }
constructor(ile?: ILineElementConstructor) {
super();
this.dimension = 1;
this._A = ile && ile.A || null;
this._B = ile && ile.B || null;
}
public drawEdge(c: HTMLCanvasElement, color?: string): void {
if (color == null) {
if (this.shouldHighlight) {
color = this.edgeHighlightColor;
} else {
color = this.edgeColor;
}
}
if (color == null) return;
let ctx = c.getContext("2d");
ctx.fillStyle = color;
ctx.beginPath();
ctx.moveTo(this._A.x, this._A.y);
ctx.lineTo(this._B.x, this._B.y);
ctx.stroke();
}
public drawFace(c: SlateCanvas): void {
}
public drawName(c: SlateCanvas): void {
}
public drawVertex(c: SlateCanvas): void {
}
public rotate(pivot: PointElement, ac: number, as: number): void {
}
public translate(dx: number, dy: number): void {
}
public update(): void {
}
}
|