Chroma Paint
Brush
Texture2DExtensions
TextureCoordinate
Brush
Description
A brush helps paint a nice clean brush swipe onto a texture,
just as it does in real life. The way it works is in sessions,
and can only be in one session at a time. So to get started,
create a brush via calling it's default constructor. Next configure
it's properties. And finally call the methods
BeginSession (), UpdateSession (), and EndSession () respectively.
Properties
ImageTarget : Texture2DImage to paint onto.
Color : ColorColor of brush to paint with.
Cookie : Texture2DThis is the shape image of the brush.
FillImage : Texture2DThe color image.
UseFillImage : boolDetermines wether the FillImage should be ignored or not.
LockAlpha : boolShould the brush write to the Image's alpha channel.
Spacing : intThe number of pixels that the brush must travel before painting a new decal.
DragMode : boolCheck Unity Preferences for more info.
Size : intRadius of the brush in pixels. Ranges from 1 to infinity.
InSession : boolReturns wether the brush is currently painting or not.
CloneOffset : TextureCoordinateThe amount of offset to use when in Clone ToolMode.
PrecisionLevel : PrecisionModeCheck Unity Preferences for more info.
Methods
BeginPaintSession (ToolMode mode, TextureCoordinate position)Begins the paint session at position.
UpdatePaintSession (TextureCoordinate position)Updates the brushes location.
EndPaintSession ()Ends the paint session, is a requirement before it can start painting again.
Constructors
Brush (int size, Color color, Texture2D imageTarget, Texture2D fillImage)
Brush ()
Brush (Texture2D imageTarget)
Brush (Texture2D imageTarget, Texture2D fillImage)