direction
The four directions into which content can be laid out.
Possible values are:
ltr: Left to right.rtl: Right to left.ttb: Top to bottom.btt: Bottom to top.
These values are available globally and also in the direction type's scope, so you can write either of the following two:
#stack(dir: rtl)[A][B][C]
#stack(dir: direction.rtl)[A][B][C]

定义定义这些函数和类型带有附属定义。要访问这种定义,请先写上函数或类型的名称,再加上定义的名称,并用句点在中间分隔。
定义
这些函数和类型带有附属定义。要访问这种定义,请先写上函数或类型的名称,再加上定义的名称,并用句点在中间分隔。
axis
axisThe axis this direction belongs to, either "horizontal" or
"vertical".
展开例子
#ltr.axis() \
#ttb.axis()

self.axis()start
startThe start point of this direction, as an alignment.
展开例子
#ltr.start() \
#rtl.start() \
#ttb.start() \
#btt.start()

self.start()->end
endThe end point of this direction, as an alignment.
展开例子
#ltr.end() \
#rtl.end() \
#ttb.end() \
#btt.end()

self.end()->inv
invThe inverse direction.
展开例子
#ltr.inv() \
#rtl.inv() \
#ttb.inv() \
#btt.inv()

self.inv()->