MCPcopy Create free account

hub / github.com/PatWie/drafft-ink / functions

Functions1,090 in github.com/PatWie/drafft-ink

↓ 3 callersMethodsnapshot
Take a snapshot of the current document state for undo.
crates/drafftink-core/src/canvas.rs:65
↓ 3 callersFunctionsnapshot_active_tab
Snapshot the active tab's live document/camera back into `tabs`, so it can be restored later. Call before changing which tab is active.
crates/drafftink-app/src/app.rs:1709
↓ 3 callersMethodsync_from_crdt
Sync CRDT state to local document. This should be called when receiving remote updates.
crates/drafftink-core/src/collaboration.rs:115
↓ 3 callersMethodupdate
Update the current interaction.
crates/drafftink-core/src/tools/mod.rs:157
↓ 3 callersMethodwith_font_size
Create a new text shape with font size.
crates/drafftink-core/src/shapes/text.rs:251
↓ 3 callersMethodworld_to_screen
Convert a world point to screen coordinates.
crates/drafftink-core/src/camera.rs:63
↓ 2 callersMethodadd_point
Add a point to the path.
crates/drafftink-core/src/shapes/freehand.rs:75
↓ 2 callersMethodalt
(&self)
crates/drafftink-core/src/input.rs:184
↓ 2 callersFunctionancestor_in_scope
Climb from `node` to the ancestor that is a direct child of `scope`, or `None` if `node` is not inside `scope`.
crates/drafftink-core/src/mermaid/flowchart.rs:797
↓ 2 callersFunctionarrow_shape
Build a message arrow through the given points with the given dashed state.
crates/drafftink-core/src/mermaid/sequence.rs:452
↓ 2 callersFunctionas_group
(shape: &Shape)
crates/drafftink-core/src/excalidraw.rs:511
↓ 2 callersFunctionassert_single_group
A diagram must import as a single group so it moves/edits as one unit.
crates/drafftink-core/src/mermaid/mod.rs:319
↓ 2 callersFunctionassign_absolute
Resolve absolute centers for a cluster's descendants once the cluster's own absolute center is known.
crates/drafftink-core/src/mermaid/flowchart.rs:743
↓ 2 callersFunctionback_edges
Detect back edges (edges to an ancestor on the DFS stack) with an iterative DFS so deeply nested input cannot overflow the stack.
crates/drafftink-core/src/mermaid/flowchart.rs:901
↓ 2 callersMethodbelow
Position the grid below the anchor.
crates/drafftink-widgets/src/colors.rs:798
↓ 2 callersFunctionborder_point
Compute the point where the segment from a node's center toward `toward` exits the node's outline (bounding box, or radius for a circle, or rhombus fo
crates/drafftink-core/src/mermaid/flowchart.rs:1210
↓ 2 callersMethodbounds
(&self)
crates/drafftink-core/src/shapes/math.rs:104
↓ 2 callersMethodbring_forward
Move a shape one layer forward (towards front). Returns true if the shape was moved, false if already at front.
crates/drafftink-core/src/canvas.rs:180
↓ 2 callersFunctionbuild_library_document
Parse Excalidraw library text and lay its icons out as a grid document, returning the tab name and the document. Returns `None` if the text is not a r
crates/drafftink-app/src/app.rs:1689
↓ 2 callersFunctionchild_lists
Build direct-child lists keyed by parent cluster (and a root list).
crates/drafftink-core/src/mermaid/flowchart.rs:650
↓ 2 callersMethodclear_snap
Clear the last snap result (call when dragging ends).
crates/drafftink-app/src/event_handler.rs:1277
↓ 2 callersMethodclose
(&mut self)
crates/drafftink-render/src/rex_backend.rs:123
↓ 2 callersFunctioncompute_elbow_path
Compute elbow path between two points. Returns intermediate corner points (not including start and end).
crates/drafftink-core/src/elbow.rs:61
↓ 2 callersMethodcompute_pressure
Compute pressure based on drawing velocity. Fast movement = low pressure (thin line), slow movement = high pressure (thick line).
crates/drafftink-core/src/tools/mod.rs:205
↓ 2 callersFunctionconsume_cross_arrowhead
Consume a trailing `x`/`o` arrowhead (as in `--x`, `--o`) when it is at a token boundary, marking `arrow` accordingly. Returns the new index.
crates/drafftink-core/src/mermaid/flowchart.rs:491
↓ 2 callersFunctionconvert_rect
Convert a Parley BoundingBox to a Kurbo Rect.
crates/drafftink-render/src/vello_impl.rs:86
↓ 2 callersFunctioncopy_text_to_clipboard
Copy text to clipboard (fire and forget).
crates/drafftink-app/src/app.rs:321
↓ 2 callersFunctioncorner_and_rotate_handles
Generate corner handles plus a rotation handle for a bounding rectangle. The rotation handle is placed above the top-center, rotated by the shape's ro
crates/drafftink-core/src/selection.rs:162
↓ 2 callersMethodcreate_freehand_preview
Create a freehand preview from accumulated points.
crates/drafftink-core/src/tools/mod.rs:291
↓ 2 callersMethodcreate_shape_with_seed
Create a shape from start and end points with a specific seed.
crates/drafftink-core/src/tools/mod.rs:326
↓ 2 callersMethodcursor_byte_offset
Get the cursor byte offset (start of selection or cursor position).
crates/drafftink-render/src/text_editor.rs:163
↓ 2 callersMethodcursor_diff
(&self)
crates/drafftink-core/src/input.rs:155
↓ 2 callersMethoddata
Get the raw image data (decoded from base64).
crates/drafftink-core/src/shapes/image.rs:176
↓ 2 callersFunctiondecode_image_dimensions
(blob_url: &str)
crates/drafftink-app/src/app.rs:842
↓ 2 callersMethoddelete_selected
Delete selected shapes.
crates/drafftink-core/src/canvas.rs:527
↓ 2 callersMethoddelta
Get the drag delta.
crates/drafftink-core/src/selection.rs:288
↓ 2 callersFunctiondetect_smart_guides_for_point
Detect smart guides for a single point (e.g., line/arrow endpoint) against shape bounds.
crates/drafftink-core/src/snap.rs:222
↓ 2 callersMethoddisable
Disable collaboration.
crates/drafftink-core/src/collaboration.rs:76
↓ 2 callersMethoddisconnect
Disconnect from the server.
crates/drafftink-core/src/sync.rs:317
↓ 2 callersFunctiondummy_raw_waker
()
crates/drafftink-core/src/storage/autosave.rs:200
↓ 2 callersFunctiondummy_raw_waker
()
crates/drafftink-core/src/storage/file.rs:157
↓ 2 callersFunctiondummy_raw_waker
()
crates/drafftink-core/src/storage/memory.rs:88
↓ 2 callersFunctionedge_label_text
Build a small centered text shape for an edge label.
crates/drafftink-core/src/mermaid/flowchart.rs:1190
↓ 2 callersMethodeditor_mut
Get a mutable reference to the PlainEditor.
crates/drafftink-render/src/text_editor.rs:111
↓ 2 callersMethodexit_editing
Exit editing mode.
crates/drafftink-core/src/widget/manager.rs:144
↓ 2 callersMethodexport_snapshot
Export full document snapshot for initial sync.
crates/drafftink-core/src/collaboration.rs:175
↓ 2 callersMethodexport_snapshot
Export the document as a snapshot (full state).
crates/drafftink-core/src/crdt/schema.rs:295
↓ 2 callersFunctionextract_scene_from_png
Extract embedded scene JSON from PNG data, if present.
crates/drafftink-app/src/app.rs:1477
↓ 2 callersMethodfinish_init
Finish initialization after surface is created.
crates/drafftink-app/src/app.rs:1825
↓ 2 callersMethodfit_to_bounds
Fit the camera to show the given bounding box.
crates/drafftink-core/src/camera.rs:98
↓ 2 callersMethodformat
Format the shortcut for display (e.g., "Ctrl+S").
crates/drafftink-app/src/shortcuts.rs:28
↓ 2 callersMethodfreehand_points
Get the accumulated freehand points (for final shape creation).
crates/drafftink-core/src/tools/mod.rs:316
↓ 2 callersMethodfreehand_pressures
Get the accumulated freehand pressure values.
crates/drafftink-core/src/tools/mod.rs:321
↓ 2 callersFunctionfrom_grid
(v: i32)
crates/drafftink-core/src/elbow.rs:15
↓ 2 callersMethodget_shape
Get a shape by ID.
crates/drafftink-core/src/crdt/schema.rs:129
↓ 2 callersFunctionget_shape_handles
Get the manipulation handles for a shape.
crates/drafftink-core/src/widget/manager.rs:190
↓ 2 callersFunctionhandle_dropped_file
( file: web_sys::File, viewport_width: f64, viewport_height: f64, camera_offse
crates/drafftink-app/src/app.rs:1004
↓ 2 callersMethodhandle_key
( &mut self, key: TextKey, modifiers: TextModifiers, font_cx: &mut FontContext
crates/drafftink-render/src/text_editor.rs:238
↓ 2 callersFunctionhas_roundness
Whether an element declares non-null `roundness` (curved rendering).
crates/drafftink-core/src/excalidraw.rs:451
↓ 2 callersFunctionhit_test_boundary
Check if a point is on the boundary (edge) of a shape's bounding box. Returns true if the point is within tolerance of any edge but not inside the int
crates/drafftink-core/src/selection.rs:229
↓ 2 callersMethodimport_updates
Import updates from remote peer. Returns true if import was successful.
crates/drafftink-core/src/collaboration.rs:186
↓ 2 callersMethodinvalidate_cache
Clear the cached size (call when text properties change).
crates/drafftink-core/src/shapes/text.rs:161
↓ 2 callersMethodinvalidate_cache
(&self)
crates/drafftink-core/src/shapes/math.rs:87
↓ 2 callersMethodis_active
Check if a tool interaction is active.
crates/drafftink-core/src/tools/mod.rs:266
↓ 2 callersFunctionis_closed_path
Whether a poly-line's endpoints are close enough to be a closed shape.
crates/drafftink-core/src/excalidraw.rs:371
↓ 2 callersMethodis_drawing
True while the user is actively drawing — left mouse button held, or SPACE held (virtual left button for Paint-style keyboard drawing).
crates/drafftink-core/src/input.rs:138
↓ 2 callersMethodis_selected
Check if a shape is selected.
crates/drafftink-core/src/widget/manager.rs:61
↓ 2 callersFunctionitem_shape_from_elements
Convert a library item's elements into one grouped [`Shape`], preserving the Excalidraw group hierarchy. Returns `None` if nothing is convertible.
crates/drafftink-core/src/excalidraw.rs:155
↓ 2 callersFunctionlibrary_layout_grid
Arrange library items into a uniform grid for display on a canvas. Each item's group is cloned and translated so its bounding box is centered in a gr
crates/drafftink-core/src/excalidraw.rs:97
↓ 2 callersFunctionline_segments_intersect_rect
Test if any line segment (defined by consecutive points) intersects or is inside a rectangle.
crates/drafftink-core/src/shapes/mod.rs:548
↓ 2 callersFunctionlist_documents_async
List all documents in IndexedDB - triggers async list.
crates/drafftink-app/src/app.rs:425
↓ 2 callersMethodload
(&self, id: &str)
crates/drafftink-core/src/storage/memory.rs:35
↓ 2 callersFunctionlongest_path_ranks
Assign a layer index to each node using longest-path ranking on the acyclic subgraph obtained by dropping back edges and self loops.
crates/drafftink-core/src/mermaid/flowchart.rs:869
↓ 2 callersMethodloro_doc
Get the underlying LoroDoc.
crates/drafftink-core/src/crdt/schema.rs:49
↓ 2 callersFunctionmanhattan
(x1: i32, y1: i32, x2: i32, y2: i32)
crates/drafftink-core/src/elbow.rs:55
↓ 2 callersFunctionmeasure_scope
Size and relatively place the direct children of `scope` (a cluster index, or `None` for the root). Recurses into nested clusters first.
crates/drafftink-core/src/mermaid/flowchart.rs:664
↓ 2 callersFunctionmenu_item_inner
(ui: &mut Ui, label: &str, shortcut: &str, enabled: bool)
crates/drafftink-widgets/src/menu.rs:28
↓ 2 callersFunctionpanel_separator
Vertical separator for panels.
crates/drafftink-app/src/ui.rs:2479
↓ 2 callersFunctionparse_color
Parse an Excalidraw color string (`transparent` or `#rgb`/`#rrggbb`/ `#rrggbbaa`) into a serializable color, defaulting to black.
crates/drafftink-core/src/excalidraw.rs:457
↓ 2 callersFunctionparse_color
Parse a CSS color string to Color32.
crates/drafftink-app/src/ui.rs:2502
↓ 2 callersFunctionparse_direction
Determine the flow direction declared on a header or `direction` line.
crates/drafftink-core/src/mermaid/flowchart.rs:260
↓ 2 callersFunctionparse_params
Parse room and server parameters from a query string or hash.
crates/drafftink-app/src/web.rs:56
↓ 2 callersFunctionpaste_shapes_from_clipboard_async
Try to import shapes from clipboard text: Excalidraw scene JSON first, then Mermaid diagram source. The result will be available via `take_pending_exc
crates/drafftink-app/src/app.rs:911
↓ 2 callersFunctionpath_style_to_i64
(s: PathStyle)
crates/drafftink-core/src/crdt/convert.rs:569
↓ 2 callersMethodpeer_id
Get the peer ID for this client.
crates/drafftink-core/src/collaboration.rs:61
↓ 2 callersFunctionpoint_to_polyline_dist
Minimum distance from a point to a polyline (sequence of connected segments).
crates/drafftink-core/src/shapes/mod.rs:284
↓ 2 callersFunctionpolygon
Build a closed, white-filled polygon line from vertices.
crates/drafftink-core/src/mermaid/flowchart.rs:1107
↓ 2 callersMethodpreview_shape
Get the preview shape for the current interaction.
crates/drafftink-core/src/tools/mod.rs:271
↓ 2 callersMethodquad_to
(&mut self, x1: f32, y1: f32, x: f32, y: f32)
crates/drafftink-render/src/rex_backend.rs:110
↓ 2 callersMethodremove_shape
Remove a shape from the document.
crates/drafftink-core/src/crdt/schema.rs:107
↓ 2 callersMethodrender_grid_lines
Render full grid lines.
crates/drafftink-render/src/vello_impl.rs:2227
↓ 2 callersMethodrender_image_placeholder
Render a placeholder for images that couldn't be loaded.
crates/drafftink-render/src/vello_impl.rs:1069
↓ 2 callersFunctionrgb_hex
(r,g,b)
utils/gen_palette.py:50
↓ 2 callersMethodroughness
Get the roughness value for this sloppiness level.
crates/drafftink-core/src/shapes/mod.rs:90
↓ 2 callersFunctionrun_style
Determine a link style from a single connector run.
crates/drafftink-core/src/mermaid/flowchart.rs:577
↓ 2 callersMethodselect_all
Select all shapes.
crates/drafftink-core/src/canvas.rs:476
↓ 2 callersFunctionself_snap_rects
Get snap points from a line/arrow's own endpoints, excluding the one being dragged.
crates/drafftink-app/src/event_handler.rs:24
↓ 2 callersMethodsend_backward
Move a shape one layer backward (towards back). Returns true if the shape was moved, false if already at back.
crates/drafftink-core/src/canvas.rs:192
↓ 2 callersMethodset_user_info
Set user info (name, color).
crates/drafftink-core/src/collaboration.rs:299
↓ 2 callersMethodset_viewport_size
Set the viewport size.
crates/drafftink-core/src/canvas.rs:441
← previousnext →201–300 of 1,090, ranked by callers