MCPcopy Create free account

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

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

↓ 1 callersMethodflip_selected_vertical
Flip selected shapes vertically (mirror around horizontal axis).
crates/drafftink-core/src/canvas.rs:570
↓ 1 callersMethodfocused
Get the focused shape ID (if any).
crates/drafftink-core/src/widget/manager.rs:71
↓ 1 callersFunctionfont_family_to_i64
(f: FontFamily)
crates/drafftink-core/src/crdt/convert.rs:601
↓ 1 callersFunctionfont_weight_to_i64
(w: FontWeight)
crates/drafftink-core/src/crdt/convert.rs:619
↓ 1 callersFunctionfreehand_from_loro
(map: &LoroMapValue)
crates/drafftink-core/src/crdt/convert.rs:356
↓ 1 callersFunctiongenerate_fill_pattern
Generate fill pattern lines within the given bounds using roughr.
crates/drafftink-render/src/vello_impl.rs:243
↓ 1 callersFunctiongenerate_seed
Generate a random seed for new shapes. Uses a simple counter + hash approach that works on all platforms including WASM.
crates/drafftink-core/src/shapes/mod.rs:193
↓ 1 callersFunctiongenerate_tool_seed
Generate a random seed for new tool interactions. Uses a simple counter + hash approach that works on all platforms including WASM.
crates/drafftink-core/src/tools/mod.rs:15
↓ 1 callersFunctionget_bool
(map: &LoroMapValue, key: &str)
crates/drafftink-core/src/crdt/convert.rs:105
↓ 1 callersMethodget_cursor_for_position
Determine the cursor type based on hover position. Returns: None = default, Some(None) = move, Some(Some(handle)) = resize with direction
crates/drafftink-app/src/event_handler.rs:305
↓ 1 callersFunctionget_line_other_endpoint
Get the other endpoint of a line/arrow given the handle being manipulated. Returns the start point if manipulating the end, and vice versa.
crates/drafftink-app/src/event_handler.rs:77
↓ 1 callersFunctionget_manipulation_target_position
Get the position of the manipulation target (handle or shape center). This is used for snapping - we snap the target position, not the cursor.
crates/drafftink-core/src/selection.rs:341
↓ 1 callersFunctionget_server_url
Get the WebSocket server URL. If server is provided in URL params, use that. Otherwise use page origin. Converts http(s) to ws(s) and appends /ws path
crates/drafftink-app/src/web.rs:87
↓ 1 callersFunctionget_tools
()
crates/drafftink-app/src/ui.rs:549
↓ 1 callersFunctiongrid_style_button
Grid style button - draws icon representing current grid style. This is kept local because it draws a custom procedural icon.
crates/drafftink-app/src/ui.rs:1214
↓ 1 callersFunctiongroup_from_loro
(map: &LoroMapValue)
crates/drafftink-core/src/crdt/convert.rs:385
↓ 1 callersMethodgroup_selected
Group the currently selected shapes. Returns the new group's ID, or None if less than 2 shapes were selected.
crates/drafftink-core/src/canvas.rs:613
↓ 1 callersMethodgroup_shapes
Group the given shapes into a single group. Returns the new group's ID, or None if less than 2 shapes were provided. The group will be placed at the p
crates/drafftink-core/src/canvas.rs:314
↓ 1 callersFunctionhamburger_button
Hamburger menu button (three horizontal lines).
crates/drafftink-app/src/ui.rs:2061
↓ 1 callersMethodhandle_mouse_down
Handle mouse press at the given local coordinates (relative to text position).
crates/drafftink-render/src/text_editor.rs:390
↓ 1 callersMethodhandle_mouse_drag
Handle mouse drag at the given local coordinates.
crates/drafftink-render/src/text_editor.rs:410
↓ 1 callersMethodhandle_mouse_up
Handle mouse release.
crates/drafftink-render/src/text_editor.rs:427
↓ 1 callersFunctionhandle_socket
Handle a WebSocket connection
crates/drafftink-server/src/main.rs:230
↓ 1 callersMethodhas_outgoing
Check if there are pending outgoing messages.
crates/drafftink-core/src/collaboration.rs:280
↓ 1 callersMethodhas_pressure
Check if this freehand has pressure data.
crates/drafftink-core/src/shapes/freehand.rs:91
↓ 1 callersFunctionhexagon_points
The six vertices of a horizontal hexagon node.
crates/drafftink-core/src/mermaid/flowchart.rs:1094
↓ 1 callersFunctionhue_to_rgb
Convert hue (0.0-1.0) to RGB color.
crates/drafftink-widgets/src/colors.rs:990
↓ 1 callersFunctionimage_format_to_i64
(f: ImageFormat)
crates/drafftink-core/src/crdt/convert.rs:635
↓ 1 callersFunctionimage_from_loro
(map: &LoroMapValue)
crates/drafftink-core/src/crdt/convert.rs:405
↓ 1 callersFunctioninternal_edges
Collect edges that connect two distinct direct children of `scope`, mapping each endpoint up to the direct child that contains it. These drive the lay
crates/drafftink-core/src/mermaid/flowchart.rs:766
↓ 1 callersMethodintersects_rect
Test if this shape intersects a selection rectangle. For lines/arrows, checks if any segment crosses or is inside the rect. For other shapes, checks b
crates/drafftink-core/src/shapes/mod.rs:375
↓ 1 callersMethodinverse_transform
Get the inverse transform for input handling. This transform converts screen coordinates to world coordinates.
crates/drafftink-core/src/camera.rs:53
↓ 1 callersFunctionis_allowed
Return True when this crate or this exact version is exempt.
utils/quarantine_check.py:197
↓ 1 callersMethodis_button_pressed
(&self, button: MouseButton)
crates/drafftink-core/src/input.rs:132
↓ 1 callersMethodis_composing
Check if the editor is composing (IME active).
crates/drafftink-render/src/text_editor.rs:215
↓ 1 callersMethodis_cursor_visible
Check if cursor should be visible.
crates/drafftink-render/src/text_editor.rs:205
↓ 1 callersMethodis_double_click
(&self)
crates/drafftink-core/src/input.rs:190
↓ 1 callersMethodis_editing
Check if currently in editing mode.
crates/drafftink-core/src/widget/manager.rs:151
↓ 1 callersMethodis_editing_shape
Check if a specific shape is being edited.
crates/drafftink-core/src/widget/manager.rs:156
↓ 1 callersMethodis_group
Check if this shape is a group.
crates/drafftink-core/src/shapes/mod.rs:457
↓ 1 callersFunctionis_id_char
Whether `c` may appear in a node identifier.
crates/drafftink-core/src/mermaid/flowchart.rs:362
↓ 1 callersFunctionis_label_start
Whether an embedded (unquoted or quoted) label could start at `c`.
crates/drafftink-core/src/mermaid/flowchart.rs:501
↓ 1 callersMethodis_manipulating
Check if a manipulation is in progress.
crates/drafftink-app/src/event_handler.rs:189
↓ 1 callersMethodis_selecting
Check if a selection rectangle is active.
crates/drafftink-app/src/event_handler.rs:194
↓ 1 callersFunctionis_skippable
Whether a line should be ignored (styling directives, etc.).
crates/drafftink-core/src/mermaid/flowchart.rs:285
↓ 1 callersMethodis_vertical
Whether this direction flows along the vertical axis.
crates/drafftink-core/src/mermaid/flowchart.rs:130
↓ 1 callersFunctionlayout
Turn a parsed flowchart into positioned shapes: cluster boxes first (behind), then edges, then leaf nodes and labels on top.
crates/drafftink-core/src/mermaid/flowchart.rs:623
↓ 1 callersFunctionlayout
Turn a parsed diagram into positioned shapes, ordered back-to-front: lifelines, then events, then participant boxes on top.
crates/drafftink-core/src/mermaid/sequence.rs:289
↓ 1 callersMethodleave_room
Request to leave the current room. Queues the leave message.
crates/drafftink-core/src/collaboration.rs:264
↓ 1 callersMethodleave_room
Remove peer from room
crates/drafftink-server/src/main.rs:161
↓ 1 callersFunctionline_from_loro
(map: &LoroMapValue)
crates/drafftink-core/src/crdt/convert.rs:323
↓ 1 callersMethodlist
(&self)
crates/drafftink-core/src/storage/memory.rs:58
↓ 1 callersMethodlist_documents
List all saved document IDs.
crates/drafftink-core/src/storage/autosave.rs:147
↓ 1 callersFunctionload_allowlist
Read consciously-accepted exemptions. Each non-comment line is either a bare crate name (exempts every version of that crate) or `name==versi
utils/quarantine_check.py:177
↓ 1 callersFunctionload_cargo_lock_packages
Parse Cargo.lock into registry and non-registry package lists. Cargo.lock is TOML, but we parse the `[[package]]` blocks by hand so the scrip
utils/quarantine_check.py:140
↓ 1 callersFunctionload_document_by_name
Load document by name (for native, just calls load_document).
crates/drafftink-app/src/app.rs:145
↓ 1 callersFunctionload_document_by_name_async
Load document by name from IndexedDB - triggers async load.
crates/drafftink-app/src/app.rs:405
↓ 1 callersFunctionload_excalidrawlib_async
Load an Excalidraw library (`.excalidrawlib`) via native file dialog (async, non-blocking). Retrieve via `take_pending_library()`.
crates/drafftink-app/src/app.rs:112
↓ 1 callersFunctionload_excalidrawlib_impl
()
crates/drafftink-app/src/app.rs:610
↓ 1 callersMethodload_last
Try to load the last opened document. Returns None if no last document exists.
crates/drafftink-core/src/storage/autosave.rs:129
↓ 1 callersFunctionmain
Parse arguments, run the gate, and return a process exit code. Returns 0 when all checked versions clear the cooldown window (or are explicit
utils/quarantine_check.py:78
↓ 1 callersFunctionmath_from_loro
(map: &LoroMapValue)
crates/drafftink-core/src/crdt/convert.rs:422
↓ 1 callersFunctionmath_to_ascii
Map Unicode math alphanumeric symbols to ASCII equivalents.
crates/drafftink-render/src/rex_backend.rs:12
↓ 1 callersFunctionmenu_item_enabled
Menu item with label, shortcut, and enabled state - uses drafftink_widgets.
crates/drafftink-app/src/ui.rs:2469
↓ 1 callersFunctionmerge_style
Merge a running style with a second connector run's style, preferring the more specific (dotted/thick) style if either run declares it.
crates/drafftink-core/src/mermaid/flowchart.rs:589
↓ 1 callersMethodmidpoint
Get the midpoint of the line.
crates/drafftink-core/src/shapes/line.rs:118
↓ 1 callersMethodmouse_just_pressed
(&self, button: MouseButton)
crates/drafftink-core/src/input.rs:142
↓ 1 callersMethodmouse_just_released
(&self, button: MouseButton)
crates/drafftink-core/src/input.rs:146
↓ 1 callersMethodname
Get the font family name as used by the renderer.
crates/drafftink-core/src/shapes/text.rs:25
↓ 1 callersFunctionneighbors
(cell: &Cell, turn_penalty: u64)
crates/drafftink-core/src/elbow.rs:130
↓ 1 callersMethodnext_f64
Random float in range [-1, 1]
crates/drafftink-render/src/vello_impl.rs:111
↓ 1 callersMethodnext_u32
(&mut self)
crates/drafftink-render/src/vello_impl.rs:101
↓ 1 callersFunctionnode_size
Compute the `(width, height)` a node needs to hold its label in its shape.
crates/drafftink-core/src/mermaid/flowchart.rs:941
↓ 1 callersFunctionopen_subgraph
Register (or upgrade) a subgraph cluster from its header remainder, which is a node token such as `STACK["The stack"]` or a bare id `REAL`.
crates/drafftink-core/src/mermaid/flowchart.rs:234
↓ 1 callersFunctionorient_primary
Mirror the primary coordinate for reversed directions (RL/BT).
crates/drafftink-core/src/mermaid/flowchart.rs:860
↓ 1 callersFunctionpanel_frame
Create a standard panel frame with shadow.
crates/drafftink-widgets/src/menu.rs:99
↓ 1 callersFunctionparse_args
()
crates/drafftink-app/src/main.rs:15
↓ 1 callersFunctionparse_arguments
Build the CLI surface; environment variables provide CI-friendly defaults.
utils/quarantine_check.py:110
↓ 1 callersFunctionparse_chain
Parse one statement into a chain of nodes joined by links, recording edges. Newly created nodes are assigned to the current subgraph scope.
crates/drafftink-core/src/mermaid/flowchart.rs:291
↓ 1 callersFunctionparse_color
Parse a CSS color string like "#ff0000" or "rgb(255, 0, 0)".
crates/drafftink-app/src/app.rs:1490
↓ 1 callersFunctionparse_library_item_v2
Parse a v2 `libraryItems` entry `{ name, elements: [...] }`.
crates/drafftink-core/src/excalidraw.rs:141
↓ 1 callersFunctionparse_link
Parse a link connector at `start`. Returns the link and the index just past it, or `None` if no connector is present. Handles plain connectors (`-->`
crates/drafftink-core/src/mermaid/flowchart.rs:441
↓ 1 callersFunctionparse_message
Parse a message line of the form `A <arrow> B : label`.
crates/drafftink-core/src/mermaid/sequence.rs:244
↓ 1 callersFunctionparse_note
Parse a `Note over X[,Y]: text` / `Note left of X: text` / `Note right of X: text` directive.
crates/drafftink-core/src/mermaid/sequence.rs:211
↓ 1 callersFunctionparse_participant
Parse a `participant X as Label` / `participant X` declaration.
crates/drafftink-core/src/mermaid/sequence.rs:177
↓ 1 callersFunctionparse_statement
Dispatch a single statement to the appropriate parser, maintaining the current subgraph scope.
crates/drafftink-core/src/mermaid/flowchart.rs:196
↓ 1 callersFunctionparse_style
Parse the shared style (stroke, fill, roughness, opacity) of an element.
crates/drafftink-core/src/excalidraw.rs:269
↓ 1 callersFunctionparticipant_box_width
Width of a participant box sized to its label.
crates/drafftink-core/src/mermaid/sequence.rs:357
↓ 1 callersFunctionpaste_image_async
( viewport_width: f64, viewport_height: f64, camera_offset_x: f64, camera_offs
crates/drafftink-app/src/app.rs:748
↓ 1 callersFunctionpaste_image_from_clipboard
Paste image from clipboard as a new Image shape. Returns None if no image is in the clipboard.
crates/drafftink-app/src/app.rs:193
↓ 1 callersFunctionpaste_image_from_clipboard_async
Try to paste an image from the clipboard (async). The result will be available via `take_pending_image()`.
crates/drafftink-app/src/app.rs:726
↓ 1 callersFunctionperpendicular_distance
Calculate perpendicular distance from point to line.
crates/drafftink-core/src/shapes/freehand.rs:188
↓ 1 callersFunctionplace_layer
Lay out `count` nodes into layers using longest-path ranking, returning each node's center relative to the layer group's centroid (centered at the ori
crates/drafftink-core/src/mermaid/flowchart.rs:810
↓ 1 callersFunctionpoint_to_segment_dist
Distance from a point to a line segment (a→b).
crates/drafftink-core/src/shapes/mod.rs:271
↓ 1 callersMethodpoll_events
Poll for pending events (non-blocking).
crates/drafftink-core/src/sync.rs:339
↓ 1 callersMethodpressure_at
Get pressure at index (returns 1.0 if no pressure data).
crates/drafftink-core/src/shapes/freehand.rs:86
↓ 1 callersFunctionpressures_from_loro
(map: &LoroMapValue)
crates/drafftink-core/src/crdt/convert.rs:459
↓ 1 callersMethodprimary_touch
Get the primary touch position (first finger).
crates/drafftink-core/src/input.rs:293
↓ 1 callersFunctionprocess_dropped_file
( file: web_sys::File, viewport_width: f64, viewport_height: f64, camera_offse
crates/drafftink-app/src/app.rs:1028
↓ 1 callersMethodprocess_touch
Process a touch event. Returns (pan_delta, zoom_delta, zoom_center) if gesture detected.
crates/drafftink-core/src/input.rs:208
← previousnext →401–500 of 1,090, ranked by callers