mirror of
https://github.com/Investigamer/cardconjurer.git
synced 2025-07-27 05:14:53 -05:00
rotation
This commit is contained in:
@@ -441,12 +441,14 @@ function createBorder() {
|
|||||||
//Draw card art
|
//Draw card art
|
||||||
function drawPicture() {
|
function drawPicture() {
|
||||||
//scales the card art and draws it
|
//scales the card art and draws it
|
||||||
|
card.rotate(document.getElementById("imageRotation").value * Math.PI / 180);
|
||||||
var imageScale = document.getElementById("imageSize").value * 0.01
|
var imageScale = document.getElementById("imageSize").value * 0.01
|
||||||
var imageLeftShift = parseInt(document.getElementById("imageLeft").value)
|
var imageLeftShift = parseInt(document.getElementById("imageLeft").value)
|
||||||
var imageUpShift = parseInt(document.getElementById("imageUp").value)
|
var imageUpShift = parseInt(document.getElementById("imageUp").value)
|
||||||
if (imgArt.width > 0) {
|
if (imgArt.width > 0) {
|
||||||
card.drawImage(imgArt, artX - imageLeftShift, artY - imageUpShift, imgArt.width * imageScale, imgArt.height * imageScale)
|
card.drawImage(imgArt, artX - imageLeftShift, artY - imageUpShift, imgArt.width * imageScale, imgArt.height * imageScale)
|
||||||
}
|
}
|
||||||
|
card.rotate(document.getElementById("imageRotation").value * Math.PI / -180);
|
||||||
}
|
}
|
||||||
|
|
||||||
//Draw the set symbol
|
//Draw the set symbol
|
||||||
|
@@ -227,6 +227,8 @@
|
|||||||
<br/>
|
<br/>
|
||||||
Image Up
|
Image Up
|
||||||
<input id="imageUp" type="number" class="input" value="0" step="1">
|
<input id="imageUp" type="number" class="input" value="0" step="1">
|
||||||
|
Image Rotation
|
||||||
|
<input id="imageRotation" type="number" class="input" value="0" step="1" min="0" max="360">
|
||||||
</div>
|
</div>
|
||||||
<div class="cmm" id="cmm-info">
|
<div class="cmm" id="cmm-info">
|
||||||
Other Info
|
Other Info
|
||||||
|
Reference in New Issue
Block a user