Skip to content
GitLab
Menu
Projects
Groups
Snippets
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
Menu
Open sidebar
Luc Didry
wemawema
Commits
cf58613d
Commit
cf58613d
authored
Oct 13, 2017
by
Luc Didry
Browse files
Fix bug in transparency
parent
a9246d0f
Pipeline
#25483
passed with stages
in 54 seconds
Changes
2
Pipelines
2
Hide whitespace changes
Inline
Side-by-side
js/wema_wema.js
View file @
cf58613d
...
...
@@ -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
)
+
'
)
'
;
}
js/wema_wema.min.js
View file @
cf58613d
...
...
@@ -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
"
)})})
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment