Skip to content

Conversation

UziTech
Copy link
Collaborator

@UziTech UziTech commented May 6, 2024

Add new options for highlighting strokes

new options:

  • highlightColor: default to blank to remove highlight
  • highlightSize: default to 1 to have 1 pixel of highlight on each side of the stroke

signature

fixes #726

TODO:

  • update docs
  • figure out a way to do this without needing to draw entire stroke on every update

@849599470
Copy link

You may need to add a CSS property to the canvas:

filter: drop-shadow(0px 0px 2px #fff);

@UziTech
Copy link
Collaborator Author

UziTech commented Jul 17, 2025

Thanks for the suggestion but that just applies the drop-shadow to the canvas element not the drawing on the canvas.

image

@849599470
Copy link

Thanks for the suggestion but that just applies the drop-shadow to the canvas element not the drawing on the canvas.

image

When initializing Signature, set the background color to transparent.

new Signature(canvasDom, {
    // other options
    backgroundColor: "rgba(0,0,0,0)",
})

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Pen highlight for drawing on images
2 participants