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.
|
||||
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,
|
||||
in Korean text, the following idiomatic definition will be useful:</p>
|
||||
<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 desirable:</p>
|
||||
|
||||
<callout align="left" class="code"><macrodef><br/><!--
|
||||
--> <pair key="thepart" value="제%1$s부"/><br/><!--
|
||||
|
||||
@@ -1577,35 +1577,37 @@ object BTeXParser {
|
||||
// add ornamental column on the left
|
||||
it.first.forEach {
|
||||
it.extraDrawFun = { batch, x, y ->
|
||||
val yoff = -2
|
||||
val oldCol = batch.color.cpy()
|
||||
batch.color = DEFAULT_ORNAMENTS_COL.cpy().also { it.a *= bodyTextShadowAlpha }
|
||||
Toolkit.fillArea(batch,
|
||||
x - (indent - 2),
|
||||
y + doc.lineHeightInPx,
|
||||
y + doc.lineHeightInPx + yoff,
|
||||
7f,
|
||||
1 + (it.lineCount - 1).coerceAtLeast(1) * doc.lineHeightInPx.toFloat()
|
||||
)
|
||||
batch.color = DEFAULT_ORNAMENTS_COL
|
||||
Toolkit.fillArea(batch,
|
||||
x - (indent - 2),
|
||||
y + doc.lineHeightInPx,
|
||||
y + doc.lineHeightInPx + yoff,
|
||||
6f,
|
||||
(it.lineCount - 1).coerceAtLeast(1) * doc.lineHeightInPx.toFloat()
|
||||
)
|
||||
batch.color = oldCol
|
||||
}
|
||||
it.extraPixmapDrawFun = { pixmap, x, y ->
|
||||
val yoff = -2
|
||||
pixmap.setColor(DEFAULT_ORNAMENTS_COL.cpy().also { it.a *= bodyTextShadowAlpha })
|
||||
pixmap.fillRectangle(
|
||||
x - (indent - 2),
|
||||
y + doc.lineHeightInPx,
|
||||
y + doc.lineHeightInPx + yoff,
|
||||
7,
|
||||
1 + (it.lineCount - 1).coerceAtLeast(1) * doc.lineHeightInPx
|
||||
)
|
||||
pixmap.setColor(DEFAULT_ORNAMENTS_COL)
|
||||
pixmap.fillRectangle(
|
||||
x - (indent - 2),
|
||||
y + doc.lineHeightInPx,
|
||||
y + doc.lineHeightInPx + yoff,
|
||||
6,
|
||||
(it.lineCount - 1).coerceAtLeast(1) * doc.lineHeightInPx
|
||||
)
|
||||
|
||||
Reference in New Issue
Block a user