Code Monkey home page Code Monkey logo

drawing-canvas-app's Introduction

Drawing-Canvas-App

This application has custom drawing widget. I have made the drawing widget with canvas.

The user can draw color, change brush size, change color, erase your drawing, clear screen, undo last action, redo last action, add background from the gallery and save your drawing in the gallery!!!

to access media from the gallery, we need read access for devices upto API 28 i.e., Android 9 to save image in gallery, we need write access for devices upto API 28 i.e., Android 9

for devices running Android 10 and plus, API 29 and plus, to deal with scoped-storage in android, a new concept, we use content resolver to save image in gallery!

ezgif-4-New

Screenshot_2023-03-31-04-23-57-90_f0899220bf1c3753e8998d1cc01182d2

Screenshot_2023-03-31-04-24-01-11_f0899220bf1c3753e8998d1cc01182d2

if you have any question feel free to ask.

Approach:

We just save all paths drawn by the user in an array and to undo, just pop the last saved path from originalPaths list to undoPathlist and call the method invalidate()

drawing-canvas-app's People

Contributors

shahrazeahmad07 avatar

Stargazers

 avatar

Watchers

 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.