Benign rust 381 installs Download

renamite-behavior-canvas 0.3.18

“Canvas tool behaviors: Select, Transform, Pen, PathEdit, shapes.”

Contains an unbounded block loopPackage under two months old
SHA-25645b405231b03a77ccf7c1d5b0d8a456da5930476348c16b6047ad56e0640567c
MaleculeH(Db)Md

Evidence

English function-word token "and" lines 1–3
1:54… rotate/scale handles,
2//! rubber band, delete) and Rect/Ellipse/Star creation. Pure state machines:
3//! world-space events in, EditorCommands out. …
imports glam::DVec2 lines 5–33
5:55… onstrains shapes to
6//! square/circle (Shift on the star tool draws a regular polygon instead;
7//! Alt on the star tool draws from center with 6 points instead of 5);
8//! drag = one undo step; Esc cancels the open drag.
9
10use glam::DVec2;
11use kurbo::{Affine, ParamCurveNearest, Point, Shape as KurboShape};
12
13use renamite_animation::{Angle, Animated, Frame};
14use renamite_behavior_common::{
15 ToolContext, fill::cmd_fill_shape, path::path_edit_target, snap::SNAP_TOLERANCE_PX,
16};
17use renamite_geometry::{Anchor, AnchorEdit, TangentMode, VectorPath};
18use renamite_history::{
19 EditorCommand, NodeTree, OutputVec, SelectionChange, ToolId, ToolOutput, resolve_property_edit,
20};
21use renamite_model::{
22 Document, FillRule, GradientKind, Node, NodeId, NodeKind, PaintKind, Parent, PropPath,
23 ShapeKind, StarKind, StyleKind, StylePaint, Value, immediate_child_below, node_is_ancestor,
24 node_transform_context, node_world_affine, pick_box_selectable, pick_selectable,
25 pick_selectable_with_leaf, selected_ancestor_for_pick, selection_bounds, world_delta_to_parent,
26};
27use smallvec::{SmallVec, smallvec};
28use std::f64::consts::{PI, TAU};
29
30#[derive(Clone, Debug)]
31pub enum CanvasEvent {
32 PointerDown { pos: DVec2, button: PointerButton },
33 Poin …
Contains an unbounded block loop lines 1356–1360
1356:88… > {
1357 let mut scope = doc.locate(shape).map(|(p, _)| p)?;
1358 loop {
1359 let children: Vec<NodeId> = match scope {
1360 Parent::Comp(c) => doc.compositions.get(c)?.children.clon …
imports renamite_behavior_common::snap::snap_point lines 1656–1662
1656:57… Vec2 {
1657 use renamite_behavior_common::snap::{SnapInput, snap_point};
1658 let input = SnapInput {
1659 doc: ctx.doc,
1660 items: &ctx.scene.items,
1661 selected: &ctx.selection.nodes,
1662 …
imports renamite_behavior_common::snap::snap_delta lines 1678–1683
1678:5… use renamite_behavior_common::snap::{SnapInput, snap_delta};
1679 let input = SnapInput {
1680 doc: ctx.doc,
1681 items: &ctx.scene.items,
1682 selected: &ctx.selection.nodes,
1683 …

No evidence locations were recorded for this file. Raw result

Keyboard shortcuts on this page: j for the next sample, k for the previous one, x to go back to the feed, d to download the original bytes, r to re-queue the sample for analysis.