-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
10 changed files
with
123 additions
and
68 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,18 @@ | ||
.img-container{ | ||
/*width:; | ||
height:200px; | ||
left:0; | ||
top:0; | ||
z-index:-1;*/ | ||
text-align: center; | ||
margin: 10px; | ||
} | ||
|
||
.image{ | ||
max-width:100%; | ||
max-height:100%; | ||
} | ||
|
||
#setting{ | ||
text-align: center; | ||
} |
File renamed without changes.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,7 @@ | ||
.sections{ | ||
top:50%; | ||
left: 50%; | ||
position: absolute; | ||
text-align: center; | ||
transform: translate(-50%,-50%); | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,69 @@ | ||
<!DOCTYPE html> | ||
<html> | ||
|
||
<head> | ||
<meta charset="UTF-8"> | ||
<title>Scatter</title> | ||
</head> | ||
<link href="../assets/fromInage.css" rel="stylesheet" type="text/css"/> | ||
<link href="../assets/h5range.css" rel="stylesheet" type="text/css"/> | ||
<link href="../assets/common.css" rel="stylesheet" type="text/css"/> | ||
<body onresize="resize()"> | ||
<h1>Scatter</h1> | ||
|
||
<div id="setting"> | ||
<input class="button" id="img_input" type="file" onchange="newImage(this)" accept="image/*"/> | ||
<label for="img_input">选择图片</label> | ||
<input type="button" id="hide" class="button" value="hide image" onclick="document.getElementById('image').style.display='none';"> | ||
<label for="hide">隐</label> | ||
<input type="button" id="show" class="button" value="show image" onclick="document.getElementById('image').style.display='';"> | ||
<label for="show">显</label> | ||
|
||
<button class="button" id="save" onclick="saveImage()"></button> | ||
<label for="save">保存</label> | ||
|
||
<div class = "setWidth"> | ||
<input type="range" name="width" min="1" max="100" value="1" onchange="aboutWidth('set',this.value)"> | ||
调整宽度 | ||
</div> | ||
<div class = "setLength"> | ||
<input type="range" name="length" min="1" max="100" value="1" onchange="aboutLength('set',this.value)"> | ||
调整长度 | ||
</div> | ||
<div class = "setSpeed"> | ||
<input type="range" name="length" min="3" max="20" value="3" onchange="setSpeed(this.value)"> | ||
调整速度 | ||
</div> | ||
</div> | ||
|
||
<div class="img-container"> | ||
<img class="image" id="image" onload="load()" /> | ||
</div> | ||
<div class="img-container" id="canvasContainer"> | ||
<canvas id="Canvas" class="image" ></canvas> | ||
</div> | ||
<p hidden><canvas id="img_output"></canvas></p> | ||
|
||
<script> | ||
// You can also require other files to run in this process | ||
require('./renderer.js') | ||
require('./Canvas.js') | ||
function load(){ | ||
//document.getElementById('image').style.display='none'; | ||
readimg(); | ||
} | ||
</script> | ||
<script type="text/javascript" src="../js/Canvas.js" ></script> | ||
<script type="text/javascript" src="../js/readImage.js" ></script> | ||
|
||
</body> | ||
|
||
<footer> | ||
<div class="links"> | ||
<p class="link" id="closeWindow">Close</p> | ||
</div> | ||
|
||
<script type="text/javascript" src="../js/window.js" ></script> | ||
</footer> | ||
|
||
</html> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,60 +1,28 @@ | ||
<!DOCTYPE html> | ||
<html> | ||
|
||
<link href="assets/index.css" rel="stylesheet" type="text/css"/> | ||
<link href="assets/common.css" rel="stylesheet" type="text/css"/> | ||
<head> | ||
<meta charset="UTF-8"> | ||
<title>Scatter</title> | ||
</head> | ||
<link href="index.css" rel="stylesheet" type="text/css"/> | ||
<link href="h5range.css" rel="stylesheet" type="text/css"/> | ||
<body onresize="resize()"> | ||
<h1>Welcome to Scatter</h1> | ||
|
||
<div id="setting"> | ||
<input class="button" id="img_input" type="file" onchange="newImage(this)" accept="image/*"/> | ||
<label for="img_input">选择图片</label> | ||
<input type="button" id="hide" class="button" value="hide image" onclick="document.getElementById('image').style.display='none';"> | ||
<label for="hide">隐</label> | ||
<input type="button" id="show" class="button" value="show image" onclick="document.getElementById('image').style.display='';"> | ||
<label for="show">显</label> | ||
|
||
<button class="button" id="save" onclick="saveImage()"></button> | ||
<label for="save">保存</label> | ||
|
||
<div class = "setWidth"> | ||
<input type="range" name="width" min="1" max="100" value="1" onchange="aboutWidth('set',this.value)"> | ||
调整宽度 | ||
</div> | ||
<div class = "setLength"> | ||
<input type="range" name="length" min="1" max="100" value="1" onchange="aboutLength('set',this.value)"> | ||
调整长度 | ||
</div> | ||
<div class = "setSpeed"> | ||
<input type="range" name="length" min="3" max="20" value="3" onchange="setSpeed(this.value)"> | ||
调整速度 | ||
</head> | ||
<body > | ||
<div class="sections"> | ||
<div class="start"> | ||
<input type="button" class="button" id="fromImageEntry" onclick="location.href='html/fromImage.html';"> | ||
<label for="fromImageEntry">从图片绘制</label> | ||
</div> | ||
</div> | ||
</body> | ||
|
||
<div class="img-container"> | ||
<img class="image" id="image" onload="load()" /> | ||
</div> | ||
<div class="img-container" id="canvasContainer"> | ||
<canvas id="Canvas" class="image" ></canvas> | ||
<footer> | ||
<div class="links"> | ||
<p class="link" id="closeWindow">Close</p> | ||
</div> | ||
<p hidden><canvas id="img_output"></canvas></p> | ||
|
||
<script> | ||
// You can also require other files to run in this process | ||
require('./renderer.js') | ||
require('./Canvas.js') | ||
function load(){ | ||
//document.getElementById('image').style.display='none'; | ||
readimg(); | ||
} | ||
</script> | ||
<script type="text/javascript" src="Canvas.js" ></script> | ||
<script type="text/javascript" src="readImage.js" ></script> | ||
|
||
</body> | ||
<script type="text/javascript" src="js/window.js" ></script> | ||
</footer> | ||
|
||
</html> |
File renamed without changes.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,4 +1,3 @@ | ||
|
||
function newImage(image){ | ||
var file = image.files[0]; | ||
|
||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,6 @@ | ||
const remote = require('electron').remote; | ||
|
||
document.getElementById("closeWindow").addEventListener("click", function (e) { | ||
var window = remote.getCurrentWindow(); | ||
window.close(); | ||
}); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters