Removed shapes, fixes #69

This commit is contained in:
Devine Lu Linvega 2019-07-22 15:56:35 +09:00
parent 8f54f954d2
commit b694d6c8db
14 changed files with 7 additions and 10 deletions

View File

@ -16,7 +16,7 @@ body { margin:0px; padding:0px; overflow:hidden; font-family:"input_mono_regular
#ronin.hidden canvas#surface, #ronin.hidden canvas#guide { left:0; } #ronin.hidden canvas#surface, #ronin.hidden canvas#guide { left:0; }
#ronin.hidden #wrapper #commander { margin-left:calc(-40vw - 30px); } #ronin.hidden #wrapper #commander { margin-left:calc(-40vw - 30px); }
#ronin canvas#surface,#ronin canvas#guide { left:40vw; } #ronin canvas#surface,#ronin canvas#guide { left:calc(40vw + 30px); }
#ronin canvas#guide { background:none; } #ronin canvas#guide { background:none; }
#ronin canvas#surface { border-radius: 2px } #ronin canvas#surface { border-radius: 2px }

View File

@ -82,7 +82,7 @@ function Surface (ronin) {
} else if (isSvg(shape)) { } else if (isSvg(shape)) {
this.traceSVG(shape, context) this.traceSVG(shape, context)
} else { } else {
console.warn('Unknown type') console.warn('Unknown type', shape)
} }
} }
@ -236,18 +236,18 @@ function Surface (ronin) {
} }
function isRect (shape) { function isRect (shape) {
return shape.x && shape.y && shape.w && shape.h return !isNaN(shape.x) && !isNaN(shape.y) && !isNaN(shape.w) && !isNaN(shape.h)
} }
function isCircle (shape) { function isCircle (shape) {
return shape.cx && shape.cy && shape.r return !isNaN(shape.cx) && !isNaN(shape.cy) && !isNaN(shape.r)
} }
function isSvg (shape) { function isSvg (shape) {
return shape.d return shape.d
} }
function isText (shape) { function isText (shape) {
return shape.x && shape.y && shape.p && shape.t && shape.f return !isNaN(shape.x) && !isNaN(shape.y) && !isNaN(shape.p) && shape.t && shape.f
} }
function isLine (shape) { function isLine (shape) {
return shape.a && shape.a.x && shape.a.y && shape.b && shape.b.x && shape.b.y return shape.a && !isNaN(shape.a.x) && !isNaN(shape.a.y) && shape.b && !isNaN(shape.b.x) && !isNaN(shape.b.y)
} }
} }

View File

@ -1,7 +1,4 @@
; saturate image ; saturate image
(open "../static/crystal.jpg") (open "../static/crystal.jpg")
(pixels (pixels
(frame) (frame) saturation 12)
saturation
12)