public GdiPlusRenderSurface(int width, int height) { #if DEBUG debug_canvas_id = dbug_canvasCount + 1; dbug_canvasCount += 1; #endif //2. dimension _left = 0; _top = 0; _right = _left + width; _bottom = _top + height; _currentClipRect = new System.Drawing.Rectangle(0, 0, width, height); //-------------- _win32MemDc = new NativeWin32MemoryDC(width, height, false); _win32MemDc.PatBlt(NativeWin32MemoryDC.PatBltColor.White); _win32MemDc.SetBackTransparent(true); _win32MemDc.SetClipRect(0, 0, width, height); //-------------- _memBmp = new CpuBlit.MemBitmap(width, height, _win32MemDc.PPVBits); _originalHdc = _win32MemDc.DC; _gx = System.Drawing.Graphics.FromHdc(_win32MemDc.DC); //-------------- //TODO: review here how to set default font*** //set default font Win32.Win32Font font = Win32.FontHelper.CreateWin32Font("Tahoma", 10, false, false); _hFont = font.GetHFont(); _win32MemDc.SetFont(_hFont); //--------------------- //-------------- //set default font and default text color this.CurrentFont = new RequestFont("tahoma", 14); this.CurrentTextColor = Color.Black; //------------------------------------------------------- //managed object _internalPen = new System.Drawing.Pen(System.Drawing.Color.Black); _internalSolidBrush = new System.Drawing.SolidBrush(System.Drawing.Color.Black); this.StrokeWidth = 1; }