예제 #1
0
 public override bool Draw(RootElement source, OnRenderEventArgs eventArgs)
 {
     if (usePath)
     {
         return(MtaClient.DxDrawImageSection(Position.X, Position.Y, Dimensions.X, Dimensions.Y, SectionTopLeft.X, SectionTopLeft.Y, SectionDimensions.X, SectionDimensions.Y, FilePath, Rotation, RotationCenter.X, RotationCenter.Y, Color.Hex, PostGUI));
     }
     else
     {
         return(MtaClient.DxDrawImageSection(Position.X, Position.Y, Dimensions.X, Dimensions.Y, SectionTopLeft.X, SectionTopLeft.Y, SectionDimensions.X, SectionDimensions.Y, Material?.MaterialElement, Rotation, RotationCenter.X, RotationCenter.Y, Color.Hex, PostGUI));
     }
 }
예제 #2
0
파일: Dx.cs 프로젝트: calinipate/Slipe-Core
 public static bool DrawImageSection(Material material, Vector2 position, Vector2 dimensions, Vector2 topLeft, Vector2 size, Color color, Vector2 rotationCenterOffset, float rotation = 0, bool postGui = false)
 {
     return(MtaClient.DxDrawImageSection(position.X, position.Y, dimensions.X, dimensions.Y, topLeft.X, topLeft.Y, size.X, size.Y, material?.MaterialElement, rotation, rotationCenterOffset.X, rotationCenterOffset.Y, color.Hex, postGui));
 }