Module: ScreenshotController

Screenshot capturing logic.
Author:
  • Radim Brnka
Source:

Methods

(static) takeScreenshot(canvas, fractalApp, accentColor)

Generates screenshot of the canvas, adds watermark and emulates link click to download the file.
Parameters:
Name Type Description
canvas HTMLCanvasElement
fractalApp FractalRenderer
accentColor string
Source:

(inner) drawRoundRect(ctx, x, y, width, height, radius)

Draws rectangle with rounded borders
Parameters:
Name Type Description
ctx CanvasRenderingContext2D
x number
y number
width number
height number
radius number
Source:

(inner) getFilename() → {string}

Generates filename based on current timestamp
Source:
Returns:
Type
string

(inner) getWatermarkText(fractalApp) → {string}

Returns watermark text that fits current fractal type and its properties.
Parameters:
Name Type Description
fractalApp FractalRenderer
Source:
Returns:
Type
string