public GDISurface(int width, int height, GDISurface surface) { Init(width, height, surface.hDC); Create(); }
public void RenderTo(GDISurface target, int x, int y) { RenderTo(target.hDC, x, y); }
public void RenderTo(GDISurface target, int SourceX, int SourceY, int Width, int Height, int DestX, int DestY) { NativeMethods.BitBlt(target.hDC, DestX, DestY, Width, Height, hDC, SourceX, SourceY, (int) GDIRop.SrcCopy); }
private void SetFont(bool bold, bool italic, bool underline, GDISurface surface) { if (bold && italic && underline) surface.Font = GFX.FontBoldItalicUnderline; else if (bold && italic) surface.Font = GFX.FontBoldItalic; else if (bold && underline) surface.Font = GFX.FontBoldUnderline; else if (bold) surface.Font = GFX.FontBold; else if (italic && underline) surface.Font = GFX.FontItalicUnderline; else if (!italic && underline) surface.Font = GFX.FontUnderline; else if (italic) surface.Font = GFX.FontItalic; else if (true) surface.Font = GFX.FontNormal; }
public void RenderTo(GDISurface target, int SourceX, int SourceY, int Width, int Height, int DestX, int DestY) { NativeMethods.BitBlt(target.hDC, DestX, DestY, Width, Height, hDC, SourceX, SourceY, (int)GDIRop.SrcCopy); }
private void SetFont(bool Bold, bool Italic, bool Underline, GDISurface bbuff) { if (Bold) if (Italic) if (Underline) bbuff.Font = GFX.FontBoldItalicUnderline; else bbuff.Font = GFX.FontBoldItalic; else if (Underline) bbuff.Font = GFX.FontBoldUnderline; else bbuff.Font = GFX.FontBold; else if (Italic) if (Underline) bbuff.Font = GFX.FontItalicUnderline; else bbuff.Font = GFX.FontItalic; else if (Underline) bbuff.Font = GFX.FontUnderline; else bbuff.Font = GFX.FontNormal; }