2021-01-15 03:50:56 +03:00
|
|
|
new Tool('eraser', {
|
2021-06-30 23:17:08 +03:00
|
|
|
cursor: 'none',
|
2021-01-15 03:50:56 +03:00
|
|
|
brushPreview: true,
|
|
|
|
});
|
|
|
|
new Tool('resizeeraser', {
|
|
|
|
cursor: 'default',
|
|
|
|
});
|
|
|
|
|
|
|
|
new Tool('eyedropper', {
|
|
|
|
imageCursor: 'eyedropper',
|
|
|
|
});
|
|
|
|
|
|
|
|
new Tool('fill', {
|
|
|
|
imageCursor: 'fill',
|
|
|
|
});
|
|
|
|
|
|
|
|
new Tool('line', {
|
2021-06-30 23:17:08 +03:00
|
|
|
cursor: 'none',
|
2021-01-15 03:50:56 +03:00
|
|
|
brushPreview: true,
|
|
|
|
});
|
|
|
|
new Tool('resizeline', {
|
|
|
|
cursor: 'default',
|
|
|
|
});
|
|
|
|
|
|
|
|
new Tool('pan', {
|
|
|
|
cursor: function () {
|
|
|
|
if (dragging) return 'url(\'/pixel-editor/pan-held.png\'), auto';
|
|
|
|
else return 'url(\'/pixel-editor/pan.png\'), auto';
|
|
|
|
},
|
|
|
|
});
|
|
|
|
|
|
|
|
new Tool('pencil', {
|
2021-06-30 23:17:08 +03:00
|
|
|
cursor: 'none',
|
2021-01-15 03:50:56 +03:00
|
|
|
brushPreview: true,
|
|
|
|
});
|
|
|
|
new Tool('resizebrush', {
|
|
|
|
cursor: 'default',
|
|
|
|
});
|
|
|
|
|
|
|
|
new Tool('rectangle', {
|
2021-06-30 23:17:08 +03:00
|
|
|
cursor: 'none',
|
2021-01-15 03:50:56 +03:00
|
|
|
brushPreview: true,
|
|
|
|
});
|
2021-04-28 23:35:26 +03:00
|
|
|
new Tool('ellipse', {
|
2021-06-30 23:17:08 +03:00
|
|
|
cursor: 'none',
|
2021-04-28 23:35:26 +03:00
|
|
|
brushPreview: true,
|
|
|
|
});
|
2021-01-15 03:50:56 +03:00
|
|
|
new Tool('resizerectangle', {
|
|
|
|
cursor: 'default',
|
|
|
|
});
|
|
|
|
|
|
|
|
new Tool('rectselect', {
|
|
|
|
cursor: 'crosshair',
|
|
|
|
brushPreview: true,
|
|
|
|
});
|
|
|
|
|
|
|
|
|
|
|
|
new Tool('moveselection', {
|
|
|
|
cursor: 'crosshair',
|
|
|
|
});
|
|
|
|
|
|
|
|
new Tool('zoom', {
|
|
|
|
imageCursor: 'zoom-in',
|
|
|
|
});
|
|
|
|
|
|
|
|
//set a default tool
|
|
|
|
var currentTool = tool.pencil;
|
|
|
|
var currentToolTemp = tool.pencil;
|