Code
Hub
Workspaces
Following
Trending
Connect
MCP
copy
Create free account
hub
/
github.com/PatWie/drafft-ink
/ functions
Functions
1,090 in github.com/PatWie/drafft-ink
⨍
Functions
1,090
◇
Types & classes
146
↓ 1 callers
Method
process_window_event
Process a window event. Returns true on redraw request.
crates/drafftink-core/src/input.rs:80
↓ 1 callers
Function
rdp_simplify_with_pressure
Ramer-Douglas-Peucker line simplification with pressure preservation.
crates/drafftink-core/src/shapes/freehand.rs:126
↓ 1 callers
Function
read_embedded_label
Read an embedded label (quoted or bare) at `start`, returning the trimmed label text and the index just past it. A bare label stops at a connector cha
crates/drafftink-core/src/mermaid/flowchart.rs:556
↓ 1 callers
Function
read_pipe_label
Read a `|...|` label starting at the opening pipe. Returns the label and the index past the closing pipe.
crates/drafftink-core/src/mermaid/flowchart.rs:507
↓ 1 callers
Function
rectangle_from_loro
(map: &LoroMapValue)
crates/drafftink-core/src/crdt/convert.rs:300
↓ 1 callers
Method
remove_shape
Remove a shape, syncing to CRDT if enabled.
crates/drafftink-core/src/collaboration.rs:150
↓ 1 callers
Method
render_angle_snap_guides
Render angle snap visualization (polar rays and angle arc).
crates/drafftink-render/src/vello_impl.rs:1919
↓ 1 callers
Method
render_badge
Render a small text badge (background rect + white text).
crates/drafftink-render/src/vello_impl.rs:1762
↓ 1 callers
Function
render_bottom_toolbar
Render the bottom-left toolbar with grid toggle and zoom controls.
crates/drafftink-app/src/ui.rs:756
↓ 1 callers
Function
render_collaboration_modal
Render the collaboration modal dialog.
crates/drafftink-app/src/ui.rs:2169
↓ 1 callers
Method
render_eraser_cursor
Render eraser cursor (circle showing eraser radius).
crates/drafftink-render/src/vello_impl.rs:2153
↓ 1 callers
Function
render_file_menu
Render the hamburger menu and collab button at top-left.
crates/drafftink-app/src/ui.rs:1860
↓ 1 callers
Method
render_freehand_with_pressure
Render a freehand shape with variable width based on pressure.
crates/drafftink-render/src/vello_impl.rs:711
↓ 1 callers
Method
render_grid_crosses
Render grid as small crosses (+) at intersections. Uses batched paths for performance.
crates/drafftink-render/src/vello_impl.rs:2276
↓ 1 callers
Method
render_grid_dots
Render grid as dots at intersections. Uses batched rectangles for performance.
crates/drafftink-render/src/vello_impl.rs:2308
↓ 1 callers
Method
render_handle
Render a single handle. Stroke widths are scaled inversely with zoom to maintain constant screen size.
crates/drafftink-render/src/vello_impl.rs:1510
↓ 1 callers
Method
render_horizontal_lines
(&mut self, viewport: Rect, transform: Affine, grid_size: f64)
crates/drafftink-render/src/vello_impl.rs:2256
↓ 1 callers
Method
render_image
Render an image shape.
crates/drafftink-render/src/vello_impl.rs:1019
↓ 1 callers
Method
render_laser_pointer
Render laser pointer with trail.
crates/drafftink-render/src/vello_impl.rs:2174
↓ 1 callers
Method
render_math
Render a math (LaTeX) shape using ReX.
crates/drafftink-render/src/vello_impl.rs:1112
↓ 1 callers
Function
render_math_editor
Render the math equation editor dialog.
crates/drafftink-app/src/ui.rs:2911
↓ 1 callers
Function
render_open_dialog
Render the open dialog modal with dropdown.
crates/drafftink-app/src/ui.rs:2720
↓ 1 callers
Function
render_open_recent_dialog
Render the open recent dialog modal.
crates/drafftink-app/src/ui.rs:2800
↓ 1 callers
Function
render_presence_panel
Render the presence panel showing connected users.
crates/drafftink-app/src/ui.rs:2517
↓ 1 callers
Function
render_properties_panel
Render the properties panel at the top.
crates/drafftink-app/src/ui.rs:1020
↓ 1 callers
Function
render_right_panel
Render the right-side properties panel for selected shapes.
crates/drafftink-app/src/ui.rs:1326
↓ 1 callers
Method
render_rotation_guides
Render rotation helper lines (center crosshair and angle indicator).
crates/drafftink-render/src/vello_impl.rs:2029
↓ 1 callers
Function
render_save_dialog
Render the save dialog modal.
crates/drafftink-app/src/ui.rs:2631
↓ 1 callers
Method
render_selection_rect
Render a selection rectangle (marquee). Stroke width and dash pattern are scaled inversely with zoom.
crates/drafftink-render/src/vello_impl.rs:2131
↓ 1 callers
Method
render_shape_handles
Render shape-specific selection handles. Handles are scaled inversely with zoom to maintain constant screen size.
crates/drafftink-render/src/vello_impl.rs:1459
↓ 1 callers
Function
render_shortcuts_modal
Render the keyboard shortcuts modal.
crates/drafftink-app/src/ui.rs:2558
↓ 1 callers
Method
render_smart_guides
Render smart guide lines (magenta alignment guides like Figma).
crates/drafftink-render/src/vello_impl.rs:1840
↓ 1 callers
Method
render_snap_guides
Render snap guides (crosshairs at the snap point).
crates/drafftink-render/src/vello_impl.rs:1715
↓ 1 callers
Function
render_tab_bar
Render the tab strip (top-center) with one button per open canvas plus a control to load an Excalidraw library as a new tab. Icons in a library tab ar
crates/drafftink-app/src/ui.rs:659
↓ 1 callers
Method
render_text
Render a text shape using Parley for proper text layout.
crates/drafftink-render/src/vello_impl.rs:796
↓ 1 callers
Method
render_text_editing
Render a text shape in edit mode using PlainEditor state. This renders the text with cursor and selection highlights.
crates/drafftink-render/src/vello_impl.rs:1199
↓ 1 callers
Function
render_toolbar
Render the toolbar and return any triggered action.
crates/drafftink-app/src/ui.rs:726
↓ 1 callers
Function
render_ui
Render all UI and return any triggered action.
crates/drafftink-app/src/ui.rs:627
↓ 1 callers
Function
report_and_exit_code
Print a human-readable report and return the process exit code.
utils/quarantine_check.py:331
↓ 1 callers
Function
request_clipboard_text
Request clipboard text read (async). Result will be available via take_pending_clipboard_text().
crates/drafftink-app/src/app.rs:279
↓ 1 callers
Function
request_clipboard_text_for_math
Request clipboard text for math editor (async).
crates/drafftink-app/src/app.rs:290
↓ 1 callers
Method
reverse
(&self)
crates/drafftink-core/src/elbow.rs:30
↓ 1 callers
Function
rotate_only_handle
Generate only a rotation handle (no corner resize handles).
crates/drafftink-core/src/selection.rs:203
↓ 1 callers
Function
secondary_btn
Secondary button (gray background, gray text).
crates/drafftink-widgets/src/common.rs:17
↓ 1 callers
Function
segments_intersect
Test if two line segments (a-b) and (c-d) intersect.
crates/drafftink-core/src/shapes/mod.rs:578
↓ 1 callers
Method
selection_range
Get the current selection range as byte offsets. Returns None if selection is collapsed (just a cursor).
crates/drafftink-render/src/text_editor.rs:153
↓ 1 callers
Method
selection_rect
Get the current selection rectangle (for rendering).
crates/drafftink-app/src/event_handler.rs:221
↓ 1 callers
Method
send_to_back
Send a shape to the back (bottom of z-order).
crates/drafftink-core/src/crdt/schema.rs:193
↓ 1 callers
Method
set_brush
Set the text brush color.
crates/drafftink-render/src/text_editor.rs:140
↓ 1 callers
Method
set_font_size
Set the font size.
crates/drafftink-render/src/text_editor.rs:146
↓ 1 callers
Method
set_latex
(&mut self, latex: String)
crates/drafftink-core/src/shapes/math.rs:93
↓ 1 callers
Method
set_name
Set the document name.
crates/drafftink-core/src/crdt/schema.rs:324
↓ 1 callers
Function
set_pending_image
(shape: drafftink_core::shapes::Shape)
crates/drafftink-app/src/app.rs:892
↓ 1 callers
Function
setup_drag_drop_handlers
Setup drag-drop handlers on the canvas element. Call this once after the canvas is created.
crates/drafftink-app/src/app.rs:939
↓ 1 callers
Function
shape_delimiters
Identify a shape bracket opening at `i`, returning `(open, close, shape)`. Two-character delimiters are tested before single-character ones.
crates/drafftink-core/src/mermaid/flowchart.rs:406
↓ 1 callers
Method
shapes_in_rect
Find shapes that intersect or are contained within a rectangle.
crates/drafftink-core/src/canvas.rs:231
↓ 1 callers
Method
shortcut
Set keyboard shortcut (shown in hover tooltip).
crates/drafftink-widgets/src/buttons.rs:136
↓ 1 callers
Method
should_save
Check if enough time has passed for an auto-save.
crates/drafftink-core/src/storage/autosave.rs:78
↓ 1 callers
Function
sloppiness_to_i64
(s: Sloppiness)
crates/drafftink-core/src/crdt/convert.rs:551
↓ 1 callers
Method
small
Create a small icon button style (24x24 button, 16x16 icon) for bottom toolbar
crates/drafftink-widgets/src/buttons.rs:51
↓ 1 callers
Function
snap_ray_to_smart_guides
Snap a point along an angle ray to smart guides. Returns the intersection of the ray with the nearest aligned shape edge.
crates/drafftink-core/src/snap.rs:324
↓ 1 callers
Method
state
Get the state of a shape.
crates/drafftink-core/src/widget/manager.rs:37
↓ 1 callers
Method
step
Call at the start of each frame.
crates/drafftink-core/src/input.rs:69
↓ 1 callers
Method
storage
Get a reference to the storage backend.
crates/drafftink-core/src/storage/autosave.rs:160
↓ 1 callers
Function
strip_code_fence
Remove a surrounding Markdown code fence (```mermaid ... ```), if present, and return the inner diagram text. Leaves un-fenced input untouched.
crates/drafftink-core/src/mermaid/mod.rs:143
↓ 1 callers
Function
strip_inline_comment
Strip a trailing Mermaid `%% ...` comment.
crates/drafftink-core/src/mermaid/flowchart.rs:277
↓ 1 callers
Function
strip_inline_comment
Strip a trailing Mermaid `%% ...` comment from a line.
crates/drafftink-core/src/mermaid/sequence.rs:155
↓ 1 callers
Function
switch_to_tab
Switch the active tab, preserving the outgoing tab's edits.
crates/drafftink-app/src/app.rs:1725
↓ 1 callers
Function
take_pending_clipboard_text
Take pending clipboard text if available.
crates/drafftink-app/src/app.rs:306
↓ 1 callers
Function
take_pending_document
Take pending document from async load operation.
crates/drafftink-app/src/app.rs:106
↓ 1 callers
Function
take_pending_document_list
Take the pending document list.
crates/drafftink-app/src/app.rs:447
↓ 1 callers
Function
take_pending_dropped_document
Take any pending dropped document JSON.
crates/drafftink-app/src/app.rs:1113
↓ 1 callers
Function
take_pending_dropped_images
Take all pending dropped images.
crates/drafftink-app/src/app.rs:1124
↓ 1 callers
Function
take_pending_excalidraw_shapes
Take pending Excalidraw shapes from clipboard paste.
crates/drafftink-app/src/app.rs:927
↓ 1 callers
Function
take_pending_image
Take the pending image from clipboard paste.
crates/drafftink-app/src/app.rs:899
↓ 1 callers
Function
take_pending_library
Take a pending library `(name, document)` from an async load.
crates/drafftink-app/src/app.rs:140
↓ 1 callers
Function
take_pending_math_clipboard
Take pending math clipboard text if available.
crates/drafftink-app/src/app.rs:301
↓ 1 callers
Method
take_scene
Take ownership of the scene (resets internal scene).
crates/drafftink-render/src/vello_impl.rs:371
↓ 1 callers
Function
text_from_loro
(map: &LoroMapValue)
crates/drafftink-core/src/crdt/convert.rs:366
↓ 1 callers
Method
tool
Create a toolbar tool button style (32x32, solid blue when selected)
crates/drafftink-widgets/src/buttons.rs:66
↓ 1 callers
Method
touch_count
Get number of active touches.
crates/drafftink-core/src/input.rs:298
↓ 1 callers
Function
trigger_file_input_async
()
crates/drafftink-app/src/app.rs:592
↓ 1 callers
Function
trigger_file_input_impl
()
crates/drafftink-app/src/app.rs:653
↓ 1 callers
Method
try_auto_join_room
(&mut self)
crates/drafftink-app/src/app.rs:1989
↓ 1 callers
Method
try_auto_join_room_native
(&mut self)
crates/drafftink-app/src/app.rs:1957
↓ 1 callers
Function
try_embedded_label
Try to interpret text at `label_start` as an embedded link label that is followed by a closing connector run. Returns the completed link on success.
crates/drafftink-core/src/mermaid/flowchart.rs:520
↓ 1 callers
Function
try_load_last_document
Try to load the last document on startup.
crates/drafftink-app/src/app.rs:400
↓ 1 callers
Method
ungroup_selected
Ungroup the currently selected groups. Returns the IDs of all ungrouped children.
crates/drafftink-core/src/canvas.rs:642
↓ 1 callers
Method
ungroup_shape
Ungroup a group shape, returning its children to the document. Returns the IDs of the ungrouped children, or None if the shape is not a group.
crates/drafftink-core/src/canvas.rs:362
↓ 1 callers
Method
update_from_style
Update UI state from a shape's style.
crates/drafftink-app/src/ui.rs:361
↓ 1 callers
Method
update_laser_trail
Update laser trail (fade out old points). Call each frame.
crates/drafftink-app/src/event_handler.rs:1313
↓ 1 callers
Function
upload_document_async
Upload document from file input - triggers async file picker. Use `take_pending_document()` to retrieve the loaded document.
crates/drafftink-app/src/app.rs:461
↓ 1 callers
Method
version
Get the current version vector.
crates/drafftink-core/src/crdt/schema.rs:313
↓ 1 callers
Method
visible_world_bounds
Get the visible world bounds (viewport in world coordinates).
crates/drafftink-core/src/canvas.rs:446
↓ 1 callers
Function
wait_for_image_load
(img: &web_sys::HtmlImageElement)
crates/drafftink-app/src/app.rs:854
↓ 1 callers
Method
with_angle_snap
Set the angle snap info for rendering angle guides.
crates/drafftink-render/src/renderer.rs:179
↓ 1 callers
Method
with_background
Set the background color.
crates/drafftink-render/src/renderer.rs:149
↓ 1 callers
Method
with_editing_shape
Set the shape ID being edited (will be skipped in build_scene).
crates/drafftink-render/src/renderer.rs:167
↓ 1 callers
Method
with_eraser_cursor
Set eraser cursor position and radius.
crates/drafftink-render/src/renderer.rs:197
↓ 1 callers
Method
with_grid
Set the grid style.
crates/drafftink-render/src/renderer.rs:155
← previous
next →
501–600 of 1,090, ranked by callers