using System; using System.Drawing; namespace BizHawk.Client.EmuHawk.CustomControls { public interface IControlRenderer : IDisposable { /// /// Required to use before calling drawing methods /// IDisposable LockGraphics(Graphics g, int width, int height); /// /// Measure the width and height of string when drawn /// using the given font /// Size MeasureString(string str, Font font); void SetBrush(Color color); void SetSolidPen(Color color); void PrepDrawString(Font font, Color color, bool rotate = false); /// /// Draw the given string using the given font and foreground color at given location /// void DrawString(string str, Point point); void DrawRectangle(int nLeftRect, int nTopRect, int nRightRect, int nBottomRect); void FillRectangle(int x, int y, int w, int h); /// /// Draw a bitmap object at the given position /// void DrawBitmap(Bitmap bitmap, Point point); void Line(int x1, int y1, int x2, int y2); } }