How is the free jigsaw puzzle function similar to meitu xiuxiu implemented?

Source: Internet
Author: User

=============== Problem description ====================


Rewrite imageview... but I don't know why I can only display one image after rewriting, And the rest still don't show?

============= Solution 1 ======================


You can define a view in different lattice forms, and combine the entire view into an image.

============= Solution 2 ======================


In fact, all functions can be completed in the same view. You can use an arraylist to record all images and their related information (such as positions and rotation angles ), the ontouch event checks whether there are images in the click position at each action_down operation. If so, place the image at the top of the list to the first position in the arraylist, next, all action_move events will only take effect for the first image (draw an image in descending order of the arraylist in ondraw, add the generated location and status change parameters in action_move to the last picture.) When action_up, record the information after the first picture changes.

The detection algorithm requires you to think about it by yourself, because the position of the four points after the image is rotated has changed. It is a small difficulty to judge whether there is a corner of the image in the clicked place, you can zoom in, zoom out, move, and rotate the image in ondraw using matrix. If the size of the final generated image is different from that of the preview image, the image is multiplied by a ratio.

The general idea is that the Code is not convenient for the company. You just need to think about the algorithms and processes LZ.

How is the free jigsaw puzzle function similar to meitu xiuxiu implemented?

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.