MCPcopy Create free account

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

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

↓ 2 callersFunctionshape_from_loro
Convert a Loro map to a Shape.
crates/drafftink-core/src/crdt/convert.rs:283
↓ 2 callersFunctionshape_to_loro
Convert a Shape to Loro map entries.
crates/drafftink-core/src/crdt/convert.rs:117
↓ 2 callersMethodsnap_points
Return key snap points for smart guide alignment. For lines/arrows, returns all segment endpoints. For other shapes, returns an empty vec (bounds suff
crates/drafftink-core/src/shapes/mod.rs:364
↓ 2 callersMethodstate
Get current connection state.
crates/drafftink-core/src/sync.rs:356
↓ 2 callersFunctionstroke_for
Map a link style to the corresponding stroke style.
crates/drafftink-core/src/mermaid/flowchart.rs:1200
↓ 2 callersFunctionstroke_style_to_i64
(s: StrokeStyle)
crates/drafftink-core/src/crdt/convert.rs:585
↓ 2 callersFunctiontext_color
(r,g,b)
utils/gen_palette.py:51
↓ 2 callersMethodto_rect
Get the selection rectangle as a Rect.
crates/drafftink-app/src/event_handler.rs:108
↓ 2 callersMethodundo
Undo the last change. Returns true if undo was performed, false if nothing to undo.
crates/drafftink-core/src/canvas.rs:88
↓ 2 callersMethodungroup
Dissolve this group and return its children.
crates/drafftink-core/src/shapes/group.rs:54
↓ 2 callersMethodupdate_layout_cache
Update cached layout dimensions from the current layout.
crates/drafftink-render/src/text_editor.rs:225
↓ 2 callersFunctionwait_for_file_selection
( input: &web_sys::HtmlInputElement, )
crates/drafftink-app/src/app.rs:697
↓ 1 callersMethodabove
Position the grid above the anchor.
crates/drafftink-widgets/src/colors.rs:792
↓ 1 callersMethodaction_mod
Get the action modifier (Ctrl on Windows/Linux, Cmd on macOS).
crates/drafftink-render/src/text_editor.rs:44
↓ 1 callersFunctionadd_pending_dropped_document
Queue a dropped document (from PNG with embedded scene) for loading.
crates/drafftink-app/src/app.rs:1102
↓ 1 callersFunctionadd_pending_dropped_image
(shape: drafftink_core::shapes::Shape)
crates/drafftink-app/src/app.rs:1117
↓ 1 callersFunctionadd_tab
Append a new tab holding `document` and make it active.
crates/drafftink-app/src/app.rs:1734
↓ 1 callersMethodadd_to_selection
Add a shape to the selection.
crates/drafftink-core/src/widget/manager.rs:111
↓ 1 callersMethodapply_color_to_range
Apply a color to a character index range.
crates/drafftink-core/src/shapes/text.rs:168
↓ 1 callersFunctionapply_corner_resize_ellipse
Apply corner resize to an ellipse.
crates/drafftink-core/src/selection.rs:647
↓ 1 callersFunctionapply_corner_resize_freehand
Apply corner resize to a freehand drawing.
crates/drafftink-core/src/selection.rs:708
↓ 1 callersFunctionapply_corner_resize_group
Apply corner resize to a group by scaling all children relative to group bounds.
crates/drafftink-core/src/selection.rs:842
↓ 1 callersFunctionapply_corner_resize_image
Apply corner resize to an image.
crates/drafftink-core/src/selection.rs:781
↓ 1 callersFunctionapply_corner_resize_rect
Apply corner resize to a rectangle.
crates/drafftink-core/src/selection.rs:586
↓ 1 callersMethodapply_eraser
Apply eraser to shapes that intersect with the eraser path.
crates/drafftink-app/src/event_handler.rs:1285
↓ 1 callersFunctionapply_rotation
Apply rotation to a shape. `cursor_point`: current cursor position in world coordinates. `snap_to_15deg`: if true, snap rotation to 15° increments. Re
crates/drafftink-core/src/selection.rs:560
↓ 1 callersMethodapproximate_height
Approximate height based on font size and number of lines.
crates/drafftink-core/src/shapes/text.rs:313
↓ 1 callersMethodapproximate_width
Approximate width based on character count and font size. This is a rough estimate; actual width depends on the font.
crates/drafftink-core/src/shapes/text.rs:281
↓ 1 callersFunctionarrow_from_loro
(map: &LoroMapValue)
crates/drafftink-core/src/crdt/convert.rs:339
↓ 1 callersMethodas_kurbo
Get as a kurbo Ellipse.
crates/drafftink-core/src/shapes/ellipse.rs:68
↓ 1 callersFunctionassemble_groups
Reconstruct nested groups from Excalidraw group paths. Each entry is a shape plus its `groupIds` ordered innermost -> outermost. Elements sharing the
crates/drafftink-core/src/excalidraw.rs:198
↓ 1 callersFunctionautosave_document
Auto-save document to IndexedDB (silent, no logging).
crates/drafftink-app/src/app.rs:357
↓ 1 callersMethodbackground_color
Get the background color (for clearing).
crates/drafftink-render/src/renderer.rs:222
↓ 1 callersMethodbounds
(&self)
crates/drafftink-core/src/shapes/ellipse.rs:78
↓ 1 callersMethodbounds
(&self)
crates/drafftink-core/src/shapes/group.rs:107
↓ 1 callersMethodbounds
(&self)
crates/drafftink-core/src/shapes/freehand.rs:210
↓ 1 callersMethodbounds
(&self)
crates/drafftink-core/src/shapes/image.rs:203
↓ 1 callersMethodbounds
(&self)
crates/drafftink-core/src/shapes/line.rs:136
↓ 1 callersMethodbounds
(&self)
crates/drafftink-core/src/shapes/rectangle.rs:96
↓ 1 callersMethodbring_to_front
Bring a shape to the front (top of z-order).
crates/drafftink-core/src/crdt/schema.rs:172
↓ 1 callersMethodbroadcast
Broadcast message to room
crates/drafftink-server/src/main.rs:180
↓ 1 callersFunctionbuild_cluster
Emit a subgraph cluster box and its title label.
crates/drafftink-core/src/mermaid/flowchart.rs:1009
↓ 1 callersFunctionbuild_edge
Emit the connector (arrow or line) and optional label for one edge.
crates/drafftink-core/src/mermaid/flowchart.rs:1115
↓ 1 callersFunctionbuild_edge_label
Emit an edge label with an opaque background so it stays legible over lines.
crates/drafftink-core/src/mermaid/flowchart.rs:1171
↓ 1 callersFunctionbuild_group
Parse `text` and assemble the diagram's shapes into one group.
crates/drafftink-core/src/mermaid/mod.rs:126
↓ 1 callersFunctionbuild_message
Emit the shapes for one message and return the next free `y`.
crates/drafftink-core/src/mermaid/sequence.rs:363
↓ 1 callersFunctionbuild_node
Emit the outline shape(s) and label for one leaf node.
crates/drafftink-core/src/mermaid/flowchart.rs:1026
↓ 1 callersFunctionbuild_note
Emit the shapes for a note and return the next free `y`.
crates/drafftink-core/src/mermaid/sequence.rs:410
↓ 1 callersFunctionbuild_self_edge
Emit a small loop connector for a self-referential edge.
crates/drafftink-core/src/mermaid/flowchart.rs:1142
↓ 1 callersFunctionbuild_self_message
Emit the shapes for a self-message (source == target) as a small loop and return the next free `y`.
crates/drafftink-core/src/mermaid/sequence.rs:388
↓ 1 callersFunctioncache_load
Load the publish-date cache, tolerating a missing or corrupt file.
utils/quarantine_check.py:307
↓ 1 callersFunctioncache_save
Persist the publish-date cache, creating parent directories as needed.
utils/quarantine_check.py:322
↓ 1 callersMethodcancel
Cancel the current interaction.
crates/drafftink-core/src/tools/mod.rs:257
↓ 1 callersFunctionchar_colors_from_loro
(map: &LoroMapValue)
crates/drafftink-core/src/crdt/convert.rs:472
↓ 1 callersFunctioncheck_packages
Resolve each package's age and collect violations. A violation is (name, version, age_days) where age_days is None when the publish date coul
utils/quarantine_check.py:204
↓ 1 callersMethodchildren_mut
Get mutable access to children.
crates/drafftink-core/src/shapes/group.rs:49
↓ 1 callersMethodclear_selection
Clear all selections.
crates/drafftink-core/src/widget/manager.rs:123
↓ 1 callersMethodclear_undo_history
Clear undo/redo history.
crates/drafftink-core/src/crdt/schema.rs:415
↓ 1 callersMethodclone
(&self)
crates/drafftink-core/src/shapes/math.rs:30
↓ 1 callersFunctionclose_tab
Close the tab at `index`. The last remaining tab is never closed.
crates/drafftink-app/src/app.rs:1746
↓ 1 callersFunctioncollab_button
Collaboration button with connection status indicator.
crates/drafftink-app/src/ui.rs:2105
↓ 1 callersFunctionconvert_arrow
Convert an `arrow` element, honoring elbowed/curved path styles.
crates/drafftink-core/src/excalidraw.rs:412
↓ 1 callersFunctionconvert_ellipse
Convert an `ellipse` element.
crates/drafftink-core/src/excalidraw.rs:338
↓ 1 callersFunctionconvert_freedraw
Convert a `freedraw` element into a freehand stroke.
crates/drafftink-core/src/excalidraw.rs:381
↓ 1 callersFunctionconvert_line
Convert a `line` element into a (possibly closed, possibly curved) poly-line.
crates/drafftink-core/src/excalidraw.rs:394
↓ 1 callersFunctionconvert_rectangle
Convert a `rectangle` or `diamond` element (diamond rendered as a rectangle).
crates/drafftink-core/src/excalidraw.rs:318
↓ 1 callersFunctionconvert_text
Convert a `text` element.
crates/drafftink-core/src/excalidraw.rs:434
↓ 1 callersFunctioncopy_png_to_clipboard_async
(png_data: Vec<u8>)
crates/drafftink-app/src/app.rs:493
↓ 1 callersFunctioncorner_handles
Generate corner handles for a bounding rectangle.
crates/drafftink-core/src/selection.rs:136
↓ 1 callersFunctioncreate_default_storage
()
crates/drafftink-core/src/storage/autosave.rs:167
↓ 1 callersMethodcursor_blink
Update cursor visibility based on blink state.
crates/drafftink-render/src/text_editor.rs:197
↓ 1 callersMethoddelete
(&self, id: &str)
crates/drafftink-core/src/storage/file.rs:99
↓ 1 callersMethoddelete
(&self, id: &str)
crates/drafftink-core/src/storage/memory.rs:46
↓ 1 callersFunctiondepth
Number of ancestor clusters above a node (its nesting depth).
crates/drafftink-core/src/mermaid/flowchart.rs:998
↓ 1 callersFunctiondetect_equal_spacing_h
( candidates: &[&Rect], dragged: &Rect, _dragged_cx: f64, dragged_cy: f64, dragged_w: f64,
crates/drafftink-core/src/snap.rs:833
↓ 1 callersFunctiondetect_equal_spacing_v
( candidates: &[&Rect], dragged: &Rect, dragged_cx: f64, _dragged_cy: f64, dragged_h: f64,
crates/drafftink-core/src/snap.rs:989
↓ 1 callersFunctiondetect_kind
Inspect the first meaningful line to decide which diagram builder to use.
crates/drafftink-core/src/mermaid/mod.rs:159
↓ 1 callersFunctiondetect_smart_guides
Detect smart guides for a dragged bounding box against other shapes.
crates/drafftink-core/src/snap.rs:62
↓ 1 callersFunctiondiamond_points
The four rhombus vertices of a diamond node (top, right, bottom, left).
crates/drafftink-core/src/mermaid/flowchart.rs:1084
↓ 1 callersFunctiondownload_binary_file
(filename: &str, data: &[u8], mime_type: &str)
crates/drafftink-app/src/app.rs:559
↓ 1 callersFunctiondownload_document
Download document as JSON file (export).
crates/drafftink-app/src/app.rs:452
↓ 1 callersFunctiondownload_file
(filename: &str, content: &str, mime_type: &str)
crates/drafftink-app/src/app.rs:527
↓ 1 callersMethoddraw_cursor
Draw a remote user's cursor at a screen position. The cursor is rendered as a small pointer arrow with the user's color.
crates/drafftink-render/src/vello_impl.rs:2499
↓ 1 callersFunctionelement_group_ids
Read an element's `groupIds` as owned strings (empty when ungrouped).
crates/drafftink-core/src/excalidraw.rs:180
↓ 1 callersFunctionellipse_from_loro
(map: &LoroMapValue)
crates/drafftink-core/src/crdt/convert.rs:312
↓ 1 callersFunctionemit_shapes
Emit all shapes in draw order: cluster boxes (outermost first), edges, then leaf nodes and their labels.
crates/drafftink-core/src/mermaid/flowchart.rs:962
↓ 1 callersMethodend_step
Call at the end of each frame.
crates/drafftink-core/src/input.rs:75
↓ 1 callersMethodenter_editing
Enter editing mode for a shape.
crates/drafftink-core/src/widget/manager.rs:132
↓ 1 callersMethodenter_text_editing
Enter text editing mode for a shape.
crates/drafftink-core/src/canvas.rs:490
↓ 1 callersMethoderaser_path
Get the current eraser path for rendering.
crates/drafftink-app/src/event_handler.rs:1323
↓ 1 callersFunctionestimate
(cell: &Cell, ex: i32, ey: i32, turn_penalty: u64)
crates/drafftink-core/src/elbow.rs:152
↓ 1 callersFunctionestimate_shade_15
Use HSL: keep hue/sat from shade_25, push lightness higher (toward shade_50->25 trend).
utils/gen_palette.py:30
↓ 1 callersMethodexit_text_editing
Exit text editing mode.
crates/drafftink-core/src/canvas.rs:495
↓ 1 callersFunctionextract_corners
(path: &[Cell], start: Point, end: Point)
crates/drafftink-core/src/elbow.rs:158
↓ 1 callersFunctionfetch_created_at
Return the publish time for one crate version, using and updating the cache. Publish times never change, so a cache hit is authoritative and free
utils/quarantine_check.py:237
↓ 1 callersFunctionfill_pattern_to_i64
(p: FillPattern)
crates/drafftink-core/src/crdt/convert.rs:651
↓ 1 callersFunctionfill_swatch
Color swatch circle for fill colors (supports "none") - uses drafftink_widgets.
crates/drafftink-app/src/ui.rs:2491
↓ 1 callersMethodfill_with_opacity
Get the fill color with opacity applied.
crates/drafftink-core/src/shapes/mod.rs:233
↓ 1 callersFunctionfinalize_scope
Compute a scope's bounding box and, for a cluster, its box size and the center of that box within the children's coordinate frame.
crates/drafftink-core/src/mermaid/flowchart.rs:706
↓ 1 callersMethodflip_selected_horizontal
Flip selected shapes horizontally (mirror around vertical axis).
crates/drafftink-core/src/canvas.rs:535
← previousnext →301–400 of 1,090, ranked by callers