TAILIEUCHUNG - gdi programming with c sharp phần 5

Vứt bỏ các đối tượng (), tọa độ bắt đầu từ một khu vực vô hạn của số âm, và chiều cao và chiều rộng của nó là những con số tích cực lớn, như Hình cho thấy. Sử dụng FillRegion trên một khu vực vô hạn lấp đầy toàn bộ hình liệu này được tạo ra bởi một ChmMagic chưa đăng ký, xin vui lòng đi đến | This document was created by an unregistered ChmMagic please go to http to register it. Thanks. Rectangle rect1 new Rectangle 20 20 60 80 Rectangle rect2 new Rectangle 50 30 60 80 Region rgn1 new Region rect1 Region rgn2 new Region rect2 If region is not empty empty it if g If region is not infinite make it infinite if g Get bounds of the infinite region RectangleF rect g Display Fill the region rgn2 Dispose of object An infinite region s starting coordinates are negative numbers and its height and width are large positive numbers as Figure shows. Using FillRegion on an infinite region fills the entire form. Figure . Bounds of an infinite region Team LiB PREVIOUS I NEXT This document was created by an unregistered ChmMagic please go to http to register it. Thanks Team LiB PREVIOUS I HEXT Regions and Clipping As we discussed in Chapter 3 the Graphics class provides methods to clip regions. Using these methods an application can restrict where graphics objects are drawn. One major use of clipping regions is to repaint only part of a control. In some cases painting an entire form is costly in terms of time and memory resources. Clipping plays a vital role by painting only the desired area. The Graphics class provides the SetClip ResetClip IntersectClip ExcludeClip and TranslateClip methods to use in clipping operations. ExcludeClip excludes the area specified by an argument of typeRectangle or a Region and updates the clipping fills a rectangle excluding one small rectangle and a region. Listing Using ExcludeClip to clip regions Create a Graphics object Graphics g Create rectangles Rectangle recti new Rectangle 20 20 60 80 Rectangle rect2 new Rectangle 100 100 30 40 Create a region Region rgn1 new Region rect2 .

TAILIEUCHUNG - Chia sẻ tài liệu không giới hạn
Địa chỉ : 444 Hoang Hoa Tham, Hanoi, Viet Nam
Website : tailieuchung.com
Email : tailieuchung20@gmail.com
Tailieuchung.com là thư viện tài liệu trực tuyến, nơi chia sẽ trao đổi hàng triệu tài liệu như luận văn đồ án, sách, giáo trình, đề thi.
Chúng tôi không chịu trách nhiệm liên quan đến các vấn đề bản quyền nội dung tài liệu được thành viên tự nguyện đăng tải lên, nếu phát hiện thấy tài liệu xấu hoặc tài liệu có bản quyền xin hãy email cho chúng tôi.
Đã phát hiện trình chặn quảng cáo AdBlock
Trang web này phụ thuộc vào doanh thu từ số lần hiển thị quảng cáo để tồn tại. Vui lòng tắt trình chặn quảng cáo của bạn hoặc tạm dừng tính năng chặn quảng cáo cho trang web này.