# How to rotate a Canvas tile?

**URL:** <https://forums.unrealengine.com/t/how-to-rotate-a-canvas-tile/281990>\
**Category:** Community & Industry Discussion\
**Tags:** button, draw, canvas, unreal-engine, menu, rotate, question\
**Created:** [April 29, 2014, 10:51am UTC](https://forums.unrealengine.com/t/how-to-rotate-a-canvas-tile/281990 "2014-04-29T10:51:26Z")\
**Posts on this page:** 4\
**Page:** 1

<div class="post-metadata">

**Author:** ![Pots3](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@Pots3](https://forums.unrealengine.com/u/Pots3)\
**Post date:** [April 29, 2014, 10:51am UTC](https://forums.unrealengine.com/t/how-to-rotate-a-canvas-tile/281990/1 "2014-04-29T10:51:26Z")

</div>

How do I rotate a canvas tile so it is drawn at an angle?

In Unity there was this function

```
GUIUtility.RotateAroundPivot(angle, pivot);

```

This put everything drawn on the GUI from that point at that angle and I was wondering if Unreal had anything similar?

---

<div class="post-metadata">

**Author:** ![Rama](https://d1ap1mz92jnks1.cloudfront.net/user_avatar/forums.unrealengine.com/rama/32/882413_2.png) [@Rama](https://forums.unrealengine.com/u/Rama)\
**Post date:** [April 29, 2014, 11:22am UTC](https://forums.unrealengine.com/t/how-to-rotate-a-canvas-tile/281990/2 "2014-04-29T11:22:00Z")

</div>

#Draw Material Rotated

Dear Pots3,

You should leverage the awesome UE4 material editor and draw materials instead!

Then you have whole worlds of potential opened to you for what you can do with UI.

To rotate a material, use the rotator node and input a number for time until you get the angle you want.

You could also rotate the tile/image continuously!

You can also make Material Instances (Dynamic) and rotate the tile at specific times of your choosing via C++

#Hud.h Draw Material

```
/**
	 * Draws a material-textured quad on the HUD.
	 * @param Material Material to use
	 * @param ScreenX Screen-space X coordinate of upper left corner of the quad.
	 * @param ScreenY Screen-space Y coordinate of upper left corner of the quad.
	 * @param ScreenW Screen-space width of the quad (in pixels).
	 * @param ScreenH Screen-space height of the quad (in pixels).
	 * @param MaterialU Texture-space U coordinate of upper left corner of the quad
	 * @param MaterialV Texture-space V coordinate of upper left corner of the quad.
	 * @param MaterialUWidth	Texture-space width of the quad (in normalized UV distance).
	 * @param MaterialVHeight	Texture-space height of the quad (in normalized UV distance).
	 * @param Scale Amount to scale the entire texture (horizontally and vertically)
	 * @param bScalePosition	Whether the "Scale" parameter should also scale the position of this draw call.
	 * @param Rotation Amount to rotate this quad
	 * @param RotPivot Location (as proportion of quad, 0-1) to rotate about
	 */
	UFUNCTION(BlueprintCallable, Category=HUD, meta=(Scale = "1", bScalePosition = "false", AdvancedDisplay = "9"))
	void DrawMaterial(UMaterialInterface* Material, float ScreenX, float ScreenY, float ScreenW, float ScreenH, float MaterialU, float MaterialV, float MaterialUWidth, float MaterialVHeight, float Scale=1.f, bool bScalePosition=false, float Rotation=0.f, FVector2D RotPivot=FVector2D::ZeroVector);

```

#Draw Material Simple

```
	/**
	 * Draws a material-textured quad on the HUD. Assumes UVs such that the entire material is shown.
	 * @param Material Material to use
	 * @param ScreenX Screen-space X coordinate of upper left corner of the quad.
	 * @param ScreenY Screen-space Y coordinate of upper left corner of the quad.
	 * @param ScreenW Screen-space width of the quad (in pixels).
	 * @param ScreenH Screen-space height of the quad (in pixels).
	 * @param Scale Amount to scale the entire texture (horizontally and vertically)
	 * @param bScalePosition	Whether the "Scale" parameter should also scale the position of this draw call.
	 */
	UFUNCTION(BlueprintCallable, Category=HUD, meta=(Scale = "1", bScalePosition = "false"))
	void DrawMaterialSimple(UMaterialInterface* Material, float ScreenX, float ScreenY, float ScreenW, float ScreenH, float Scale=1.f, bool bScalePosition=false);

```

Rama

---

<div class="post-metadata">

**Author:** ![Pots3](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@Pots3](https://forums.unrealengine.com/u/Pots3)\
**Post date:** [April 29, 2014, 12:03pm UTC](https://forums.unrealengine.com/t/how-to-rotate-a-canvas-tile/281990/3 "2014-04-29T12:03:20Z")

</div>

Thanks Rama this was a big help!

Any idea how to rotate text?

---

<div class="post-metadata">

**Author:** ![sameek4](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@sameek4](https://forums.unrealengine.com/u/sameek4)\
**Post date:** [June 3, 2014, 7:13pm UTC](https://forums.unrealengine.com/t/how-to-rotate-a-canvas-tile/281990/4 "2014-06-03T19:13:10Z")

</div>

Hi Rama , Kindly let me know how I can draw a material as button background. The below link contains my blueprint and material screenshot , and a part of the C++ button where have defined basic button, but would like to achieve custom shape , which is only possible through opacity I think , hence through materials and textures. I am getting this result using the custom materia and blueprint

[https://answers.unrealengine.com/questions/51591/create-custom-shaped-button-in-c.html](https://answers.unrealengine.com/questions/51591/create-custom-shaped-button-in-c.html)
