\r
// boxes.js\r
export interface BBox {\r
- new (element?: Element)\r
+ new (element?: Element): BBox;\r
height: number;\r
width: number;\r
y: number;\r
cy: number;\r
merge(bbox: BBox): BBox;\r
}\r
- export interface RBox extends BBox { }\r
- export interface TBox extends BBox { }\r
+ export interface RBox extends BBox {\r
+ new (element?: Element): RBox;\r
+ }\r
+ export interface TBox extends BBox {\r
+ new (element?: Element): TBox;\r
+ }\r
interface Container {\r
bbox(): BBox;\r
rbox(): RBox;\r
}\r
\r
// clip.js\r
- export interface ClipPath extends Container { }\r
+ export interface ClipPath extends Container {\r
+ new (): ClipPath;\r
+ }\r
interface Container {\r
clip(): ClipPath;\r
}\r
\r
// color.js\r
export interface Color {\r
+ new (): Color;\r
new (color: string): Color;\r
new (color: Color): Color;\r
r: number;\r
\r
// container.js\r
export interface Container extends Parent {\r
+ new (): Container;\r
viewbox(): ViewBox;\r
viewbox(v): this;\r
}\r
}\r
\r
// defs.js\r
- export interface Defs extends Container { }\r
+ export interface Defs extends Container {\r
+ new (): Defs;\r
+ }\r
interface Library { Defs: Defs }\r
\r
// doc.js\r
export interface Doc extends Container {\r
+ new (): Doc;\r
new (selector: string): Doc;\r
new (domElement: HTMLElement): Doc;\r
namespace(): this;\r
spof(spof): this;\r
remove(): this;\r
}\r
- interface Library {\r
- Doc: Dec;\r
- }\r
+ interface Library { Doc: Doc; }\r
\r
// element.js\r
export interface Element {\r
+ new (): Element;\r
node: LinkedHTMLElement;\r
type: string;\r
\r
size(width: any, height: any): this;\r
radius(x: number, y?: number): this;\r
}\r
- export interface Circle extends CircleMethods { }\r
- export interface Ellipse extends CircleMethods { }\r
+ export interface Circle extends CircleMethods {\r
+ new (): Circle;\r
+ }\r
+ export interface Ellipse extends CircleMethods {\r
+ new (): Ellipse;\r
+ }\r
interface Container {\r
circle(size?: any): Circle;\r
ellipse(width?: any, height?: any): Ellipse;\r
\r
// gradient.js\r
export interface Stop extends Element {\r
+ new (): Stop;\r
update(offset?: number | _Number, color?: any, opacity?: number | _Number): this;\r
update(opts: { color: string | Color, offset: number | _Number, opacity: number | _Number }): this;\r
}\r
export interface Gradient extends Container {\r
- new (type: string): Gradient;\r
+ new (type?: string): Gradient;\r
at(offset?: number | _Number, color?: any, opacity?: number | _Number): Stop;\r
at(opts: { color: string | Color, offset: number | _Number, opacity: number | _Number }): Stop;\r
update(block?: Function): this;\r
\r
// group.js\r
export interface G extends Container {\r
+ new (): G;\r
gbox(): BBox;\r
}\r
interface Container { group(): G; }\r
\r
// hyperlink.js\r
export interface A extends Container {\r
+ new (): A;\r
to(url: any): this;\r
show(target?: any): this;\r
target(target: any): this;\r
\r
// image.js\r
export interface Image extends Shape {\r
+ new (): Image;\r
load(url?: string): this;\r
loaded(cb: (image: Image, info: { width: number, height: number, ratio: number, url: string }) => any): this;\r
error(cb: (image: Image, info: { width: number, height: number, ratio: number, url: string }) => any): this;\r
\r
// line.js\r
export interface Line extends Shape {\r
+ new (): Line;\r
array(): PointArray;\r
plot(points: number[][]): this;\r
plot(x1: number, y1: number, x2: number, y2: number): this;\r
\r
// marker.js\r
export interface Marker extends Container {\r
+ new (): Marker;\r
ref(x, y): this;\r
update(block: (marker: Marker) => any): this;\r
toString(): string;\r
\r
// mask.js\r
export interface Mask extends Container {\r
+ new (): Mask;\r
targets: Element[];\r
}\r
interface Container { mask(): Mask; }\r
}\r
\r
// nested.js\r
- export interface Nested extends Container { }\r
+ export interface Nested extends Container {\r
+ new (): Nested;\r
+ }\r
interface Container { nested(): Nested; }\r
interface Library { Nested: Nested; }\r
\r
\r
// parent.js\r
export interface Parent extends Element {\r
+ new (): Parent;\r
children(): Element[];\r
add(element: Element, i?: number): this;\r
put(element: Element, i?: number): Element;\r
\r
// path.js\r
export interface Path extends Shape {\r
+ new (): Path;\r
morphArray: PathArray;\r
array(): PathArray;\r
plot(d: string): this;\r
// pathArray.js\r
interface PathArrayPoint extends Array<any> { }\r
export interface PathArray extends _Array {\r
+ new (): PathArray;\r
new (d: string): PathArray;\r
new (array: PathArrayPoint[]): PathArray;\r
move(x: number, y: number): this;\r
\r
// pattern.js\r
export interface Pattern extends Container {\r
+ new (): Pattern;\r
update(block: (pattern: Pattern) => any): this;\r
toString(): string;\r
}\r
export interface Point {\r
new (): Point;\r
new (position: ArrayPoint): Point;\r
- new (position: Point): Point;\r
+ new (point: Point): Point;\r
new (position: { x: number, y: number }): Point;\r
new (x: number, y: number): Point;\r
\r
\r
// pointArray.js\r
export interface PointArray extends _Array {\r
+ new (): PointArray;\r
new (points: string): PointArray;\r
new (points: ArrayPoint[]): PointArray;\r
toStirng(): string;\r
move(x: number, y: number): this;\r
size(width: number, height: number): this;\r
}\r
- export interface PolyLine extends poly { }\r
+ export interface PolyLine extends poly {\r
+ new (): PolyLine;\r
+ }\r
interface Library { PolyLine: PolyLine; }\r
interface Container {\r
polyLine(points: string): PolyLine;\r
polyLine(points: ArrayPoint[]): PolyLine;\r
}\r
- export interface Polygon extends poly { }\r
+ export interface Polygon extends poly {\r
+ new (): Polygon;\r
+ }\r
interface Library { Polygon: Polygon; }\r
interface Container {\r
polygon(points: string): Polygon;\r
}\r
\r
// rect.js\r
- export interface Rect extends Shape { }\r
+ export interface Rect extends Shape {\r
+ new (): Rect;\r
+ }\r
interface Library { Rect: Rect; }\r
interface Container {\r
rect(width?: number, height?: number): Rect;\r
interface Library { Set: Set; }\r
\r
// shape.js\r
- export interface Shape extends Element { }\r
+ export interface Shape extends Element {\r
+ new (): Shape;\r
+ }\r
interface Library { Shape: Shape; }\r
\r
// style.js\r
\r
// text.js\r
export interface Text extends Shape {\r
+ new (): Text;\r
clone(): Text;\r
text(): string;\r
text(text: any): this;\r
}\r
interface Library { Text: Text; }\r
export interface Tspan extends Shape {\r
+ new (): Tspan;\r
text(): string;\r
text(text: any): this;\r
dx(x: number): this;\r
interface Library { Tspan: Tspan; }\r
\r
// textpath.js\r
- export interface TextPath extends Parent { }\r
+ export interface TextPath extends Parent {\r
+ new (): TextPath;\r
+ }\r
interface Text {\r
path(d: any): this;\r
plot(d: any): this;\r
new (source: Transform, inversed?: boolean): Transformation;\r
at(pos: number): Matrix;\r
}\r
- export interface Translate extends Transformation { }\r
- export interface Rotate extends Transformation { }\r
- export interface Scale extends Transformation { }\r
- export interface Skew extends Transformation { }\r
+ export interface Translate extends Transformation {new (): Translate}\r
+ export interface Rotate extends Transformation {new (): Rotate}\r
+ export interface Scale extends Transformation {new (): Scale}\r
+ export interface Skew extends Transformation {new (): Skew}\r
interface Library {\r
Transformation: Transformation;\r
Translate: Translate;\r
\r
// use.js\r
export interface Use extends Shape {\r
+ new (): Use;\r
element(element: Element, file?: string): this;\r
}\r
interface Container {\r