// outdated public void RenderText(IRenderTarget destination, Point position, string text, int characterSize, Color color, bool bold, bool italic, bool underline) { UpdateCachedFont(characterSize); Texture textTexture = new Texture(cachedFont.Render(text, global::System.Drawing.Color.FromArgb(color.A, color.R, color.G, color.B))); destination.Draw(textTexture, position); }
public ITexture LoadTexture(string filePath) { SdlDotNet.Graphics.Surface surface = new SdlDotNet.Graphics.Surface(filePath);//.Convert(SdlDotNet.Graphics.Video.Screen); surface.Alpha = 255; surface.AlphaBlending = true; surface.TransparentColor = global::System.Drawing.Color.FromArgb(0, 255, 255, 255); surface.Transparent = true; //surface.Transparent = true; Texture texture = new Texture(surface); return texture; }
public RenderTexture(Surface surface) : base(surface) { texture = new Texture(surface); }
public ITexture LoadTexture(byte[] data) { SdlDotNet.Graphics.Surface surface = new Surface(data).Convert(); surface.Alpha = 255; surface.AlphaBlending = true; Texture texture = new Texture(surface); return texture; }