public virtual bool Draw(RootElement source, OnRenderEventArgs eventArgs) { if (usePath) { return(MtaClient.DxDrawImage(Position.X, Position.Y, Dimensions.X, Dimensions.Y, FilePath, Rotation, RotationCenter.X, RotationCenter.Y, Color.Hex)); } else { return(MtaClient.DxDrawImage(Position.X, Position.Y, Dimensions.X, Dimensions.Y, Material?.MaterialElement, Rotation, RotationCenter.X, RotationCenter.Y, Color.Hex)); } }
public static bool DrawImage(Material material, Vector2 position, Vector2 dimensions, Color color, Vector2 rotationCenterOffset, float rotation = 0, bool postGui = false) { return(MtaClient.DxDrawImage(position.X, position.Y, dimensions.X, dimensions.Y, material?.MaterialElement, rotation, rotationCenterOffset.X, rotationCenterOffset.Y, color.Hex, postGui)); }
public static bool DrawImage(string filePath, Vector2 position, Vector2 dimensions, Color color, Vector2 rotationCenterOffset, float rotation = 0, bool postGui = false) { return(MtaClient.DxDrawImage(position.X, position.Y, dimensions.X, dimensions.Y, filePath, rotation, rotationCenterOffset.X, rotationCenterOffset.Y, color.Hex, postGui)); }