Kinh doanh - Marketing
Kinh tế quản lý
Biểu mẫu - Văn bản
Tài chính - Ngân hàng
Công nghệ thông tin
Tiếng anh ngoại ngữ
Kĩ thuật công nghệ
Khoa học tự nhiên
Khoa học xã hội
Văn hóa nghệ thuật
Sức khỏe - Y tế
Văn bản luật
Nông Lâm Ngư
Kỹ năng mềm
Luận văn - Báo cáo
Giải trí - Thư giãn
Tài liệu phổ thông
Văn mẫu
Giới thiệu
Đăng ký
Đăng nhập
Tìm
Danh mục
Kinh doanh - Marketing
Kinh tế quản lý
Biểu mẫu - Văn bản
Tài chính - Ngân hàng
Công nghệ thông tin
Tiếng anh ngoại ngữ
Kĩ thuật công nghệ
Khoa học tự nhiên
Khoa học xã hội
Văn hóa nghệ thuật
Y tế sức khỏe
Văn bản luật
Nông lâm ngư
Kĩ năng mềm
Luận văn - Báo cáo
Giải trí - Thư giãn
Tài liệu phổ thông
Văn mẫu
Thông tin
Điều khoản sử dụng
Quy định bảo mật
Quy chế hoạt động
Chính sách bản quyền
Giới thiệu
Đăng ký
Đăng nhập
0
Trang chủ
Công Nghệ Thông Tin
Kỹ thuật lập trình
Object Oriented Programming using Java phần 8
Đang chuẩn bị liên kết để tải về tài liệu:
Object Oriented Programming using Java phần 8
Quỳnh Thơ
63
22
pdf
Đang chuẩn bị nút TẢI XUỐNG, xin hãy chờ
Tải xuống
Nếu x là một biến thể hiện trong cùng một đối tượng, sau đó this.x có thể được sử dụng như một tên đầy đủ cho rằng biến. Nếu otherMethod () là một phương pháp thể hiện trong cùng một đối tượng, sau đó | Draws a card in a 79x123 pixel rectangle with its upper left corner at a specified point x y . Drawing the card requires the image file cards.png . @param g The graphics context used for drawing the card. @param card The card that is to be drawn. If the value is null then a face-down card is drawn. @param x the x-coord of the upper left corner of the card @param y the y-coord of the upper left corner of the card public void drawCard Graphics g Card card int x int y int cx x-coord of upper left corner of the card inside cardsImage int cy y-coord of upper left corner of the card inside cardsImage if card null cy 4 123 coords for a face-down card. cX 2 79 else cx card.getValue -1 79 switch card.getSuit case Card.CLUBS cy 0 break case Card.DIAMONDS cy 123 break case Card.HEARTS cy 2 123 break default spades cy 3 123 break g.drawImage cardImages x y x 79 y 123 cx cy cx 79 cy 123 this I will tell you later in this section how the image file cards.png can be loaded into the program. 6.8.2 Image File I O The class javax.imageio.ImageIO makes it easy to save images from a program into files and to read images from files into a program. This would be useful in a program such as PaintWithOffScreenCanvas so that the users would be able to save their work and to open and edit existing images. See Exercise12.1. There are many ways that the data for an image could be stored in a file. Many standard formats have been created for doing this. Java supports at least three standard image formats PNG JPEG and GIF. Individual implementations of Java might support more. The JPEG format is lossy which means that the picture that you get when you read a JPEG file is only an approximation of the picture that was saved. Some information in the picture has been lost. Allowing some information to be lost makes it possible to compress the image into a lot fewer bits than would otherwise be necessary. Usually the approximation is quite good. It works best for 155 photographic images and worst .
TÀI LIỆU LIÊN QUAN
crossorigin="anonymous">
Đã 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.