# DrawTextureAlpha(Rect, Texture, ScaleMode, float, float)

> Draws the alpha channel of a texture within a rectangle.

## Definition

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

```csharp
public static void DrawTextureAlpha(Rect position, Texture image, ScaleMode scaleMode, float imageAspect, float mipLevel)
```

### Parameters

**** (\[Rect]\(/engine/6000.0/script-reference/unityengine/rect)): Rectangle on the screen to draw the texture within.**** (\[Texture]\(/engine/6000.0/script-reference/unityengine/texture)): [Texture](/engine/6000.0/script-reference/unityengine/texture.md) to display.**** (\[ScaleMode]\(/engine/6000.0/script-reference/unityengine/scalemode)): How to scale the image when the aspect ratio of it doesn't fit the aspect ratio to be drawn within.**** (\[float]\(https\://learn.microsoft.com/dotnet/api/system.single)): Aspect ratio to use for the source image. If 0 (the default), the aspect ratio from the image is used.**** (\[float]\(https\://learn.microsoft.com/dotnet/api/system.single)): What mip-level to sample. If negative, texture will be sampled normally. It sets material \_Mip property.

### Remarks

Additional Resources: [GUI.color](/engine/6000.0/script-reference/unityengine/gui/color.md), [GUI.contentColor](/engine/6000.0/script-reference/unityengine/gui/contentcolor.md)

![EditorGUIDrawTextureAlpha (DrawTextureAlpha(Rect, Texture, ScaleMode, float, float))](/api/media?file=/engine/6000.0/media/images/EditorGUIDrawTextureAlpha.png)

*Alpha texture in an Editor Window.*
