Programming Microsoft Windows with C# phần 5

Hình dựng thiết kế thời gian kiểm soát của người sử dụng và khả năng triển khai kiểm soát người sử dụng như là một hội đồng được chào đón đó là chia sẻ mã nội bộ cho một tổ chức. và có thể phục vụ như là lớp cơ sở dữ liệu dạng bảng có ràng buộc điều khiển bao gồm các điều khiển máy chủ khác. | While the GetThumbnaillmage method creates a new image the RotateFlip method alte s the existing image. The single argument is a member of the RotateFlipType enumeration RotateFlipType Enumeration Member Value Result RotateNoneFlipNone Rotate180FlipXY 0 Hello Rotate90FlipNone Rotate27oFlipXY 1 1 Hello Rotate180FlipNone RotateNoneFlipXY 2 O 3H Rotate270FlipNone Rotate90FlipXY 3 Helloj RotateNoneFlipX Rotate180FlipY 4 loiisHj Rotate90FlipX Rotate270FlipY 5 ollsH Rotate180FlipX RotateNoneFlipY 6 H6 0 Rotate270FlipX Rotate90FlipY 7 lolleH Although the enumeration has 16 members there are only 8 unique effects on the image. For 4 of these effects the Image object gets its Width and Height properties switched around. If you need to rotate or flip an image but you still want to retain the original unflipped unrotated image you can first make a copy of the original Image object by using the Clone method Image imagecopy Image The Bitmap Class So far everything I ve been discussing uses objects of type Image. As I mentioned at the beginning of this chapter the namespace also includes a class named Bitmap that inherits from Image. All the Image properties apply to Bitmap as well. Anything you can do with an Image object you can also do with a Bitmap object. Plus more of cou se. The Bitmap class allows you to get down and dirty with the bitmap bits. The Image class has no constructors the Bitmap class has 12 constructors. These first constructors load a Bitmap object from a file a stream or a resource Bitmap Constructors selection Bitmap string strFilename Bitmap string strFilename bool bUselmageColorManagement Bitmap stream stream Bitmap stream stream bool bUselmageColorManagement Bitmap Type type string strResource The first four constructors basically duplicate the static FromFile and FromStream methods implemented in Image. The last loads a Bitmap object as a resource which is usually embedded in the .exe file of the application. I ll explain .

Không thể tạo bản xem trước, hãy bấm tải xuống
TỪ KHÓA LIÊN QUAN
TÀI LIỆU MỚI ĐĂNG
Đã 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.