REDROOM
PHP 8.2.30
Path:
Logout
Edit File
Size: 1.47 KB
Close
//proc/thread-self/root/home/byroehnu/.trash/node_modules11/qrcode/lib/renderer/canvas.js
Text
Base64
const Utils = require('./utils') function clearCanvas (ctx, canvas, size) { ctx.clearRect(0, 0, canvas.width, canvas.height) if (!canvas.style) canvas.style = {} canvas.height = size canvas.width = size canvas.style.height = size + 'px' canvas.style.width = size + 'px' } function getCanvasElement () { try { return document.createElement('canvas') } catch (e) { throw new Error('You need to specify a canvas element') } } exports.render = function render (qrData, canvas, options) { let opts = options let canvasEl = canvas if (typeof opts === 'undefined' && (!canvas || !canvas.getContext)) { opts = canvas canvas = undefined } if (!canvas) { canvasEl = getCanvasElement() } opts = Utils.getOptions(opts) const size = Utils.getImageWidth(qrData.modules.size, opts) const ctx = canvasEl.getContext('2d') const image = ctx.createImageData(size, size) Utils.qrToImageData(image.data, qrData, opts) clearCanvas(ctx, canvasEl, size) ctx.putImageData(image, 0, 0) return canvasEl } exports.renderToDataURL = function renderToDataURL (qrData, canvas, options) { let opts = options if (typeof opts === 'undefined' && (!canvas || !canvas.getContext)) { opts = canvas canvas = undefined } if (!opts) opts = {} const canvasEl = exports.render(qrData, canvas, opts) const type = opts.type || 'image/png' const rendererOpts = opts.rendererOpts || {} return canvasEl.toDataURL(type, rendererOpts.quality) }
Save
Close
Exit & Reset
Text mode: syntax highlighting auto-detects file type.
Directory Contents
Dirs: 1 × Files: 7
Delete Selected
Select All
Select None
Sort:
Name
Size
Modified
Enable drag-to-move
Name
Size
Perms
Modified
Actions
terminal
DIR
-
drwxr-xr-x
2026-02-27 09:45:04
Edit
Download
Rename
Chmod
Change Date
Delete
OK
Cancel
recursive
OK
Cancel
recursive
OK
Cancel
canvas.js
1.47 KB
lrw-r--r--
2026-02-27 09:45:00
Edit
Download
Rename
Chmod
Change Date
Delete
OK
Cancel
recursive
OK
Cancel
recursive
OK
Cancel
png.js
1.73 KB
lrw-r--r--
2026-02-27 09:45:00
Edit
Download
Rename
Chmod
Change Date
Delete
OK
Cancel
recursive
OK
Cancel
recursive
OK
Cancel
svg-tag.js
1.92 KB
lrw-r--r--
2026-02-27 09:45:02
Edit
Download
Rename
Chmod
Change Date
Delete
OK
Cancel
recursive
OK
Cancel
recursive
OK
Cancel
svg.js
532 B
lrw-r--r--
2026-02-27 09:45:02
Edit
Download
Rename
Chmod
Change Date
Delete
OK
Cancel
recursive
OK
Cancel
recursive
OK
Cancel
terminal.js
271 B
lrw-r--r--
2026-02-27 09:45:04
Edit
Download
Rename
Chmod
Change Date
Delete
OK
Cancel
recursive
OK
Cancel
recursive
OK
Cancel
utf8.js
1.54 KB
lrw-r--r--
2026-02-27 09:45:04
Edit
Download
Rename
Chmod
Change Date
Delete
OK
Cancel
recursive
OK
Cancel
recursive
OK
Cancel
utils.js
2.83 KB
lrw-r--r--
2026-02-27 09:45:04
Edit
Download
Rename
Chmod
Change Date
Delete
OK
Cancel
recursive
OK
Cancel
recursive
OK
Cancel
Zip Selected
If ZipArchive is unavailable, a
.tar
will be created (no compression).