mirror of
https://github.com/DarthAffe/CUE.NET.git
synced 2025-12-13 09:08:34 +00:00
Updated Implementing an own brush (markdown)
parent
bd946b325b
commit
a91a0257d3
@ -9,7 +9,7 @@ Starting here, there are two ways to create your own logic.
|
||||
### The simple way
|
||||
This should be the preferred way for almost every case since it's possible to achieve nearly everything without much effort. Every basic-brush shipped with CUE.NET is implemented this way.
|
||||
|
||||
You start by simply deriving from _[AbstractBrush](https://github.com/DarthAffe/CUE.NET/blob/master/Brushes/AbstractBrush.cs)_ and implementing the _GetColorAtPoint_-Method which should contain the logic your brush needs to decide which color goes where.
|
||||
You start by simply deriving from _[AbstractBrush](https://github.com/DarthAffe/CUE.NET/blob/master/Brushes/AbstractBrush.cs)_ and implement the _GetColorAtPoint_-Method which should contain the logic your brush needs to decide which color goes where.
|
||||
The easiest example here is the _[SolidColorBrush](https://github.com/DarthAffe/CUE.NET/blob/master/Brushes/SolidColorBrush.cs)_. It stores a color-property containing the color which is simply returned on every call to _GetColorAtPoint_, coloring the whole region in a single color.
|
||||
```c#
|
||||
public class SolidColorBrush : AbstractBrush
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user