Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

How to create filled rectangle/ellipse #19

Open
lalyos opened this issue Jun 9, 2022 · 1 comment
Open

How to create filled rectangle/ellipse #19

lalyos opened this issue Jun 9, 2022 · 1 comment

Comments

@lalyos
Copy link

lalyos commented Jun 9, 2022

The Brush documentation hints that a rentagle can be filled:

"Color filled, only works in rectangle and ellipse mode."

But how is it activated on the ui?

@haykkh
Copy link
Contributor

haykkh commented Aug 16, 2023

Set the brush's fill to your desired color, eg

drauu.options.brush.fill = 'red'

or

import { createDrauu } from 'drauu'

const drauu = createDrauu({ 
  el: '#svg',
  brush: {
    mode: 'rectangle', // 'reactangle', 'ellipse'
    color: 'skyblue',
    size: 5,
    fill: 'red'
  }
})

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

No branches or pull requests

2 participants