Beispiel #1
0
 public GDISurface(int width, int height, GDISurface surface)
 {
     Init(width, height, surface.hDC);
     Create();
 }
Beispiel #2
0
 public void RenderTo(GDISurface target, int x, int y)
 {
     RenderTo(target.hDC, x, y);
 }
Beispiel #3
0
 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);
 }
Beispiel #4
0
        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;
        }