Docs
v4
API Docs

Brush

Brush tool

The high performant brush engine of the PhotoEditor SDK is optimized for touch screen interaction and supports different brush strokes that can be edited in terms of thickness and color.

Specifying brush presets

In order to specify brush size presets, use the thicknessPresets option:

const editor = new PhotoEditorSDK.UI.ReactUI({
  controlsOptions: {
    brush: {
      thicknessPresets: [
        0.01, 0.02, 0.03, 0.05, 0.1
      ]
    }
  }
})

Please note that the thickness is relative to the shortest edge of your image. If your image is 200x500 pixels and the brush thickness is 0.05, the final thickness on the image will be 200 * 0.05 = 10 pixels.