예제 #1
0
        public SurfaceBox()
        {
            this._scaleFactor = ScaleFactor.OneToOne;

            this._rendererList              = new SurfaceBoxRenderList(this.Size, this.Size);
            this._rendererList.Invalidated += Renderers_Invalidated;
            this._baseRenderer              = new SurfaceBoxBaseRenderer(this._rendererList, null);
            this._rendererList.Add(this._baseRenderer, false);

            this.DoubleBuffered = true;
        }
예제 #2
0
        public void RenderTo(Surface dst)
        {
            dst.Clear(ColorBgra.Transparent);

            if (this._surface != null)
            {
                var sbrl = new SurfaceBoxRenderList(this._surface.Size, dst.Size);
                var sbbr = new SurfaceBoxBaseRenderer(sbrl, this._surface);
                sbrl.Add(sbbr, true);
                sbrl.Render(dst, new Point(0, 0));
                sbrl.Remove(sbbr);
            }
        }
 public SurfaceBoxGraphicsRenderer(SurfaceBoxRenderList ownerList)
     : base(ownerList)
 {
 }
예제 #4
0
 public SurfaceBoxBaseRenderer(SurfaceBoxRenderList ownerList, Surface source)
     : base(ownerList)
 {
     this._source = source;
     ChooseRenderDelegate();
 }
예제 #5
0
 public SurfaceBoxGridRenderer(SurfaceBoxRenderList ownerList)
     : base(ownerList)
 {
 }
예제 #6
0
 public SurfaceBoxRenderer(SurfaceBoxRenderList ownerList)
 {
     this._ownerList = ownerList;
     this._visible   = true;
 }