Draw() public méthode

Draw the text to a render target
public Draw ( RenderTarget target, RenderStates states ) : void
target RenderTarget Render target to draw to
states RenderStates Current render states
Résultat void
Exemple #1
0
        public void WriteDebug(string content, Vector2f position, RenderTarget target)
        {
            var text = new SFML.Graphics.Text(content, _debugFont)
            {
                Position         = position,
                FillColor        = Color.Green,
                CharacterSize    = 8,
                Scale            = Scale,
                OutlineColor     = Color.Black,
                OutlineThickness = 1.0f
            };

            text.Draw(target, RenderStates.Default);
        }
Exemple #2
0
        /// <summary>
        /// Draws a string.
        /// </summary>
        public void DrawString(Text str, Color color )
        {
            Vector2f oldPos = str.Position;
            str.Position = oldPos +Translation;
            str.Position -= new Vector2f( str.GetLocalBounds().Left, str.GetLocalBounds().Top );

            Color oldCol = str.Color;
            str.Color = ActualColor(color);

            str.Draw(myTarget, RenderStates.Default);

            str.Color = oldCol;
            str.Position = oldPos;
        }
Exemple #3
0
 public void Draw(SFML.Graphics.Text text, RenderTarget target)
 {
     text.Draw(target, RenderStates.Default);
 }
 public void Display(RenderTarget context)
 {
     _text.Draw(context, _state);
 }