RectanglesToRegion() 공개 정적인 메소드

public static RectanglesToRegion ( Gdk rects ) : Gdk.Region
rects Gdk
리턴 Gdk.Region
예제 #1
0
        public void OnDeserialization(object sender)
        {
            region = Region.Rectangle(Rectangle.Zero);

            Rectangle[] rects = new Rectangle[placedSurfaces.Count];

            for (int i = 0; i < placedSurfaces.Count; ++i)
            {
                rects[i] = placedSurfaces[i].Bounds;
            }

            region = Utility.RectanglesToRegion(rects);
        }
예제 #2
0
        public IrregularSurface(Cairo.ImageSurface source, Rectangle[] roi)
        {
            this.placedSurfaces = new List <PlacedSurface> (roi.Length);

            foreach (Rectangle rect in roi)
            {
                Rectangle ri = Rectangle.Intersect(source.GetBounds(), rect);

                if (!ri.IsEmpty)
                {
                    this.placedSurfaces.Add(new PlacedSurface(source, ri));
                }
            }

            this.region = Utility.RectanglesToRegion(roi);
            this.region.Intersect(Region.Rectangle(source.GetBounds()));
        }