Giter VIP home page Giter VIP logo

jigsawposter's Introduction

JigsawPoster

It is a sample whose performance looks similar to PosterLabs app.

It consisits of a background Image and several pictures which can be moved,scaled,rotated by touch of finger,and corresponding hollow for each picture,the gif below shows how the sample performs:

image

we can select one of the picture that can be manipulated,then a menu will show from the bottom of the screen which has three buttons.Two of them in the left can rotate the selected picture 90 degrees and overturn the selected picture respectively,the rightmost can save the whole view as a PNG in the root directory of the phone.All hollows are provided by svg files in the root directory of the phone,and have to be parsed by svg parser which is in the application.

For this is just a sample,so the paths of the files of all the pictures,background images,svgs,destinations of save result of image are hard coding,you had better make it flexibly configured in practice.

Tips:Don't forget to add corresponding svg file in the root of your phone,since the appliction will show a hollow as a common rectangle if it is not able to read corresponding svg file.

一个效果类似海报工厂的安卓demo。

由一张背景图片,若干张可通过手势进行拖拽、缩放、旋转操作的图片,以及对应的镂空部分组成,可操作的图片只能在镂空部分中显示,效果图如下:

image

选中图片,底部弹出操作该图的菜单栏,拥有三个按钮,左边两个可以对该图进行旋转90度和翻转,最右的"保存海报"为将整个视图保存为图片在手机内置sd卡的根路径。 镂空部分需要提供svg文件在手机根路径并通过项目中的svg解析器解析出来。

因为只是一个demo,所以图片、底图、镂空svg文件和保存海报路径均为写死,实际使用应改为可灵活配置。

友情提示:不要忘记添加对应的svg文件到手机sd卡根目录中,因为在读取不到对应的svg文件的情况下只会显示一个矩形区域。

jigsawposter's People

Contributors

yishuinanfeng avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.