Head first C # Chinese Version chapter 13th controls and graphics page589

Source: Internet
Author: User

 

It looks good, but some are not right.


Take a closer look at the bees flying between the honeycomb and the flowers. You will find that there are some problems with the way they are rendered. Remember to put beecontrol
Of
Backcolor
Set property
Color. Transparent
? Unfortunately, this is not enough for the program to avoid problems that are common in graphics programs.



① There are some serious performance problems


Did the simulator slow down when all the bees are in the Beehive? If not, change the world.
Constant in the class. Note Frame Rate
--
When more bees are added, the frame rate will decrease significantly.



② The background of flowers is not really transparent


The background of a flower image is transparent to ensure that the background of the flower matches the background of the form, but it does not look very good when the flowers overlap with each other.


 

③ The background of bees is not transparent either.


In fact, color. Transparent
It has some limitations. When the bees fly over the flowers, the "cutting" problem also occurs. The background of the honeycomb form can indeed be displayed in a transparent area, but when bees overlap with each other, problems may occur. But when you observe that the bees are moving in the beehive, you will find that the images of the bees are distorted.



Related Article

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.