mirror of
https://github.com/Investigamer/cardconjurer.git
synced 2025-07-27 05:14:53 -05:00
tuning
This commit is contained in:
@@ -13,16 +13,16 @@ imgTitleMask.src = borderPath + "titleMask.png"
|
|||||||
var titleFont = "40px belerenb" //40
|
var titleFont = "40px belerenb" //40
|
||||||
var titleFontSpacing = "0.15px" //0.15
|
var titleFontSpacing = "0.15px" //0.15
|
||||||
var titleX = 62 //62
|
var titleX = 62 //62
|
||||||
var titleY = 62 //56 + 6
|
var titleY = 61 //56 + 6
|
||||||
//Mana Cost
|
//Mana Cost
|
||||||
var manaCostRadius = 17.5 //17.5
|
var manaCostRadius = 17.5 //17.5
|
||||||
var manaCostX = 657 //657
|
var manaCostX = 658 //657
|
||||||
var manaCostY = 59 //59
|
var manaCostY = 59 //59
|
||||||
//Card Type
|
//Card Type
|
||||||
var typeFont = "33.5px belerenb" //33.5
|
var typeFont = "33.5px belerenb" //33.5
|
||||||
var typeFontSpacing = "0.05px" //0.05
|
var typeFontSpacing = "-0.4px" //0.05
|
||||||
var typeX = 62 //62
|
var typeX = 62 //62
|
||||||
var typeY = 601 //595 + 6
|
var typeY = 600 //595 + 6
|
||||||
//Rules/Flavor Text
|
//Rules/Flavor Text
|
||||||
var textFont = "px mplantin"
|
var textFont = "px mplantin"
|
||||||
var textFontSpacing = 0.7 //0.7
|
var textFontSpacing = 0.7 //0.7
|
||||||
@@ -36,12 +36,12 @@ var ptTextX = 645 //645
|
|||||||
var ptTextY = 942 //936 + 6
|
var ptTextY = 942 //936 + 6
|
||||||
imgBorderCreature.imgValues(571, 929, 137, 75)
|
imgBorderCreature.imgValues(571, 929, 137, 75)
|
||||||
//Bottom Info
|
//Bottom Info
|
||||||
var infoY = 999 //993 + 6
|
var infoY = 996 //993 + 6
|
||||||
//Set Symbol
|
//Set Symbol
|
||||||
var setSymbolY = 616 //616
|
var setSymbolY = 618 //616
|
||||||
var setSymbolRight = 693 //693
|
var setSymbolRight = 688 //693
|
||||||
var setSymbolWidth = 84 //77
|
var setSymbolWidth = 84 //77
|
||||||
var setSymbolHeight = 44 //44
|
var setSymbolHeight = 42 //44
|
||||||
//Watermark
|
//Watermark
|
||||||
var watermarkWidth = 520 //520
|
var watermarkWidth = 520 //520
|
||||||
var watermarkHeight = 250 //250
|
var watermarkHeight = 250 //250
|
||||||
|
@@ -354,10 +354,6 @@ function createBorder() {
|
|||||||
}
|
}
|
||||||
if (document.getElementById("checkboxFlipTip").checked == true) {
|
if (document.getElementById("checkboxFlipTip").checked == true) {
|
||||||
border.drawImage(imgBorderFlipTip, imgBorderFlipTip.imgX, imgBorderFlipTip.imgY, imgBorderFlipTip.imgW, imgBorderFlipTip.imgH)
|
border.drawImage(imgBorderFlipTip, imgBorderFlipTip.imgX, imgBorderFlipTip.imgY, imgBorderFlipTip.imgW, imgBorderFlipTip.imgH)
|
||||||
border.fillStyle="#666"
|
|
||||||
canvas.style.letterSpacing = "0px"
|
|
||||||
border.font = "28px belerenb"
|
|
||||||
border.fillText(document.getElementById("inputFlipTip").value, 688 - border.measureText(document.getElementById("inputFlipTip").value).width, 880 + textBaselineShift)
|
|
||||||
}
|
}
|
||||||
if (document.getElementById("checkboxFlipIcon").checked == true || document.getElementById("checkboxFlippedDark").checked == true) {
|
if (document.getElementById("checkboxFlipIcon").checked == true || document.getElementById("checkboxFlippedDark").checked == true) {
|
||||||
titleRightShift = 50
|
titleRightShift = 50
|
||||||
@@ -579,33 +575,42 @@ function writeText() {
|
|||||||
card.font = document.getElementById("textSize").value + textFont
|
card.font = document.getElementById("textSize").value + textFont
|
||||||
var text = document.getElementById("inputText").value
|
var text = document.getElementById("inputText").value
|
||||||
drawText(text, textX, textY)
|
drawText(text, textX, textY)
|
||||||
|
//Flip Tip?
|
||||||
|
if (document.getElementById("checkboxFlipTip").checked == true && flipBorder == true) {
|
||||||
|
card.textAlign = "right"
|
||||||
|
card.fillStyle="#666"
|
||||||
|
canvas.style.letterSpacing = "0px"
|
||||||
|
card.font = "28px belerenb"
|
||||||
|
card.fillText(document.getElementById("inputFlipTip").value, 688, 886 + textBaselineShift)
|
||||||
|
card.textAlign = "left"
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
//Bottom info on M15 cards
|
//Bottom info on M15 cards
|
||||||
function bottomInfoM15() {
|
function bottomInfoM15() {
|
||||||
card.fillStyle = document.getElementById("inputInfoColor").value
|
card.fillStyle = document.getElementById("inputInfoColor").value
|
||||||
var shiftInfo = 442
|
var shiftInfo = 446
|
||||||
canvas.style.letterSpacing = "0.8px"
|
canvas.style.letterSpacing = "1.5px"
|
||||||
card.font = "19.5px relaymedium"
|
card.font = "19px relaymedium"
|
||||||
var bottomLine = document.getElementById("inputSet").value + " \u00b7 " + document.getElementById("inputLanguage").value
|
var bottomLine = document.getElementById("inputSet").value + " \u00b7 " + document.getElementById("inputLanguage").value
|
||||||
card.fillText(bottomLine, 48, infoY + textBaselineShift)
|
card.fillText(bottomLine, 48, infoY + textBaselineShift)
|
||||||
var artistBrushShift = card.measureText(bottomLine).width + 58
|
var artistBrushShift = card.measureText(bottomLine).width + 58
|
||||||
imgArtistBrush.imgValues(artistBrushShift, infoY + 5, 21, 13)
|
imgArtistBrush.imgValues(artistBrushShift, infoY + 1, 21, 13)
|
||||||
card.mask("imgArtMask,source-over", imgArtistBrush, card.fillStyle)
|
card.mask("imgArtMask,source-over", imgArtistBrush, card.fillStyle)
|
||||||
canvas.style.letterSpacing = "1.3px"
|
card.font = "18px relaymedium"
|
||||||
card.font = "19.5px relaymedium"
|
canvas.style.letterSpacing = "2px"
|
||||||
if (card.measureText(document.getElementById("inputNumber").value).width > artistBrushShift - 58) {
|
if (card.measureText(document.getElementById("inputNumber").value).width > artistBrushShift - 58) {
|
||||||
artistBrushShift = card.measureText(document.getElementById("inputNumber").value).width + 58
|
artistBrushShift = card.measureText(document.getElementById("inputNumber").value).width + 58
|
||||||
}
|
}
|
||||||
card.fillText(document.getElementById("inputNumber").value, 49, infoY - 20 + textBaselineShift)
|
card.fillText(document.getElementById("inputNumber").value, 49, infoY - 20 + textBaselineShift)
|
||||||
card.fillText(document.getElementById("inputRarity").value, artistBrushShift - 1, infoY - 20 + textBaselineShift)
|
card.fillText(document.getElementById("inputRarity").value, artistBrushShift - 1, infoY - 20 + textBaselineShift)
|
||||||
if (442 < artistBrushShift + card.measureText(document.getElementById("inputRarity").value).width && document.getElementById("checkboxCreature").checked == false) {
|
if (446 < artistBrushShift + card.measureText(document.getElementById("inputRarity").value).width && document.getElementById("checkboxCreature").checked == false) {
|
||||||
shiftInfo = artistBrushShift + card.measureText(document.getElementById("inputRarity").value).width + 5
|
shiftInfo = artistBrushShift + card.measureText(document.getElementById("inputRarity").value).width + 5
|
||||||
}
|
}
|
||||||
canvas.style.letterSpacing = "-0.1px"
|
canvas.style.letterSpacing = "-0.1px"
|
||||||
card.font = "24px matrixbsc"
|
card.font = "22px matrixbsc"
|
||||||
card.fillText(document.getElementById("inputArtist").value, artistBrushShift + 21, infoY + 2 + textBaselineShift)
|
card.fillText(document.getElementById("inputArtist").value, artistBrushShift + 21, infoY - 1 + textBaselineShift)
|
||||||
if (442 < artistBrushShift + 21 + card.measureText(document.getElementById("inputArtist").value).width && document.getElementById("checkboxCreature").checked == true) {
|
if (446 < artistBrushShift + 21 + card.measureText(document.getElementById("inputArtist").value).width && document.getElementById("checkboxCreature").checked == true) {
|
||||||
shiftInfo = artistBrushShift + card.measureText(document.getElementById("inputArtist").value).width + 26
|
shiftInfo = artistBrushShift + card.measureText(document.getElementById("inputArtist").value).width + 26
|
||||||
}
|
}
|
||||||
//This is where "CC —" is hardcoded. The only reason is to prevent users from easily typing in the trademark and copyright that's usually on real cards. It's also there so I can see if a card was created with my program, it makes me feel good :)
|
//This is where "CC —" is hardcoded. The only reason is to prevent users from easily typing in the trademark and copyright that's usually on real cards. It's also there so I can see if a card was created with my program, it makes me feel good :)
|
||||||
@@ -619,7 +624,7 @@ function bottomInfoM15() {
|
|||||||
bottomInfo = "\u2122 & \u00a9 " + year + " Wizards of the Coast"
|
bottomInfo = "\u2122 & \u00a9 " + year + " Wizards of the Coast"
|
||||||
}
|
}
|
||||||
if (document.getElementById("checkboxCreature").checked == true) {
|
if (document.getElementById("checkboxCreature").checked == true) {
|
||||||
card.fillText(bottomInfo, shiftInfo, infoY + 3 + textBaselineShift)
|
card.fillText(bottomInfo, shiftInfo, infoY + 1 + textBaselineShift)
|
||||||
} else {
|
} else {
|
||||||
card.fillText(bottomInfo, shiftInfo, infoY - 17 + textBaselineShift)
|
card.fillText(bottomInfo, shiftInfo, infoY - 17 + textBaselineShift)
|
||||||
}
|
}
|
||||||
|
Reference in New Issue
Block a user