Commit cf58613d authored by Luc Didry's avatar Luc Didry
Browse files

Fix bug in transparency

parent a9246d0f
......@@ -709,5 +709,5 @@ function colorToRGBA(color, alpha) {
r = parseInt(''+a[1]+a[2], 16);
g = parseInt(''+a[3]+a[4], 16);
b = parseInt(''+a[4]+a[6], 16);
return 'rgba('+r+','+g+','+b+','+(alpha/100)+')';
return 'rgba('+r+','+g+','+b+','+(100 - alpha/100)+')';
}
......@@ -49,5 +49,5 @@ else{var i={tl:0,tr:0,br:0,bl:0}
for(var c in i)r[c]=r[c]||i[c]}e.beginPath(),e.moveTo(a+r.tl,t),e.lineTo(a+s-r.tr,t),e.quadraticCurveTo(a+s,t,a+s,t+r.tr),e.lineTo(a+s,t+o-r.br),e.quadraticCurveTo(a+s,t+o,a+s-r.br,t+o),e.lineTo(a+r.bl,t+o),e.quadraticCurveTo(a,t+o,a,t+o-r.bl),e.lineTo(a,t+r.tl),e.quadraticCurveTo(a,t,a+r.tl,t),e.closePath(),l&&e.fill(),n&&e.stroke()}function show(e){var a=$("#"+e)
a.hasClass("d-none")&&a.removeClass("d-none")}function hide(e){var a=$("#"+e)
a.hasClass("d-none")||a.addClass("d-none")}function scalePreserveAspectRatio(e,a,t,s){return Math.min(t/e,s/a)}function colorToRGBA(e,a){var t=e.split("")
return r=parseInt(""+t[1]+t[2],16),g=parseInt(""+t[3]+t[4],16),b=parseInt(""+t[4]+t[6],16),"rgba("+r+","+g+","+b+","+a/100+")"}var svg=new C2S(800,400),showSettings="Show advanced settings",hideSettings="Hide advanced settings",workCanvas="Work with canvas",workSvg="Work with SVG",customImgText="Custom image",customImg,fonts={"Comic Neue":{regular:"fonts/comic-neue/ComicNeue-Regular.woff2",bold:"fonts/comic-neue/ComicNeue-Bold.woff2",italic:"fonts/comic-neue/ComicNeue-Regular-Oblique.woff2","italic bold":"fonts/comic-neue/ComicNeue-Bold-Oblique.woff2"},"Comic Spice":{regular:"fonts/comic-spice/ComicSpice.woff2",bold:"fonts/comic-spice/ComicSpice.woff2",italic:"fonts/comic-spice/ComicSpice.woff2","italic bold":"fonts/comic-spice/ComicSpice.woff2"},Hack:{regular:"fonts/hack/hack-regular-webfont.woff2",bold:"fonts/hack/hack-bold-webfont.woff2",italic:"fonts/hack/hack-italic-webfont.woff2","italic bold":"fonts/hack/hack-bolditalic-webfont.woff2"},Nosifer:{regular:"fonts/nosifer/nosifer.woff2",bold:"fonts/nosifer/nosifer.woff2",italic:"fonts/nosifer/nosifer.woff2","italic bold":"fonts/nosifer/nosifer.woff2"}},loadedFonts={}
return r=parseInt(""+t[1]+t[2],16),g=parseInt(""+t[3]+t[4],16),b=parseInt(""+t[4]+t[6],16),"rgba("+r+","+g+","+b+","+(100-a/100)+")"}var svg=new C2S(800,400),showSettings="Show advanced settings",hideSettings="Hide advanced settings",workCanvas="Work with canvas",workSvg="Work with SVG",customImgText="Custom image",customImg,fonts={"Comic Neue":{regular:"fonts/comic-neue/ComicNeue-Regular.woff2",bold:"fonts/comic-neue/ComicNeue-Bold.woff2",italic:"fonts/comic-neue/ComicNeue-Regular-Oblique.woff2","italic bold":"fonts/comic-neue/ComicNeue-Bold-Oblique.woff2"},"Comic Spice":{regular:"fonts/comic-spice/ComicSpice.woff2",bold:"fonts/comic-spice/ComicSpice.woff2",italic:"fonts/comic-spice/ComicSpice.woff2","italic bold":"fonts/comic-spice/ComicSpice.woff2"},Hack:{regular:"fonts/hack/hack-regular-webfont.woff2",bold:"fonts/hack/hack-bold-webfont.woff2",italic:"fonts/hack/hack-italic-webfont.woff2","italic bold":"fonts/hack/hack-bolditalic-webfont.woff2"},Nosifer:{regular:"fonts/nosifer/nosifer.woff2",bold:"fonts/nosifer/nosifer.woff2",italic:"fonts/nosifer/nosifer.woff2","italic bold":"fonts/nosifer/nosifer.woff2"}},loadedFonts={}
$(document).ready(function(){translate(),getParameters(),bindEvents(),toggleBgSettings(),refreshFilename(),waitForfont("wemake-font",function(){waitForfont("porn-font")})})
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment