1
0
mirror of https://github.com/Artemis-RGB/Artemis synced 2025-12-13 05:48:35 +00:00

Updated Brushes (markdown)

Robert Beekman 2016-11-02 17:23:57 +01:00
parent 097bc340e8
commit e4c2f237e0

@ -3,6 +3,12 @@ For more info on how brushes are drawn, check out [WPF LinearGradientBrush](http
**Note:** To actually draw the brushes, see the [Drawing](https://github.com/SpoinkyNL/Artemis/wiki/Drawing) section.
## Overview
* [GetColor](https://github.com/SpoinkyNL/Artemis/wiki/brushes#getcolor)
* [GetRandomColor](https://github.com/SpoinkyNL/Artemis/wiki/brushes#getrandomcolor)
* [GetSolidColorBrush](https://github.com/SpoinkyNL/Artemis/wiki/brushes#getsolidcolorbrush)
* [GetLinearGradientBrush](https://github.com/SpoinkyNL/Artemis/wiki/brushes#getlineargradientbrush)
* [GetRadialGradientBrush](https://github.com/SpoinkyNL/Artemis/wiki/brushes#getradialgradientbrush)
## Functions
### GetColor
Creates a color using the given variables.
@ -56,12 +62,13 @@ local redBrush = Brushes.GetSolidColorBrush(redColor);
#### Result:
Drawing the first brush would look like this:
![SolidColorBrush](http://i.imgur.com/NDT1lD2.png "SolidColorBrush")
---
### GetLinearGradientBrush
Returns a brush with a linear gradient
#### Syntax:
```lua
brush GetSolidColorBrush(table gradientColors, [double startX, double startY, double endX, double endY]);
brush GetLinearGradientBrush(table gradientColors, [double startX, double startY, double endX, double endY]);
```
##### Required arguments
- **gradientColors:** A table using colors as keys and doubles as offsets
@ -95,12 +102,13 @@ Drawing the first brush would look like this:
![LinearGradientBrush](http://i.imgur.com/VRgpFW0.png "LinearGradientBrush")
Drawing the second brush would look like this:
![LinearGradientBrush](http://i.imgur.com/EH5ITup.png "LinearGradientBrush")
---
### GetRadialGradientBrush
Returns a brush with a radial gradient
#### Syntax:
```lua
brush GetSolidColorBrush(table gradientColors, [double centerX, double centerY, double originX, double originY]);
brush GetRadialGradientBrush(table gradientColors, [double centerX, double centerY, double originX, double originY]);
```
##### Required arguments
- **gradientColors:** A table using colors as keys and doubles as offsets