move

janim.gui.handlers.move.handler(viewer: AnimViewer, command: Timeline.GuiCommand) → None
class janim.gui.handlers.move.MovePanel(viewer: AnimViewer, command: Timeline.GuiCommand, scripts: list[str], items: list[Item])

基类:HandlerPanel

on_undo() → None
on_redo() → None
handle_history_change() → None
update_btn_state() → None
update_replacement() → None
eventFilter(watched: QObject, event: QEvent) → bool
on_glw_mouse_press(event: QMouseEvent) → None
on_glw_mouse_move(event: QMouseEvent) → None
on_glw_mouse_release(event: QMouseEvent) → None
select_box_at_position(position: QPointF) → ItemBox | None
auto_snapping(shift: ndarray, lock_direction: bool) → None
on_overlay_paint(event: QPaintEvent) → None
get_screen_rect_of_box(box: ItemBox, offset: ndarray | None = None) → QRectF
static set_dashed_pen(p: QPainter, color: QColor, pen_width: int = 2) → None
staticMetaObject = PySide6.QtCore.QMetaObject("MovePanel" inherits "HandlerPanel": )
class janim.gui.handlers.move.History(boxes: list[ItemBox])

基类:object

save(idx: int, old_offset: ndarray, new_offset: ndarray) → None
undoable() → bool
undo() → None
redoable() → bool
redo() → None
class janim.gui.handlers.move.ItemBox(item: Item, attrs: BasicAttrs)

基类:object

物件及其在视野坐标下的可选中范围

contains(x: float, y: float) → bool
property real_min_x: float
property real_max_x: float
property real_min_y: float
property real_max_y: float
min_max_framepos(offset: ndarray | None) → tuple[ndarray, ndarray]
min_max_glpos(offset: ndarray | None) → tuple[ndarray, ndarray]
snap_x_to(other: ItemBox) → SnapMatch
snap_y_to(other: ItemBox) → SnapMatch
class janim.gui.handlers.move.SnapMatch(source: 'float', target: 'float', target_base: 'float')

基类:object

source: float
target: float
target_base: float
property delta: float
additional_factor(applied_delta: float) → float | None
class janim.gui.handlers.move.BasicAttrs(viewer: AnimViewer)

基类:BasicAttrs

janim.gui.handlers.move.compute_lock_directions_shift(shift: ndarray) → ndarray

计算锁定水平/垂直/对角线情况下的 shift