# DrawCurveSwatch

> Draw a curve swatch.

## Definition

* **Type:** Method
* **Namespace:** [UnityEditor](/engine/6000.5/script-reference/unityeditor.md)
* **Assembly:** UnityEditor.CoreModule

## DrawCurveSwatch(Rect, AnimationCurve, SerializedProperty, Color, Color)

Draw a curve swatch.

```csharp
public static void DrawCurveSwatch(Rect position, AnimationCurve curve, SerializedProperty property, Color color, Color bgColor)
```

### Parameters

**** (\[Rect]\(/engine/6000.5/script-reference/unityengine/rect)): The rectangle to draw the color swatch within.**** (\[AnimationCurve]\(/engine/6000.5/script-reference/unityengine/animationcurve)): The curve to draw.**** (\[SerializedProperty]\(/engine/6000.5/script-reference/unityeditor/serializedproperty)): The curve to draw as a SerializedProperty.**** (\[Color]\(/engine/6000.5/script-reference/unityengine/color)): The color to draw the curve with.**** (\[Color]\(/engine/6000.5/script-reference/unityengine/color)): The color to draw the background with.

### Remarks

Pass in the curve to draw either with the curve parameter or with the property parameter.

## DrawCurveSwatch(Rect, AnimationCurve, SerializedProperty, Color, Color, Color, Color)

Draw a curve swatch.

```csharp
public static void DrawCurveSwatch(Rect position, AnimationCurve curve, SerializedProperty property, Color color, Color bgColor, Color topFillColor, Color bottomFillColor)
```

### Parameters

**** (\[Rect]\(/engine/6000.5/script-reference/unityengine/rect)): The rectangle to draw the color swatch within.**** (\[AnimationCurve]\(/engine/6000.5/script-reference/unityengine/animationcurve)): The curve to draw.**** (\[SerializedProperty]\(/engine/6000.5/script-reference/unityeditor/serializedproperty)): The curve to draw as a SerializedProperty.**** (\[Color]\(/engine/6000.5/script-reference/unityengine/color)): The color to draw the curve with.**** (\[Color]\(/engine/6000.5/script-reference/unityengine/color)): The color to draw the background with.**** (\[Color]\(/engine/6000.5/script-reference/unityengine/color)): **** (\[Color]\(/engine/6000.5/script-reference/unityengine/color)):&#x20;

### Remarks

Pass in the curve to draw either with the curve parameter or with the property parameter.

## DrawCurveSwatch(Rect, AnimationCurve, SerializedProperty, Color, Color, Color, Color, Rect)

Draw a curve swatch.

```csharp
public static void DrawCurveSwatch(Rect position, AnimationCurve curve, SerializedProperty property, Color color, Color bgColor, Color topFillColor, Color bottomFillColor, Rect curveRanges)
```

### Parameters

**** (\[Rect]\(/engine/6000.5/script-reference/unityengine/rect)): The rectangle to draw the color swatch within.**** (\[AnimationCurve]\(/engine/6000.5/script-reference/unityengine/animationcurve)): The curve to draw.**** (\[SerializedProperty]\(/engine/6000.5/script-reference/unityeditor/serializedproperty)): The curve to draw as a SerializedProperty.**** (\[Color]\(/engine/6000.5/script-reference/unityengine/color)): The color to draw the curve with.**** (\[Color]\(/engine/6000.5/script-reference/unityengine/color)): The color to draw the background with.**** (\[Color]\(/engine/6000.5/script-reference/unityengine/color)): **** (\[Color]\(/engine/6000.5/script-reference/unityengine/color)): **** (\[Rect]\(/engine/6000.5/script-reference/unityengine/rect)): Optional parameter to specify the range of the curve which should be included in swatch.

### Remarks

Pass in the curve to draw either with the curve parameter or with the property parameter.

## DrawCurveSwatch(Rect, AnimationCurve, SerializedProperty, Color, Color, Rect)

Draw a curve swatch.

```csharp
public static void DrawCurveSwatch(Rect position, AnimationCurve curve, SerializedProperty property, Color color, Color bgColor, Rect curveRanges)
```

### Parameters

**** (\[Rect]\(/engine/6000.5/script-reference/unityengine/rect)): The rectangle to draw the color swatch within.**** (\[AnimationCurve]\(/engine/6000.5/script-reference/unityengine/animationcurve)): The curve to draw.**** (\[SerializedProperty]\(/engine/6000.5/script-reference/unityeditor/serializedproperty)): The curve to draw as a SerializedProperty.**** (\[Color]\(/engine/6000.5/script-reference/unityengine/color)): The color to draw the curve with.**** (\[Color]\(/engine/6000.5/script-reference/unityengine/color)): The color to draw the background with.**** (\[Rect]\(/engine/6000.5/script-reference/unityengine/rect)): Optional parameter to specify the range of the curve which should be included in swatch.

### Remarks

Pass in the curve to draw either with the curve parameter or with the property parameter.
