Configure Brush
VideoEditor SDK supports several configuration options for the BrushToolController
allowing flexible adaptation to different needs and use cases.
For a detailed explanation of how to configure different editor views, refer to this guide.
allowedBrushTools
#
allowedBrushTools
#By default, all available brush tools are enabled. For this example only a couple are enabled.
defaultBrushColor
#
defaultBrushColor
#The default color of the brush stroke is UIColor.white
. If you can anticipate that your use case requires a different default color you can set the defaultBrushColor
.
defaultBrushSize
#
defaultBrushSize
#Similarly, the size of the brush is set at 5% relative to the smaller side of the video by default. In our example, we prefer to set it to an absolute size of five pixels.
availableColors
#
availableColors
#In order to customize the available color palette we need to configure the BrushColorToolController
setting the option availableColors
to an array of Color
objects.
Here, we only provide a small selection of colors as might be sensible for an annotation use case.