ComponentFactory.Krypton.Toolkit.VisualPopupShadow.DefinePaths C# (CSharp) Method

DefinePaths() public method

Define the drawing paths for the shadow.
public DefinePaths ( GraphicsPath path1, GraphicsPath path2, GraphicsPath path3 ) : void
path1 System.Drawing.Drawing2D.GraphicsPath Outer path.
path2 System.Drawing.Drawing2D.GraphicsPath Middle path.
path3 System.Drawing.Drawing2D.GraphicsPath Inside path.
return void
        public void DefinePaths(GraphicsPath path1,
                                GraphicsPath path2,
                                GraphicsPath path3)
        {
            // Dispose of existing paths
            ClearPaths();

            // Use the new paths
            _path1 = path1;
            _path2 = path2;
            _path3 = path3;

            // Redraw with the new paths
            Invalidate();
        }

Usage Example

コード例 #1
0
 /// <summary>
 /// Define the drawing paths for the shadow.
 /// </summary>
 /// <param name="path1">Outer path.</param>
 /// <param name="path2">Middle path.</param>
 /// <param name="path3">Inside path.</param>
 public void DefineShadowPaths(GraphicsPath path1,
                               GraphicsPath path2,
                               GraphicsPath path3)
 {
     if (_shadow != null)
     {
         _shadow.DefinePaths(path1, path2, path3);
     }
     else
     {
         path1.Dispose();
         path2.Dispose();
         path3.Dispose();
     }
 }