/// <summary> /// Draw this line /// </summary> public virtual bool Draw(RootElement source, OnRenderEventArgs eventArgs) { if (Visible) { return(MtaClient.DxDrawLine3D(StartPosition.X, StartPosition.Y, StartPosition.Z, EndPosition.X, EndPosition.Y, EndPosition.Z, Color.Hex, Width, PostGUI)); } return(false); }
public bool Draw(RootElement source, OnRenderEventArgs eventArgs) { UpdateDrawables(); backgroundDrawable.Draw(source, eventArgs); nameDrawable.Draw(source, eventArgs); timeDrawable.Draw(source, eventArgs); return(true); }
public bool Draw(RootElement source, OnRenderEventArgs eventArgs) { if (useCustomFont) { return(MtaClient.DxDrawText(Content, Position.X, Position.Y, BottomRight.X, BottomRight.Y, Color.Hex, Scale.X, Scale.Y, CustomFont.MTAFont, HorizontalAlignment.ToString().ToLower(), VerticalAlignment.ToString().ToLower(), Clip, WordBreak, PostGUI, ColorCoded, SubPixelPositioning, Rotation, RotationOrigin.X, RotationOrigin.Y)); } else { return(MtaClient.DxDrawText(Content, Position.X, Position.Y, BottomRight.X, BottomRight.Y, Color.Hex, Scale.X, Scale.Y, StandardFont.ToString().ToLower(), HorizontalAlignment.ToString().ToLower(), VerticalAlignment.ToString().ToLower(), Clip, WordBreak, PostGUI, ColorCoded, SubPixelPositioning, Rotation, RotationOrigin.X, RotationOrigin.Y)); } }
/// <summary> /// Draw this material line /// </summary> public override bool Draw(RootElement source, OnRenderEventArgs eventArgs) { if (FaceToward == Vector3.Zero) { return(MtaClient.DxDrawMaterialLine3D(StartPosition.X, StartPosition.Y, StartPosition.Z, EndPosition.X, EndPosition.Y, EndPosition.Z, Material?.MaterialElement, Width, Color.Hex, PostGUI)); } else { return(MtaClient.DxDrawMaterialLine3D(StartPosition.X, StartPosition.Y, StartPosition.Z, EndPosition.X, EndPosition.Y, EndPosition.Z, Material?.MaterialElement, Width, Color.Hex, PostGUI, FaceToward.X, FaceToward.Y, FaceToward.Z)); } }
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)); } }
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 bool Draw(RootElement source, OnRenderEventArgs eventArgs) { this.image.Draw(source, eventArgs); return(true); }
private void DebugDraw(RootElement source, OnRenderEventArgs eventArgs) { Draw(source, eventArgs); }
/// <summary> /// Draw this circle /// </summary> public bool Draw(RootElement source, OnRenderEventArgs eventArgs) { return(MtaClient.DxDrawCircle(Position.X, Position.Y, Radius, StartAngle, StopAngle, Color.Hex, CenterColor.Hex, Segments, Ratio, PostGUI)); }
/// <summary> /// Draw the line /// </summary> public bool Draw(RootElement source, OnRenderEventArgs eventArgs) { return(MtaClient.DxDrawLine((int)Position.X, (int)Position.Y, (int)End.X, (int)End.Y, Color.Hex, Width, PostGUI)); }
/// <summary> /// Draw this rectangle /// </summary> public bool Draw(RootElement source, OnRenderEventArgs eventArgs) { return(MtaClient.DxDrawRectangle(Position.X, Position.Y, Dimensions.X, Dimensions.Y, Color.Hex, PostGUI, SubPixelPositioning)); }