How to rotate a Canvas tile?

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?

#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

Thanks Rama this was a big help!

Any idea how to rotate text?

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