Some strange questions about the Destination-atop property of the HTML5 canvas

Source: Internet
Author: User

Recently, when I was finishing canvas, I found HTML5 canvas developed a strange property explanation.

The target graphic is a bitmap that is displayed on the canvas

The original graphic is the shape on the canvas to which the receipt will be

W3school, that's what it says.


The destination-atop displays the target image at the top of the source image. The part of the target image that is outside the source image is not displayed.

And then HTML5 Canvas development.

Destination-atop the target graphic is located on the source graph, where both overlapping and tangent are opaque, the source graphic is opaque and the destination graphic is transparent, and the remaining display is transparent

2 are authoritative, which one is right?

Not much to say on the demo

<! DOCTYPE HTML PUBLIC "-//W3C//DTD XHTML 1.0 transitional//en" "Http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd ">

It turned out to be such a strange thing.

So it looks like the API on the W3school is described as correct.

What the book needs to become

It proves that sometimes the book is written not necessarily to-_-//.

And then I'll just re-write the demo of the synthetic example on the book again.

<! DOCTYPE HTML PUBLIC "-//W3C//DTD XHTML 1.0 transitional//en" "Http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd ">

And finally changed the HoHo into a demo on the book.

Some strange questions about the Destination-atop property of the HTML5 canvas

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.