/// <summary>
 ///     Restores the state saved by this instance to the graphics given.
 /// </summary>
 /// <param name="graphics">The graphics.</param>
 public void Restore([NotNull] DirectXGraphics graphics)
 {
     Debug.Assert(graphics != null, "graphics != null");
     graphics._resourceManager = ResourceManager;
     graphics.FillStyle        = FillStyle;
     graphics.LineStyle        = LineStyle;
     graphics._lineWidth       = LineWidth;
     graphics.Transform        = Transform;
 }
 /// <summary>
 ///     Initializes a new instance of the <see cref="State"/> class.
 /// </summary>
 /// <param name="graphics">The graphics.</param>
 public State([NotNull] DirectXGraphics graphics)
 {
     Debug.Assert(graphics != null, "graphics != null");
     FillStyle       = graphics.FillStyle;
     LineStyle       = graphics.LineStyle;
     LineWidth       = graphics._lineWidth;
     ResourceManager = graphics._resourceManager;
     Transform       = graphics.Transform;
 }