-
-
Notifications
You must be signed in to change notification settings - Fork 620
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #83 from pshihn/optional-options
Optional options
- Loading branch information
Showing
33 changed files
with
158 additions
and
137 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,10 +1,10 @@ | ||
import { PatternFiller, RenderHelper } from './filler-interface'; | ||
import { Options, OpSet } from '../core'; | ||
import { ResolvedOptions, OpSet } from '../core'; | ||
import { Point } from '../geometry'; | ||
export declare class DotFiller implements PatternFiller { | ||
renderer: RenderHelper; | ||
constructor(renderer: RenderHelper); | ||
fillPolygon(points: Point[], o: Options): OpSet; | ||
fillEllipse(cx: number, cy: number, width: number, height: number, o: Options): OpSet; | ||
fillPolygon(points: Point[], o: ResolvedOptions): OpSet; | ||
fillEllipse(cx: number, cy: number, width: number, height: number, o: ResolvedOptions): OpSet; | ||
private dotsOnLines; | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,11 +1,11 @@ | ||
import { Options, OpSet, Op } from '../core'; | ||
import { ResolvedOptions, OpSet, Op } from '../core'; | ||
import { Point } from '../geometry'; | ||
export interface PatternFiller { | ||
fillPolygon(points: Point[], o: Options): OpSet; | ||
fillEllipse(cx: number, cy: number, width: number, height: number, o: Options): OpSet; | ||
fillPolygon(points: Point[], o: ResolvedOptions): OpSet; | ||
fillEllipse(cx: number, cy: number, width: number, height: number, o: ResolvedOptions): OpSet; | ||
} | ||
export interface RenderHelper { | ||
doubleLine(x1: number, y1: number, x2: number, y2: number, o: Options): Op[]; | ||
getOffset(min: number, max: number, ops: Options): number; | ||
ellipse(x: number, y: number, width: number, height: number, o: Options): OpSet; | ||
doubleLine(x1: number, y1: number, x2: number, y2: number, o: ResolvedOptions): Op[]; | ||
getOffset(min: number, max: number, ops: ResolvedOptions): number; | ||
ellipse(x: number, y: number, width: number, height: number, o: ResolvedOptions): OpSet; | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,8 +1,8 @@ | ||
import { Point, Line } from '../geometry'; | ||
import { Options } from '../core'; | ||
import { ResolvedOptions } from '../core'; | ||
import { RenderHelper } from './filler-interface'; | ||
export declare function lineLength(line: Line): number; | ||
export declare function getIntersectingLines(line: number[], points: Point[]): Point[]; | ||
export declare function affine(x: number, y: number, cx: number, cy: number, sinAnglePrime: number, cosAnglePrime: number, R: number): Point; | ||
export declare function hachureLinesForPolygon(points: Point[], o: Options): Line[]; | ||
export declare function hachureLinesForEllipse(cx: number, cy: number, width: number, height: number, o: Options, renderer: RenderHelper): Line[]; | ||
export declare function hachureLinesForPolygon(points: Point[], o: ResolvedOptions): Line[]; | ||
export declare function hachureLinesForEllipse(cx: number, cy: number, width: number, height: number, o: ResolvedOptions, renderer: RenderHelper): Line[]; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,3 +1,3 @@ | ||
import { Options } from '../core'; | ||
import { ResolvedOptions } from '../core'; | ||
import { PatternFiller, RenderHelper } from './filler-interface'; | ||
export declare function getFiller(renderer: RenderHelper, o: Options): PatternFiller; | ||
export declare function getFiller(renderer: RenderHelper, o: ResolvedOptions): PatternFiller; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,12 +1,12 @@ | ||
import { PatternFiller, RenderHelper } from './filler-interface'; | ||
import { Options, OpSet } from '../core'; | ||
import { ResolvedOptions, OpSet } from '../core'; | ||
import { Point } from '../geometry'; | ||
export declare class HachureFiller implements PatternFiller { | ||
renderer: RenderHelper; | ||
constructor(renderer: RenderHelper); | ||
fillPolygon(points: Point[], o: Options): OpSet; | ||
fillEllipse(cx: number, cy: number, width: number, height: number, o: Options): OpSet; | ||
protected _fillPolygon(points: Point[], o: Options, connectEnds?: boolean): OpSet; | ||
protected _fillEllipse(cx: number, cy: number, width: number, height: number, o: Options, connectEnds?: boolean): OpSet; | ||
fillPolygon(points: Point[], o: ResolvedOptions): OpSet; | ||
fillEllipse(cx: number, cy: number, width: number, height: number, o: ResolvedOptions): OpSet; | ||
protected _fillPolygon(points: Point[], o: ResolvedOptions, connectEnds?: boolean): OpSet; | ||
protected _fillEllipse(cx: number, cy: number, width: number, height: number, o: ResolvedOptions, connectEnds?: boolean): OpSet; | ||
private renderLines; | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,7 +1,7 @@ | ||
import { HachureFiller } from './hachure-filler'; | ||
import { Options, OpSet } from '../core'; | ||
import { ResolvedOptions, OpSet } from '../core'; | ||
import { Point } from '../geometry'; | ||
export declare class HatchFiller extends HachureFiller { | ||
fillPolygon(points: Point[], o: Options): OpSet; | ||
fillEllipse(cx: number, cy: number, width: number, height: number, o: Options): OpSet; | ||
fillPolygon(points: Point[], o: ResolvedOptions): OpSet; | ||
fillEllipse(cx: number, cy: number, width: number, height: number, o: ResolvedOptions): OpSet; | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,7 +1,7 @@ | ||
import { HachureFiller } from './hachure-filler'; | ||
import { Options, OpSet } from '../core'; | ||
import { ResolvedOptions, OpSet } from '../core'; | ||
import { Point } from '../geometry'; | ||
export declare class ZigZagFiller extends HachureFiller { | ||
fillPolygon(points: Point[], o: Options): OpSet; | ||
fillEllipse(cx: number, cy: number, width: number, height: number, o: Options): OpSet; | ||
fillPolygon(points: Point[], o: ResolvedOptions): OpSet; | ||
fillEllipse(cx: number, cy: number, width: number, height: number, o: ResolvedOptions): OpSet; | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Large diffs are not rendered by default.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Large diffs are not rendered by default.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Large diffs are not rendered by default.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Large diffs are not rendered by default.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.