Comparing version 0.0.11 to 0.0.12
@@ -50,5 +50,3 @@ "use strict"; | ||
currentViewport = viewport; | ||
ctx.fillStyle = style.colors.background; | ||
ctx.fillRect(0, 0, canvas.width, canvas.height); | ||
renderer_1.render(ctx, style, viewport, trees); | ||
renderer_1.render(ctx, canvas.width, canvas.height, style, viewport, trees); | ||
} | ||
@@ -55,0 +53,0 @@ } |
import { Node } from "../data/tree-node"; | ||
import { TreeStyle } from "../design/style"; | ||
import { Viewport } from "./viewport/viewport"; | ||
export declare function render(ctx: CanvasRenderingContext2D, style: TreeStyle, viewport: Viewport, trees: Node[]): void; | ||
export declare function render(ctx: CanvasRenderingContext2D, width: number, height: number, style: TreeStyle, viewport: Viewport, trees: Node[]): void; |
@@ -6,3 +6,5 @@ "use strict"; | ||
const projected_context_1 = require("./viewport/projected-context"); | ||
function render(ctx, style, viewport, trees) { | ||
function render(ctx, width, height, style, viewport, trees) { | ||
ctx.fillStyle = style.colors.background; | ||
ctx.fillRect(0, 0, width, height); | ||
const projectedContext = new projected_context_1.ProjectedRenderingContext2D(ctx, viewport); | ||
@@ -9,0 +11,0 @@ let x = tree_1.HORIZONTAL_TREE_SPACING; |
@@ -96,5 +96,5 @@ "use strict"; | ||
const viewport = new viewport_1.Viewport(width, height, startX, startY, scale); | ||
renderer_1.render(ctx, style, viewport, trees); | ||
renderer_1.render(ctx, width, height, style, viewport, trees); | ||
return save(); | ||
}, | ||
}; |
{ | ||
"name": "ferns", | ||
"version": "0.0.11", | ||
"version": "0.0.12", | ||
"author": "Francois Wouts", | ||
@@ -5,0 +5,0 @@ "license": "MIT", |
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
167153