System.Drawing.Region.Transform C# (CSharp) Метод

Transform() публичный Метод

public Transform ( Matrix matrix ) : void
matrix Matrix
Результат void
        public void Transform(Matrix matrix)
        {
            if (!IsEmpty && !IsInfinite)
            {
                foreach (var path in solution)
                {
                    for (int p = 0; p < path.Count; p++)
                    {
                        var point = path [p];
                        TransformIntPoint (ref point, matrix);
                        path [p] = point;
                    }
                }

                PathsToInternalPath (solution);

            }
        }

Usage Example

Пример #1
0
 /// <summary>
 /// Invalidates <em>this</em> layer over the given Region. (In 1x1 space.)
 /// </summary>
 public void Invalidate(Region region)
 {
     if (this.Substrate != null)
     {
         System.Drawing.Region r = null;
         try {
             r = new System.Drawing.Region(region.GetRegionData());
             r.Transform(InvertMatrix(this.To1x1Transform));
             if (this.Substrate.InvokeRequired)
             {
                 this.Substrate.Invoke(new SubstrateInvalidateDelegate(SubstrateInvalidate), new object[] { r });
             }
             else
             {
                 this.Substrate.Invalidate(r);
             }
         }
         catch (System.ArgumentException ex) {
             // This happened once during live stream playback
             // apparently inside the Invert operation above.
             Debug.WriteLine(ex.ToString());
         }
         catch (InvalidOperationException ex) {
             // This can happen due to a GDI+ threading issue when trying to clone a Transform. "Object is in use elsewhere."
             Debug.WriteLine(ex.ToString());
         }
         finally {
             if (r != null)
             {
                 r.Dispose();
             }
         }
     }
     this.OnInvalidated(new RegionEventArgs(region));
 }
All Usage Examples Of System.Drawing.Region::Transform