Beispiel #1
0
 public AdminController(
     IImportReader importReader,
     IAnalyticsWriter analyticsWriter,
     IAnalyticsReader analyticsReader,
     IRunIndexer runIndexer,
     IAnalyticsModule analyticsModules,
     IWorldFinder worldFinder,
     IWorldArchivist worldArchivist,
     IWorldLoader worldLoader,
     IWorldDeleter worldDeleter,
     IMapRenderModule mapRenderer,
     IRenderQueue renderQueue)
 {
     _importReader     = importReader;
     _analyticsReader  = analyticsReader;
     _analyticsWriter  = analyticsWriter;
     _runIndexer       = runIndexer;
     _analyticsModules = analyticsModules;
     _worldFinder      = worldFinder;
     _worldArchivist   = worldArchivist;
     _worldLoader      = worldLoader;
     _worldDeleter     = worldDeleter;
     _mapRenderer      = mapRenderer;
     _renderQueue      = renderQueue;
 }
        public HtmlImageRenderElement(IRenderQueue renderQueue, IHtmlValueConverter converter) :
            base(renderQueue)
        {
            this.converter = converter;

            bounds = Rect.Zero;

            Style.SetBounds(Bounds, converter);
        }
        public WorldRenderService(IRenderQueue queue, ILogger <WorldRenderService> logger, Container container)
        {
            _logger    = logger;
            _container = container;
            _queue     = queue;
            _timer     = new Timer(tryExecute, null, Timeout.Infinite, -1);

            _logger.LogInformation($"Hosted Service {GetType().Name} initialized.");
        }
        public HtmlImageRenderElement(IRenderQueue renderQueue, IHtmlValueConverter converter)
            : base(renderQueue)
        {
            this.converter = converter;

            bounds = Rect.Zero;

            Style.SetBounds(Bounds, converter);
        }
Beispiel #5
0
 public Model3DRenderSystem(IWorld world, IRenderQueue renderQueue, Renderer3Dv2 renderer)
     : base(world, world.EntityFilter().With <Transform3D>().With <Model3D>().With <Texture2D>()) // TODO: add support for materials
 {
     _renderQueue = renderQueue;
     _renderer    = renderer;
     _model       = Map <Model3D>();
     _transform   = Map <Transform3D>();
     _texture     = Map <Texture2D>();
 }
Beispiel #6
0
        /// <summary>
        /// Override this to prepare the render instruction to render queue
        /// </summary>
        /// <param name="renderer"></param>
        /// <param name="node"></param>
        /// <param name="entity"></param>
        public override void PrepareRenderQueue(Renderer renderer, IRenderQueue queue, Node node, Entity entity)
        {
            var lines = (Lines)entity;
            //Bind buffer
            IVertexBuffer vb = GetVertexBuffer(renderer, lines);

            lines.Synchronize(vb);
            queue.Add(RenderQueueGroupId.Geometries, pipeline, vb, 0);
        }
        public MapRenderModule(IRenderQueue queue, IMapRenderer renderer, IJobPrioritizer prioritizer, IResultWriter writer, IResultReader reader, IConfigService config, IWorldFinder finder, IWorldArchivist archivist)
        {
            _queue       = queue;
            _renderer    = renderer;
            _prioritizer = prioritizer;
            _writer      = writer;
            _reader      = reader;
            _config      = config;
            _finder      = finder;
            _archivist   = archivist;

            ensureOverviewerOutput();
        }
Beispiel #8
0
        internal bool RegisterRenderQueue(int renderQueue, IRenderQueue queue)
        {
            if (queue == null)
            {
                return(false);
            }

            if (m_RenderQueue == null)
            {
                m_RenderQueue = new SortedDictionary <int, IRenderQueue>(m_RenderQueueSort);
            }
            m_RenderQueue[renderQueue] = queue;
            return(true);
        }
Beispiel #9
0
        public HtmlRenderElement(string htmlElementTagName, string htmlElementId, IRenderQueue renderQueue)
        {
            this.HtmlElement = Document.CreateElement(htmlElementTagName);
            this.renderQueue = renderQueue;

            if (!htmlElementId.IsNullOrEmpty())
            {
                this.HtmlElement.Id = htmlElementId;
            }

            Style = new HtmlStyleDictionary(HtmlElement);
            Style.Invalidated += (sender, e) => InvalidateRender();

            this.isRenderValid = true;
        }
Beispiel #10
0
        public HtmlRenderElement(string htmlElementTagName, string htmlElementId, IRenderQueue renderQueue)
        {
            this.HtmlElement = Document.CreateElement(htmlElementTagName);
            this.renderQueue = renderQueue;

            if (!htmlElementId.IsNullOrEmpty())
            {
                this.HtmlElement.Id = htmlElementId;
            }

            Style              = new HtmlStyleDictionary(HtmlElement);
            Style.Invalidated += (sender, e) => InvalidateRender();

            this.isRenderValid = true;
        }
        public HtmlTextBoxRenderElement(IRenderQueue renderQueue, IHtmlValueConverter converter) :
            base("div", renderQueue)
        {
            this.renderQueue = renderQueue;
            this.converter   = converter;

            this.bounds     = System.Windows.Rect.Empty;
            this.fontFamily = FontFamily.Default;

            Bridge.Html5.HTMLElement styleElement = Bridge.Html5.Document.CreateElement("style");
            styleElement.TextContent = "::-ms-clear { width: 0px; height: 0px; }";

            HtmlElement.AppendChild(styleElement);

            SetContentElement();
        }
        public HtmlTextBoxRenderElement(IRenderQueue renderQueue, IHtmlValueConverter converter)
            : base("div", renderQueue)
        {
            this.renderQueue = renderQueue;
            this.converter = converter;

            this.bounds = System.Windows.Rect.Empty;
            this.fontFamily = FontFamily.Default;

            Element styleElement = Document.CreateElement("style");
            styleElement.TextContent = "::-ms-clear { width: 0px; height: 0px; }";

            HtmlElement.AppendChild(styleElement);

            SetContentElement();
        }
Beispiel #13
0
        public HtmlBorderRenderElement(IRenderQueue renderQueue, IHtmlValueConverter converter) :
            base(renderQueue)
        {
            this.converter = converter;

            bounds          = Rect.Zero;
            borderThickness = Thickness.Zero;
            cornerRadius    = CornerRadius.Zero;

            Style.SetValue("background-clip", "content-box");

            SetBackground();
            SetBorderBrush();
            SetBounds();
            SetCornerRadius();
            SetIsHitTestVisible();
        }
        public HtmlBorderRenderElement(IRenderQueue renderQueue, IHtmlValueConverter converter) :
            base(renderQueue)
        {
            this.converter = converter;

            bounds          = Rect.Zero;
            borderThickness = Thickness.Zero;
            cornerRadius    = CornerRadius.Zero;

            Style.SetValue("background-clip", "content-box");
            Style.SetBackground(Background, converter);
            Style.SetBorderThickness(BorderThickness, converter);
            Style.SetBounds(new Rect(Bounds.Location, (Bounds.Size - BorderThickness.Size).Max(Size.Zero)), converter);
            Style.SetBorderBrush(BorderBrush, converter);
            Style.SetCornerRadius(cornerRadius, converter);
            Style.SetIsHitTestVisible(IsHitTestVisible && Background != null);
        }
        public HtmlBorderRenderElement(IRenderQueue renderQueue, IHtmlValueConverter converter)
            : base(renderQueue)
        {
            this.converter = converter;

            bounds = Rect.Zero;
            borderThickness = Thickness.Zero;
            cornerRadius = CornerRadius.Zero;

            Style.SetValue("background-clip", "content-box");
            Style.SetBackground(Background, converter);
            Style.SetBorderThickness(BorderThickness, converter);
            Style.SetBounds(new Rect(Bounds.Location, (Bounds.Size - BorderThickness.Size).Max(Size.Zero)), converter);
            Style.SetBorderBrush(BorderBrush, converter);
            Style.SetCornerRadius(cornerRadius, converter);
            Style.SetIsHitTestVisible(IsHitTestVisible && Background != null);
        }
Beispiel #16
0
        public HtmlVisualRenderElement(object owner, IRenderQueue renderQueue, IHtmlValueConverter converter) :
            base(GetElementTagName(owner), GetElementId(owner), renderQueue)
        {
            this.converter = converter;

            this.children        = new List <object>();
            this.childrenActions = new List <Action>();

            bounds    = Rect.Zero;
            isVisible = true;
            opacity   = 1;
            transform = Matrix.Identity;

            Style.SetBounds(Bounds, converter);
            Style.SetClipToBounds(ClipToBounds);
            Style.SetIsHitTestVisible(IsHitTestVisible && Background != null);
            Style.SetIsVisible(IsVisible);
            Style.SetOpacity(Opacity, converter);
            Style.SetTransform(Transform, converter);
        }
        public HtmlVisualRenderElement(object owner, IRenderQueue renderQueue, IHtmlValueConverter converter)
            : base(GetElementTagName(owner), GetElementId(owner), renderQueue)
        {
            this.converter = converter;

            this.children = new List<object>();
            this.childrenActions = new List<Action>();

            bounds = Rect.Zero;
            isVisible = true;
            opacity = 1;
            transform = Transform.Identity;

            Style.SetBackground(Background, converter);
            Style.SetBounds(Bounds, converter);
            Style.SetClipToBounds(ClipToBounds);
            Style.SetIsHitTestVisible(IsHitTestVisible && Background != null);
            Style.SetIsVisible(IsVisible);
            Style.SetOpacity(Opacity, converter);
            Style.SetTransform(Transform, converter);
        }
        public HtmlTextBlockRenderElement(IRenderQueue renderQueue, IHtmlValueConverter converter)
            : base(renderQueue)
        {
            this.converter = converter;

            bounds = Rect.Zero;
            fontFamily = FontFamily.Default;
            fontSize = Double.NaN;

            Style.SetBounds(Bounds, converter);
            Style.SetForeground(Foreground, converter);
            Style.SetFontFamily(FontFamily, converter);
            Style.SetFontSize(FontSize, converter);
            Style.SetFontStyle(FontStyle, converter);
            Style.SetFontWeight(FontWeight, converter);
            Style.SetFontStretch(FontStretch, converter);
            Style.SetIsHitTestVisible(false);
            Style.SetTextAlignment(TextAlignment, converter);
            Style.SetTextTrimming(TextTrimming);
            Style.SetTextWrapping(TextWrapping, converter);
        }
Beispiel #19
0
        public HtmlTextBlockRenderElement(IRenderQueue renderQueue, IHtmlValueConverter converter) :
            base(renderQueue)
        {
            this.converter = converter;

            bounds     = Rect.Zero;
            fontFamily = FontFamily.Default;
            fontSize   = Double.NaN;

            Style.SetBounds(Bounds, converter);
            Style.SetForeground(Foreground, converter);
            Style.SetFontFamily(FontFamily, converter);
            Style.SetFontSize(FontSize, converter);
            Style.SetFontStyle(FontStyle, converter);
            Style.SetFontWeight(FontWeight, converter);
            Style.SetFontStretch(FontStretch, converter);
            Style.SetIsHitTestVisible(false);
            Style.SetTextAlignment(TextAlignment, converter);
            Style.SetTextTrimming(TextTrimming);
            Style.SetTextWrapping(TextWrapping, converter);
        }
Beispiel #20
0
 public Core(
     IApplication application,
     IApplicationMessenger applicationMessenger,
     ICoreMessenger coreMessenger,
     IFrameworkMessenger frameworkMessenger,
     ITimerFactory timerFactory,
     IUpdatePeriodFactory updatePeriodFactory,
     IFramesPerSecondMonitor framesPerSecondMonitor,
     ISystemComponents systemComponents,
     IVeldridWindowUpdater windowUpdater,
     IStartupPropertiesCache propertiesCache,
     ISdl2EventProcessor sdl2EventProcessor,
     IInputMouseKeyboard inputMouseKeyboard,
     IInputGameController inputGameController,
     IGraphics graphics,
     IDrawing drawing,
     IRenderQueue renderQueue,
     IServices services,
     IShutdownManager shutdownManager
     )
 {
     _application            = application;
     _applicationMessenger   = applicationMessenger;
     _coreMessenger          = coreMessenger;
     _frameworkMessenger     = frameworkMessenger;
     _timerFactory           = timerFactory;
     _updatePeriodFactory    = updatePeriodFactory;
     _framesPerSecondMonitor = framesPerSecondMonitor;
     _windowUpdater          = windowUpdater;
     _sdl2EventProcessor     = sdl2EventProcessor;
     _systemComponents       = systemComponents;
     _inputMouseKeyboard     = inputMouseKeyboard;
     _inputGameController    = inputGameController;
     _graphics               = graphics;
     _drawing                = drawing;
     _renderQueue            = renderQueue;
     _services               = services;
     _shutdownManager        = shutdownManager;
     _startUpPropertiesCache = propertiesCache;
 }
Beispiel #21
0
 public override void Rendering(IRenderQueue q, IRenderTarget windowRenderTarget)
 {
     // throw new NotImplementedException();
 }
Beispiel #22
0
 /// <summary>
 /// Creates a new instance of <see cref="BaseRenderer"/>.
 /// </summary>
 public BaseRenderer()
 {
     _renderQueue      = new RenderQueue(this);
     _renderStateCache = new RenderStateList();
     _enforcedStates   = new RenderStateList();
 }
Beispiel #23
0
 public HtmlRenderElement(string htmlElementTagName, IRenderQueue renderQueue)
     : this(htmlElementTagName, String.Empty, renderQueue)
 {
     //
 }
Beispiel #24
0
 public HtmlRenderElement(IRenderQueue renderQueue)
     : this("div", String.Empty, renderQueue)
 {
     //
 }
Beispiel #25
0
 public override void PrepareRenderQueue(Renderer renderer, IRenderQueue queue, Node node, Entity entity)
 {
     //Render the background in Background queue
     queue.Add(RenderQueueGroupId.Background, pipeline, null, 0);
 }
Beispiel #26
0
 public abstract void Rendering(IRenderQueue q, IRenderTarget windowRenderTarget);
Beispiel #27
0
 public HtmlRenderElement(IRenderQueue renderQueue) :
     this("div", String.Empty, renderQueue)
 {
     //
 }
Beispiel #28
0
 public HtmlRenderElement(string htmlElementTagName, IRenderQueue renderQueue) :
     this(htmlElementTagName, String.Empty, renderQueue)
 {
     //
 }
 public RenderStateReader(IRenderQueue queue, IResultReader reader)
 {
     _queue  = queue;
     _reader = reader;
 }