brace

class janim.items.svg.brace.Cmpt_VPoints_BraceImpl(*args, **kwargs)

Brace 中对 Cmpt_VPoints 的进一步实现

match(item: Points | None, direction: Vect | None = None, buff: float = 0.1, root_only: bool = False) Self

将花括号进行伸缩,使得与 itemdirection 方向的宽度匹配

property tip_point: ndarray

得到花括号中间凸出处的坐标

property brace_left: ndarray

得到括号指向方向左边的尖端处的坐标

property brace_right: ndarray

得到括号指向方向右边的尖端处的坐标

property direction: ndarray

得到括号指向的方向

put_at_tip(item: Points, use_next_to: bool = True, buff: float = 0.25, **kwargs) Self

将物件放置在花括号中间的凸出处

create_text(text: str, buff: float = 0.1, use_next_to: bool = True, **kwargs) Text

创建一个位于花括号中间凸出处的文字

create_typst(typst: str, buff: float = 0.1, use_next_to: bool = True, **kwargs) TypstMath

创建一个位于花括号中间凸出处的 Typst 公式

class janim.items.svg.brace.Brace(item: Points | None = None, direction: ndarray = array([0., -1., 0.]), buff: float = 0.1, root_only: bool = False, stroke_alpha: float = 0, fill_alpha: float = 1, **kwargs)

花括号物件

会匹配物件在 direction 方向的宽度

points
janim.items.svg.brace.get_brace_unique_points() ndarray
janim.items.svg.brace.get_brace_default_length() float
janim.items.svg.brace.get_brace_default_thickness() float
janim.items.svg.brace.get_brace_tip_point_index() int
janim.items.svg.brace.get_brace_left_index() int
janim.items.svg.brace.get_brace_right_index() int
janim.items.svg.brace.get_brace_paths() tuple[ndarray, ndarray, ndarray, ndarray]