mirror of
https://github.com/curioustorvald/Terrarum.git
synced 2026-03-07 12:21:52 +09:00
a bit of btex stuffs
This commit is contained in:
@@ -241,8 +241,8 @@
|
|||||||
<p>The argument key <code>%1$s</code> will be replaced into a number, Roman numerals, etc.
|
<p>The argument key <code>%1$s</code> will be replaced into a number, Roman numerals, etc.
|
||||||
depending on the value of <code>type</code> attribute.</p>
|
depending on the value of <code>type</code> attribute.</p>
|
||||||
|
|
||||||
<p>These macros can be used to localise the chapter headings for your language. For example,
|
<p>These macros can be used to localise the chapter headings into your language. For example,
|
||||||
in Korean text, the following idiomatic definition will be useful:</p>
|
in Korean text, the following idiomatic definition will be desirable:</p>
|
||||||
|
|
||||||
<callout align="left" class="code"><macrodef><br/><!--
|
<callout align="left" class="code"><macrodef><br/><!--
|
||||||
--> <pair key="thepart" value="제%1$s부"/><br/><!--
|
--> <pair key="thepart" value="제%1$s부"/><br/><!--
|
||||||
|
|||||||
@@ -1577,35 +1577,37 @@ object BTeXParser {
|
|||||||
// add ornamental column on the left
|
// add ornamental column on the left
|
||||||
it.first.forEach {
|
it.first.forEach {
|
||||||
it.extraDrawFun = { batch, x, y ->
|
it.extraDrawFun = { batch, x, y ->
|
||||||
|
val yoff = -2
|
||||||
val oldCol = batch.color.cpy()
|
val oldCol = batch.color.cpy()
|
||||||
batch.color = DEFAULT_ORNAMENTS_COL.cpy().also { it.a *= bodyTextShadowAlpha }
|
batch.color = DEFAULT_ORNAMENTS_COL.cpy().also { it.a *= bodyTextShadowAlpha }
|
||||||
Toolkit.fillArea(batch,
|
Toolkit.fillArea(batch,
|
||||||
x - (indent - 2),
|
x - (indent - 2),
|
||||||
y + doc.lineHeightInPx,
|
y + doc.lineHeightInPx + yoff,
|
||||||
7f,
|
7f,
|
||||||
1 + (it.lineCount - 1).coerceAtLeast(1) * doc.lineHeightInPx.toFloat()
|
1 + (it.lineCount - 1).coerceAtLeast(1) * doc.lineHeightInPx.toFloat()
|
||||||
)
|
)
|
||||||
batch.color = DEFAULT_ORNAMENTS_COL
|
batch.color = DEFAULT_ORNAMENTS_COL
|
||||||
Toolkit.fillArea(batch,
|
Toolkit.fillArea(batch,
|
||||||
x - (indent - 2),
|
x - (indent - 2),
|
||||||
y + doc.lineHeightInPx,
|
y + doc.lineHeightInPx + yoff,
|
||||||
6f,
|
6f,
|
||||||
(it.lineCount - 1).coerceAtLeast(1) * doc.lineHeightInPx.toFloat()
|
(it.lineCount - 1).coerceAtLeast(1) * doc.lineHeightInPx.toFloat()
|
||||||
)
|
)
|
||||||
batch.color = oldCol
|
batch.color = oldCol
|
||||||
}
|
}
|
||||||
it.extraPixmapDrawFun = { pixmap, x, y ->
|
it.extraPixmapDrawFun = { pixmap, x, y ->
|
||||||
|
val yoff = -2
|
||||||
pixmap.setColor(DEFAULT_ORNAMENTS_COL.cpy().also { it.a *= bodyTextShadowAlpha })
|
pixmap.setColor(DEFAULT_ORNAMENTS_COL.cpy().also { it.a *= bodyTextShadowAlpha })
|
||||||
pixmap.fillRectangle(
|
pixmap.fillRectangle(
|
||||||
x - (indent - 2),
|
x - (indent - 2),
|
||||||
y + doc.lineHeightInPx,
|
y + doc.lineHeightInPx + yoff,
|
||||||
7,
|
7,
|
||||||
1 + (it.lineCount - 1).coerceAtLeast(1) * doc.lineHeightInPx
|
1 + (it.lineCount - 1).coerceAtLeast(1) * doc.lineHeightInPx
|
||||||
)
|
)
|
||||||
pixmap.setColor(DEFAULT_ORNAMENTS_COL)
|
pixmap.setColor(DEFAULT_ORNAMENTS_COL)
|
||||||
pixmap.fillRectangle(
|
pixmap.fillRectangle(
|
||||||
x - (indent - 2),
|
x - (indent - 2),
|
||||||
y + doc.lineHeightInPx,
|
y + doc.lineHeightInPx + yoff,
|
||||||
6,
|
6,
|
||||||
(it.lineCount - 1).coerceAtLeast(1) * doc.lineHeightInPx
|
(it.lineCount - 1).coerceAtLeast(1) * doc.lineHeightInPx
|
||||||
)
|
)
|
||||||
|
|||||||
Reference in New Issue
Block a user