• 设为首页
  • 点击收藏
  • 手机版
    手机扫一扫访问
    迪恩网络手机版
  • 关注官方公众号
    微信扫一扫关注
    公众号

C# IRenderer类代码示例

原作者: [db:作者] 来自: [db:来源] 收藏 邀请

本文整理汇总了C#中IRenderer的典型用法代码示例。如果您正苦于以下问题:C# IRenderer类的具体用法?C# IRenderer怎么用?C# IRenderer使用的例子?那么恭喜您, 这里精选的类代码示例或许可以为您提供帮助。



IRenderer类属于命名空间,在下文中一共展示了IRenderer类的20个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于我们的系统推荐出更棒的C#代码示例。

示例1: ViewContext

 /// <summary>
 /// Initialize a new instance of the ViewContext class.
 /// </summary>
 /// <param name="control">Control associated with rendering.</param>
 /// <param name="alignControl">Control used for aligning elements.</param>
 /// <param name="graphics">Graphics instance for drawing.</param>
 /// <param name="renderer">Rendering provider.</param>
 public ViewContext(Control control,
                    Control alignControl,
                    Graphics graphics,
                    IRenderer renderer)
     : this(null, control, alignControl, graphics, renderer)
 {
 }
开发者ID:Cocotteseb,项目名称:Krypton,代码行数:14,代码来源:ViewContext.cs


示例2: HandleCollision

        private void HandleCollision(IHungryCreature creature, IRenderer renderer)
        {
            List<GameFieldCoords> creatureElements = new List<GameFieldCoords>();

            foreach (GameFieldCoords element in creature.GetPosition())
            {
                creatureElements.Add(element);
            }

            foreach (GameFieldCoords element in creatureElements)
            {
                if (element.Row >= renderer.GameFieldSize.Row || element.Row < 0
                    || element.Col >= renderer.GameFieldSize.Col || element.Col < 0)
                {
                    creature.IsDestroyed = true;
                }
            }

            for (int element = 0; element < creatureElements.Count - 1; element++)
            {
                if (creatureElements.Last().Row == creatureElements[element].Row
                    && creatureElements.Last().Col == creatureElements[element].Col)
                {
                    creature.IsDestroyed = true;
                }
            }
        }
开发者ID:,项目名称:,代码行数:27,代码来源:


示例3: RegisterFactory

 public void RegisterFactory(string[] blocks, IRenderer renderer)
 {
     foreach (var block in blocks)
     {
         RegisterFactory(block, renderer);
     }
 }
开发者ID:darrelmiller,项目名称:Parrot,代码行数:7,代码来源:RendererFactory.cs


示例4: GameController

 public GameController(IGameEngine gameEngine, IInputHandler inputReader, IRenderer renderer)
 {
     this.gameEngine = gameEngine;
     this.inputReader = inputReader;
     this.renderer = renderer;
     this.currentCmd = null;
 }
开发者ID:hristofornikolov,项目名称:TeamSupremeProject,代码行数:7,代码来源:GameController.cs


示例5: Engine

 public Engine(IRenderer renderer, int screenWidth, int screenHeight)
 {
     this.Renderer = renderer;
     this.ScreenWidth = screenWidth;
     this.ScreenHeight = screenHeight;
     this.Initialize();
 }
开发者ID:hristodobrev,项目名称:Software-University,代码行数:7,代码来源:Engine.cs


示例6: Configure

 public void Configure(IRenderer renderer)
 {
   foreach (var resource in _resources)
   {
     resource.Configure(renderer);
   }
 }
开发者ID:dgopena,项目名称:Starter3D.Base,代码行数:7,代码来源:ResourceManager.cs


示例7: render

        public int FrameCountPerRender { get; set; } //number of frames per render (default = 1);


        public DrawingSurfaceSCBP(IRenderer renderer)
        {
            this.FrameCountPerRender = 1;

            //this.InitializeComponent();

            //if (!hasInitializedSurface)
            //{
            //    //effectRenderer = new EffectRenderer();

            //    var fpsRenderer = new FpsRenderer();

            //    d2dTarget = new SwapChainBackgroundPanelTarget(root);
            //    d2dTarget.OnRender += effectRenderer.Render;
            //    d2dTarget.OnRender += fpsRenderer.Render;

            //    deviceManager = new DeviceManager();
            //    deviceManager.OnInitialize += d2dTarget.Initialize;
            //    deviceManager.OnInitialize += effectRenderer.Initialize;
            //    deviceManager.OnInitialize += fpsRenderer.Initialize;

            //    deviceManager.Initialize(DisplayProperties.LogicalDpi);
            //    effectRenderer.InitializeUI(root, root);

            //    // Setup rendering callback
            //    CompositionTarget.Rendering += CompositionTarget_Rendering;

            //    if (_assetUri != string.Empty) effectRenderer.LoadLocalAsset(_assetUri);
            //}
        }
开发者ID:rolandsmeenk,项目名称:ModernApps,代码行数:33,代码来源:DrawingSurfaceSCBP.xaml.cs


示例8: Configure

 public virtual void Configure(IRenderer renderer)
 {
   foreach (var textureParameter in _textureParameters)
   {
     _shader.SetTextureParameter(textureParameter.Key, textureParameter.Value);
   } 
 }
开发者ID:dgopena,项目名称:Starter3D.Base,代码行数:7,代码来源:Material.cs


示例9: FeatureElement

        public FeatureElement(Feature f, IRenderer renderer)
        {
            this.ClipBox = Rectangle2D.Empty;
            this.pathIsInvalid = true;
            if (f == null)
            {
                throw new ArgumentNullException("f");
            }
            this.feature = new WeakReference(f);

            if (renderer != null && (f.GetValue(Clusterer.ClusterProperty) == null))
            {
                this.GeoStyle = renderer.GetStyle(f) ?? generateDefaultSyle(f);
            }//renderer的优先级高于Feature自我的
            else
            {
                this.GeoStyle = f.Style ?? generateDefaultSyle(f);
            }
            f.SetBoundedStyle(this.GeoStyle);

            if (this.GeoStyle != null)
            {
                base.Template = this.GeoStyle.ControlTemplate;
            }

            this.Geometry = f.Geometry;
        }
开发者ID:SuperMap,项目名称:iClient-for-Silverlight,代码行数:27,代码来源:FeatureElement.cs


示例10: VisualPopupGroup

        /// <summary>
        /// Initialize a new instance of the VisualPopupGroup class.
        /// </summary>
        /// <param name="ribbon">Reference to owning ribbon control.</param>
        /// <param name="ribbonGroup">Reference to ribbon group for display.</param>
        /// <param name="renderer">Drawing renderer.</param>
        public VisualPopupGroup(KryptonRibbon ribbon,
                                KryptonRibbonGroup ribbonGroup,
                                IRenderer renderer)
            : base(renderer, true)
        {
            Debug.Assert(ribbon != null);
            Debug.Assert(ribbonGroup != null);

            // Remember references needed later
            _ribbon = ribbon;
            _ribbonGroup = ribbonGroup;

            // Create a view element for drawing the group
            _viewGroup = new ViewDrawRibbonGroup(ribbon, ribbonGroup, NeedPaintDelegate);
            _viewGroup.Collapsed = false;

            // Create the background that will contain the actual group instance
            _viewBackground = new ViewDrawRibbonGroupsBorder(ribbon, true, NeedPaintDelegate);
            _viewBackground.Add(_viewGroup);

            // Attach the root to the view manager instance
            ViewManager = new ViewRibbonPopupGroupManager(this, ribbon, _viewBackground, _viewGroup, NeedPaintDelegate);

            // Create and add a hidden button to act as the focus target
            _hiddenFocusTarget = new Button();
            _hiddenFocusTarget.TabStop = false;
            _hiddenFocusTarget.Location = new Point(-_hiddenFocusTarget.Width, -_hiddenFocusTarget.Height);
            CommonHelper.AddControlToParent(this, _hiddenFocusTarget);
        }
开发者ID:ComponentFactory,项目名称:Krypton,代码行数:35,代码来源:VisualPopupGroup.cs


示例11: CompositeWindow

    public CompositeWindow(IController controller, IRenderer renderer, double frameRate)
    {
      if (controller == null) throw new ArgumentNullException("controller");
      if (renderer == null) throw new ArgumentNullException("renderer");
      _controller = controller;
      _renderer = renderer;
      _frameRate = frameRate;
      Width = controller.Width;
      Height = controller.Height;
      if (_controller.IsFullScreen)
        WindowState = WindowState.Maximized;
      Title = controller.Name;

      InitializeComponent();
      if (_controller.HasUserInterface)
      {
        if(_controller.CentralView != null)
          MainGrid.Children.Add((UIElement)_controller.CentralView);
        if (_controller.LeftView != null)
          LeftGrid.Children.Add((UIElement)_controller.LeftView);
        if (_controller.RightView != null)
          RightGrid.Children.Add((UIElement)_controller.RightView);
        if (_controller.TopView != null)
          TopGrid.Children.Add((UIElement)_controller.TopView);
        if (_controller.BottomView != null)
          BottomGrid.Children.Add((UIElement)_controller.BottomView);
        
      }
      Loaded += OnLoaded;
      SizeChanged += OnSizeChanged;
      
    }
开发者ID:dgopena,项目名称:Starter3D.Base,代码行数:32,代码来源:CompositeWindow.xaml.cs


示例12: GameEngine

 /// <summary>
 /// Initializes a new instance of the <see cref="GameEngine" /> class.
 /// </summary>
 /// <param name="renderer">The game renderer.</param>
 /// <param name="inputMethod">The user input method.</param>
 public GameEngine(IRenderer renderer, IInputMethod inputMethod)
 {
     this.gameRenderer = renderer;
     this.inputMethod = inputMethod;
     this.scores = new HighScores(MaxTopPlayers);
     this.cmdExecutor = new DefaultGameCommandExecutor(this.gameRenderer, this.inputMethod, this.scores);
 }
开发者ID:ilkodzhambazov,项目名称:Telerik-Academy,代码行数:12,代码来源:GameEngine.cs


示例13: Engine

 /// <summary>
 /// Constructor
 /// </summary>
 /// <param name="player">Player instance</param>
 /// <param name="renderer">IRender instance</param>
 /// <param name="controller">IControler instance</param>
 /// <param name="scoreBoard">Scoreboard instance</param>
 public Engine(Player player, IRenderer renderer, IController controller, ScoreBoard scoreBoard)
 {
     this.Player = player;
     this.Renderer = renderer;
     this.Controller = controller;
     this.ScoreBoard = scoreBoard;
 }
开发者ID:rnikiforova,项目名称:actinium,代码行数:14,代码来源:Engine.cs


示例14: Tube

        public Tube( IRenderer renderer )
        {
            ReferenceVertices = new GLVector3d[ 4 ];

            ReferenceVertices[0] = new GLVector3d( 0.5, -0.5, 0 );
            ReferenceVertices[1] = new GLVector3d( 0.5, 0.5, 0 );
            ReferenceVertices[2] = new GLVector3d( -0.5, 0.5, 0 );
            ReferenceVertices[3] = new GLVector3d( -0.5, -0.5, 0 );

            iFirstOuterFace = 0;
            iLastOuterFace = 3;

            iNumberFaces = 4;

            bShowCut = false;
            bShowHollow = false;

            iCutStart = 0;
            iCutEnd = MaxCut;

            this.renderer = renderer;
            SendRendererCallbacksToCrossSections();

            rotationalextrusionpath.UpdatePath();
            BuildFaces();
        }
开发者ID:hughperkins,项目名称:osmp-cs,代码行数:26,代码来源:Tube.cs


示例15: MatchRunner

        public MatchRunner(IMatch match, string playerOneFolder, string playerTwoFolder, IRenderer renderer, bool consoleLoggingDisabled, bool consoleLoggingMustScroll, string replayFolder)
        {
            Match = match;
            Renderer = renderer;

            string runFilename = Environment.OSVersion.Platform == PlatformID.Unix ? Settings.Default.BotRunFilenameLinux : Settings.Default.BotRunFilename;
            _players = new BotRunner[2];
            _players[0] = new BotRunner(
                1,
                playerOneFolder,
                runFilename
                );
            _players[1] = new BotRunner(
                2,
                playerTwoFolder,
                runFilename
                );

            match.SetPlayerName(1, _players[0].PlayerName);
            match.SetPlayerName(2, _players[1].PlayerName);

            _replayLogger = new ReplayLogger(replayFolder);

            SetupLogging(consoleLoggingDisabled, consoleLoggingMustScroll);
        }
开发者ID:rm2k,项目名称:2015-SpaceInvaders-TestHarness,代码行数:25,代码来源:MatchRunner.cs


示例16: Form1

 public Form1(IRenderer renderer)
 {
     m_Renderer = renderer;
     InitializeComponent();
     string handle = panel1.Handle.ToString();
     m_Renderer.CreateRenderWindow(handle);
 }
开发者ID:anthony-martin,项目名称:Triangles-in-space,代码行数:7,代码来源:Form1.cs


示例17: Render

 public void Render(IRenderer renderer)
 {
     foreach (var position in this.elements)
     {
         renderer.Render(position.x, position.y, 'o');
     }
 }
开发者ID:hristodobrev,项目名称:Software-University,代码行数:7,代码来源:Snake.cs


示例18: GameEngine

 public GameEngine(IReader reader, IRenderer renderer)
 {
     Reader = reader;
     Renderer = renderer;
     this.creepsList = new List<Npc>();
     this.items = new List<Item>();
 }
开发者ID:Psykepro,项目名称:Canrum-OOP,代码行数:7,代码来源:GameEngine.cs


示例19: ToViewbox

        /// <summary>
        /// 
        /// </summary>
        /// <param name="container"></param>
        /// <param name="renderer"></param>
        /// <returns></returns>
        private static Viewbox ToViewbox(Container container, IRenderer renderer)
        {
            var visual = new DrawingVisual();

            using (var dc = visual.RenderOpen())
            {
                renderer.Draw(dc, container, container.Properties, null);
            }

            visual.Drawing.Freeze();

            var host = new VisualHost()
            {
                Width = container.Width,
                Height = container.Height
            };

            host.Visuals.Add(visual);

            var vb = new Viewbox()
            {
                Stretch = Stretch.Uniform
            };

            vb.Child = host;

            return vb;
        }
开发者ID:monocraft,项目名称:Core2D,代码行数:34,代码来源:ProjectViewer.cs


示例20: Draw

        public virtual void Draw(ScrollbarButton Button, IRenderer Renderer)
        {
            ILineStyleInfo TopLeft;
            ILineStyleInfo BottomRight;

            if (Button.State == ScrollbarButton.ButtonState.Normal)
            {
                TopLeft = LightBorder;
                BottomRight = DarkBorder;
            }
            else
            {
                TopLeft = DarkBorder;
                BottomRight = LightBorder;
            }

            Rect R = Button.Bounds;
            int x1 = R.Location.X;
            int y1 = R.Location.Y;
            int x2 = R.Right;
            int y2 = R.Bottom;

            DrawBackground(Button, Renderer);

            Renderer.DrawOperations.DrawLine(x1, y1, x2, y1, TopLeft);
            Renderer.DrawOperations.DrawLine(x1, y1, x1, y2, TopLeft);
            Renderer.DrawOperations.DrawLine(x2, y1, x2, y2, BottomRight);
            Renderer.DrawOperations.DrawLine(x1, y2, x2 + 1, y2, BottomRight);
        }
开发者ID:Ju2ender,项目名称:csharp-e,代码行数:29,代码来源:ScrollbarButtonStyle.cs



注:本文中的IRenderer类示例整理自Github/MSDocs等源码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。


鲜花

握手

雷人

路过

鸡蛋
该文章已有0人参与评论

请发表评论

全部评论

专题导读
上一篇:
C# IReorderableListAdaptor类代码示例发布时间:2022-05-24
下一篇:
C# IRenderable类代码示例发布时间:2022-05-24
热门推荐
阅读排行榜

扫描微信二维码

查看手机版网站

随时了解更新最新资讯

139-2527-9053

在线客服(服务时间 9:00~18:00)

在线QQ客服
地址:深圳市南山区西丽大学城创智工业园
电邮:jeky_zhao#qq.com
移动电话:139-2527-9053

Powered by 互联科技 X3.4© 2001-2213 极客世界.|Sitemap