Skip to content

Commit 9a5ebfb

Browse files
authored
Update palette.js
1 parent 945a179 commit 9a5ebfb

File tree

1 file changed

+0
-37
lines changed

1 file changed

+0
-37
lines changed

palette.js

-37
Original file line numberDiff line numberDiff line change
@@ -242,15 +242,6 @@
242242
return this;
243243
};
244244

245-
/*
246-
const gradient = paper.conic_gradient({
247-
degree: 0,
248-
x: 50,
249-
y: 50,
250-
stops: '0,red 0.25,orange 0.5,yellow 0.75,green 1,blue'
251-
});
252-
paper.rect({ x: 0, y: 0, width: 100, height: 100, fill: gradient });
253-
*/
254245
Palette.prototype.conic_gradient = function (settings) {
255246
const ctx = this.context;
256247
const gradient = ctx.createConicGradient(settings.degree * Math.PI / 180, settings.x, settings.y);
@@ -261,16 +252,6 @@
261252
return gradient;
262253
};
263254

264-
/*
265-
const gradient = paper.linear_gradient({
266-
x1: 0,
267-
y1: 0,
268-
x2: 100,
269-
y2: 0,
270-
stops: '0,red 0.25,orange 0.5,yellow 0.75,green 1,blue'
271-
});
272-
paper.rect({ x: 0, y: 0, width: 100, height: 100, fill: gradient });
273-
*/
274255
Palette.prototype.linear_gradient = function (settings) {
275256
const ctx = this.context;
276257
const gradient = ctx.createLinearGradient(settings.x1, settings.y1, settings.x2, settings.y2);
@@ -281,18 +262,6 @@
281262
return gradient;
282263
};
283264

284-
/*
285-
const gradient = paper.radial_gradient({
286-
x1: 50,
287-
y1: 50,
288-
r1: 0,
289-
x2: 50,
290-
y2: 50,
291-
r2: 50,
292-
stops: '0,red 0.25,orange 0.5,yellow 0.75,green 1,blue'
293-
});
294-
paper.rect({ x: 0, y: 0, width: 100, height: 100, fill: gradient });
295-
*/
296265
Palette.prototype.radial_gradient = function (settings) {
297266
const ctx = this.context;
298267
const gradient = ctx.createRadialGradient(settings.x1, settings.y1, settings.r1, settings.x2, settings.y2, settings.r2);
@@ -303,19 +272,13 @@
303272
return gradient;
304273
};
305274

306-
// export the canvas as a DataURL image, returning a string with the DataURL image. Both arguments are optional.
307-
// Supported type: 'image/png', 'image/jpeg', 'image/webp'
308-
// quality is applied only if type is jpeg or webp, and must be between 0.0 and 1.0
309275
Palette.prototype.toDataURL = function (settings) {
310276
settings = settings || {};
311277
const type = settings.type || 'image/png';
312278
const quality = settings.quality || 1.0;
313279
return this.canvas.toDataURL(type, quality);
314280
};
315281

316-
// export the canvas as a blob image. You must pass a callback function, because this method is a void.
317-
// Supported type: 'image/png', 'image/jpeg', 'image/webp'
318-
// quality is applied only if type is jpeg or webp, and must be between 0.0 and 1.0
319282
Palette.prototype.toBlob = function (settings, callback) {
320283
settings = settings || {};
321284
const type = settings.type || 'image/png';

0 commit comments

Comments
 (0)