Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
W
world-tiles
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Package registry
Container Registry
Model registry
Operate
Environments
Terraform modules
Monitor
Incidents
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Terms and privacy
Keyboard shortcuts
?
Snippets
Groups
Projects
This is an archived project. Repository and other project resources are read-only.
Show more breadcrumbs
rc3
world-tiles
Commits
0bffe7c8
Commit
0bffe7c8
authored
3 years ago
by
coco
Browse files
Options
Downloads
Patches
Plain Diff
deco tiles
parent
211f78a3
No related branches found
No related tags found
No related merge requests found
Pipeline
#12236
passed
3 years ago
Stage: deploy
Changes
2
Pipelines
1
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
rc3-2021/coco-decoration.png
+0
-0
0 additions, 0 deletions
rc3-2021/coco-decoration.png
tools/textGenerator/textGenerator.html
+30
-8
30 additions, 8 deletions
tools/textGenerator/textGenerator.html
with
30 additions
and
8 deletions
rc3-2021/coco-decoration.png
0 → 100644
+
0
−
0
View file @
0bffe7c8
50.6 KiB
This diff is collapsed.
Click to expand it.
tools/textGenerator/textGenerator.html
+
30
−
8
View file @
0bffe7c8
...
...
@@ -41,6 +41,7 @@
function
drawText
()
{
var
fontName
=
document
.
getElementById
(
"
fontName
"
).
value
;
var
fontColors
=
document
.
getElementById
(
"
fontColor
"
).
value
.
split
(
'
,
'
);
var
outlineColors
=
document
.
getElementById
(
"
outlineColor
"
).
value
.
split
(
'
,
'
);
var
marginTop
=
Number
(
document
.
getElementById
(
"
marginTop
"
).
value
);
var
marginLeft
=
Number
(
document
.
getElementById
(
"
marginLeft
"
).
value
);
var
fontSize
=
document
.
getElementById
(
"
fontSize
"
).
value
;
...
...
@@ -55,26 +56,44 @@
var
row
=
0
;
var
column
=
0
;
var
colorIndex
=
0
;
var
outlineColorIndex
=
0
;
canvasContext
.
imageSmoothingEnabled
=
false
//Antialiasing aus
canvasContext
.
font
=
fontInfo
;
canvasContext
.
fillStyle
=
fontColors
[
colorIndex
];
canvasContext
.
textAlign
=
"
left
"
;
canvasContext
.
textBaseline
=
"
hanging
"
;
canvasContext
.
textAlign
=
"
center
"
;
//
canvasContext.textBaseline = "hanging";
//Antialiasing-Killer
canvasContext
.
clearRect
(
0
,
0
,
canvas
.
width
,
canvas
.
height
);
for
(
var
n
=
0
;
n
<
lines
.
length
;
n
++
)
{
var
x
=
(
column
*
128
)
+
marginLeft
;
var
y
=
(
row
*
tileHeight
)
+
marginTop
;
colorIndex
++
;
if
(
colorIndex
==
fontColors
.
length
){
colorIndex
=
0
;
}
canvasContext
.
fillStyle
=
fontColors
[
colorIndex
];
outlineColorIndex
++
;
if
(
outlineColorIndex
==
outlineColors
.
length
){
outlineColorIndex
=
0
;
}
canvasContext
.
fillText
(
lines
[
n
],
x
,
y
,
128
-
marginLeft
);
// Draw an outline, if the outline field has any entries.
if
(
outlineColors
[
0
].
length
>
0
)
{
canvasContext
.
fillStyle
=
outlineColors
[
outlineColorIndex
];
for
(
let
dx
=-
1
;
dx
<=
1
;
dx
++
)
{
for
(
let
dy
=-
1
;
dy
<=
1
;
dy
++
)
{
canvasContext
.
fillText
(
lines
[
n
],
x
+
dx
+
64
,
y
+
dy
,
128
-
marginLeft
);
}
}
}
canvasContext
.
fillStyle
=
fontColors
[
colorIndex
];
canvasContext
.
fillText
(
lines
[
n
],
x
+
64
,
y
,
128
-
marginLeft
);
canvasContext
.
fillText
(
lines
[
n
],
x
+
64
,
y
,
128
-
marginLeft
);
row
++
;
if
(
row
>
maxRows
)
...
...
@@ -103,13 +122,16 @@
<label>
Size
</label>
<input
id=
"fontSize"
value=
"8"
style=
"width:3em"
;
/>
px
</div>
<div
class=
"setting"
>
<label>
Margin top
</label>
<input
id=
"marginTop"
value=
"17"
style=
"width:3em"
;
/>
px
<label>
Margin top
</label>
<input
id=
"marginTop"
value=
"25"
style=
"width:3em"
;
/>
px
</div>
<div
class=
"setting"
>
<label>
Margin left
</label>
<input
id=
"marginLeft"
value=
"17"
style=
"width:3em"
;
/>
px
</div>
<div
class=
"setting"
>
<label>
Margin left
</label>
<input
id=
"
marginLeft
"
value=
"
20
"
style=
"width:
3
em"
;
/>
px
<label>
Color
</label>
<input
id=
"
fontColor
"
value=
"
#A7F8FF
"
style=
"width:
28
em"
;
/>
</div>
<div
class=
"setting"
>
<label>
Color
</label>
<input
id=
"
font
Color"
value=
"#
ff1e88,#ee3aff,#79ffe4,#5cff78,#ffe378
"
style=
"width:28em"
;
/>
<label>
Outline
</label>
<input
id=
"
outline
Color"
value=
"#
132FFF
"
style=
"width:28em"
;
/>
</div>
</form>
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment