Exemplo n.º 1
0
 /// <summary>
 ///     Initializes a new instance of the <see cref="GDIGraphics" /> class.
 /// </summary>
 /// <param name="graphics">The graphics.</param>
 /// <param name="resourceManager">The initial resource manager.</param>
 /// <param name="fillStyle">The initial fill style.</param>
 /// <param name="lineStyle">The initial line style.</param>
 /// <exception cref="System.ArgumentNullException">
 /// </exception>
 public GDIGraphics(
     [NotNull] System.Drawing.Graphics graphics,
     [NotNull] GDIResourceManager resourceManager,
     [NotNull] IStyle fillStyle,
     [NotNull] LineStyle lineStyle)
 {
     if (graphics == null)
     {
         throw new ArgumentNullException(nameof(graphics));
     }
     if (resourceManager == null)
     {
         throw new ArgumentNullException(nameof(resourceManager));
     }
     if (fillStyle == null)
     {
         throw new ArgumentNullException(nameof(fillStyle));
     }
     if (lineStyle == null)
     {
         throw new ArgumentNullException(nameof(lineStyle));
     }
     _graphics       = graphics;
     ResourceManager = resourceManager;
     FillStyle       = fillStyle;
     SetLineStyle(lineStyle);
 }
Exemplo n.º 2
0
 public State([NotNull] GDIGraphics graphics)
 {
     Debug.Assert(graphics != null, "graphics != null");
     Debug.Assert(graphics._lineStyle != null, "_style != null");
     FillStyle       = graphics.FillStyle;
     LineStyle       = graphics._lineStyle;
     ResourceManager = graphics._resourceManager;
     Transform       = graphics.Transform;
 }