public override void Render(Graphics graphics, TimeSpan elapsed) { if (m_root != null) { var bounds = m_root.Bounds; m_graphics.PushTransform(); m_graphics.Translate(bounds.Position); m_root.Render(graphics, elapsed); m_graphics.PopTransform(); } }
public override void Render(Graphics graphics, TimeSpan elapsed) { if (!string.IsNullOrWhiteSpace(Text)) { if (m_formatedText == null) { m_formatedText = FormattedText.Create( Text, Font ?? InternalFonts.RegularSmallVariableWidthFont, Alignment, new SizeConstraint(0, 0) ); } m_formatedText.Draw(graphics, Color); } }
public DayLight(Map map, double timeOfDay, TimeSpan startTime) { m_graphics = new Graphics(); m_timeOfDay = timeOfDay; //m_currentTime = timeOfDay; m_map = map; m_maxLight = new Color4(1, 1, 1, 1); //m_maxLight = new Color4(0.6f, 0.6f, 0.6f, 1); m_maxDark = new Color4(0.1f, 0.1f, 0.05f, 1); m_startTime = startTime; m_currentTime = (1 - ConvertTimeToDayProgress(m_startTime)) * m_timeOfDay; m_timeStartDay = new TimeSpan(07, 0, 0); m_timeStartNight = new TimeSpan(19, 0, 0); m_timeTransition = new TimeSpan(2, 0, 0); //Framebuffers m_framebufferAllLight = new Framebuffer(); m_textureLight = new Texture2D(); var size = Engine.Display.GetSize(); m_textureLight.SetData<Color4ub>(size.X, size.Y, null); m_framebufferAllLight.Attach(m_textureLight); }
public override void Render(Graphics graphics, TimeSpan elapsed) { throw new NotImplementedException(); }
public void Draw(Graphics graphics, Color4ub color) { foreach (var instance in m_instances) { graphics.Draw(instance.Rectangle, instance.Sprite, color); } }
public UIManager() { m_graphics = new Graphics(10000); }