コード例 #1
0
        void ClearPreviousStoredValues()
        {
            painter1.SetOrigin(0, 0);

            this.canvasOriginX = 0;
            this.canvasOriginY = 0;
            this.clipRectStack.Clear();
        }
コード例 #2
0
        void ClearPreviousStoredValues()
        {
            _gpuPainter.SetOrigin(0, 0);

            _canvasOriginX = 0;
            _canvasOriginY = 0;
            _clipRectStack.Clear();
        }
コード例 #3
0
        public override void AttachToBackBuffer(DrawboardBuffer backbuffer)
        {
#if DEBUG
            if (dbugSwitchCount > 0)
            {
            }
            dbugSwitchCount++;
#endif

            //save prev context
            SaveContext prevContext = new SaveContext();
            prevContext.prevClipRect        = _currentClipRect;
            prevContext.prevCanvasOrgX      = _canvasOriginX;
            prevContext.prevCanvasOrgY      = _canvasOriginY;
            prevContext.prevGLRenderSurface = _gpuPainter.PainterContext.CurrentRenderSurface;
            _saveContexts.Push(prevContext);

            //_prevClipRect = _currentClipRect;
            _currentClipRect = new Rectangle(0, 0, backbuffer.Width, backbuffer.Height);
            MyGLBackbuffer glBackBuffer = (MyGLBackbuffer)backbuffer;

            _gpuPainter.PainterContext.AttachToRenderSurface(glBackBuffer.RenderSurface);
            _gpuPainter.PainterContext.OriginKind = RenderSurfaceOrientation.LeftTop;
            _gpuPainter.UpdatePainterContext();

            _left   = 0;
            _top    = 0;
            _width  = _gpuPainter.Width;
            _height = _gpuPainter.Height;


            //_prevCanvasOrgX = _canvasOriginX;
            //_prevCanvasOrgY = _canvasOriginY;

            _canvasOriginX = 0;
            _canvasOriginY = 0;
            _gpuPainter.SetOrigin(0, 0);
            SetClipRect(_currentClipRect);
        }