public MyGdiPlusCanvas(GraphicsPlatform platform, System.Drawing.Graphics targetGfx, int left, int top, int width, int height) { //platform specific Win32 //1. this.platform = platform; this.targetGfx = this.gx = targetGfx; //2. dimension this.left = left; this.top = top; this.right = left + width; this.bottom = top + height; currentClipRect = new System.Drawing.Rectangle(0, 0, width, height); var fontInfo = platform.GetFont("tahoma", 10, FontStyle.Regular); this.CurrentFont = defaultFont = fontInfo.ResolvedFont; this.CurrentTextColor = Color.Black; internalPen = new System.Drawing.Pen(System.Drawing.Color.Black); internalSolidBrush = new System.Drawing.SolidBrush(System.Drawing.Color.Black); #if DEBUG debug_canvas_id = dbug_canvasCount + 1; dbug_canvasCount += 1; #endif this.StrokeWidth = 1; }
public MyScreenCanvas(GraphicsPlatform platform, int horizontalPageNum, int verticalPageNum, int left, int top, int width, int height) { //platform specific Win32 //1. this.platform = platform; this.pageNumFlags = (horizontalPageNum << 8) | verticalPageNum; //2. dimension this.left = left; this.top = top; this.right = left + width; this.bottom = top + height; CreateGraphicsFromNativeHdc(width, height); //------------------------------------------------------- currentClipRect = new System.Drawing.Rectangle(0, 0, width, height); var fontInfo = platform.GetFont("tahoma", 10, FontStyle.Regular); this.CurrentFont = defaultFont = fontInfo.ResolvedFont; this.CurrentTextColor = Color.Black; internalPen = new System.Drawing.Pen(System.Drawing.Color.Black); internalSolidBrush = new System.Drawing.SolidBrush(System.Drawing.Color.Black); #if DEBUG debug_canvas_id = dbug_canvasCount + 1; dbug_canvasCount += 1; #endif this.StrokeWidth = 1; }