Esempio n. 1
0
 public BatchedPositionedSpriteRenderer(IRenderCallback <TRenderTile, TContext> parent)
 {
     this.parent       = parent ?? throw new ArgumentNullException(nameof(parent));
     spritesPreOffset  = new BatchBuffer <PositionedSprite>(new PositionedSpriteComparer());
     spritesPostOffset = new BatchBuffer <PositionedSprite>(new PositionedSpriteComparer());
     drawDelegate      = DrawTile;
 }
Esempio n. 2
0
 public PlotOperation(ITileMatcher <TRenderTile, TContext> matcher,
                      RenderType renderType,
                      IRenderCallback <TRenderTile, TContext> renderer = null)
 {
     this.matcher = matcher;
     adapter      = new RendererAdapter <TRenderTile, TContext>(renderType, renderer);
     onMatchFound = adapter.MatchFound;
 }
Esempio n. 3
0
        public BatchedPlotOperation(IRenderCallback <TRenderTile, TContext> renderer,
                                    params IRenderPlotOperation <TRenderTile, TContext>[] plots)
        {
            plotOperations = new List <IRenderPlotOperation <TRenderTile, TContext> >();
            activeRenderer = new BatchedSpriteRenderer <TRenderTile, TContext>();
            Renderer       = renderer ?? throw new ArgumentNullException();

            foreach (var plot in plots)
            {
                Add(plot);
            }
        }
Esempio n. 4
0
 public RendererAdapter(RenderType renderType,
                        IRenderCallback <TRenderTile, TContext> renderer = null)
 {
     Renderer          = renderer;
     mapToScreenMapper = ScreenCoordinateMapping.CreateMapToScreenMapper(renderType);
 }
Esempio n. 5
0
 public void Replay(IRenderCallback <TRenderTile, TContext> parent, in ContinuousViewportCoordinates vp)
Esempio n. 6
0
 public AfterCachePlotOperationFactory <TRenderTile, TContext> WithRenderer(IRenderCallback <TRenderTile, TContext> renderer)
 {
     plotOperation.Renderer = renderer;
     return(this);
 }
Esempio n. 7
0
 public ClippingRenderer(IRenderCallback <TextTile, Nothing> parent, IntRect clipRect)
 {
     this.parent   = parent;
     this.clipRect = clipRect;
 }
Esempio n. 8
0
        public void BeginProcessing(IRenderCallback renderCallback)
        {
            RenderCallback = renderCallback;

            Application.Run(this);
        }
Esempio n. 9
0
 public BatchedSpriteRenderer(IRenderCallback <TRenderTile, TContext> parent = null)
 {
     this.parent = parent;
 }
Esempio n. 10
0
 public RenderLayer(IRenderCallback <TRenderTile, TContext> renderer,
                    IPlotOperation plotOperation)
 {
     Renderer      = renderer ?? throw new ArgumentNullException(nameof(renderer));
     PlotOperation = plotOperation ?? throw new ArgumentNullException(nameof(plotOperation));
 }