{"id":13396421,"url":"https://github.com/PaNaVTEC/DrawableView","last_synced_at":"2025-03-13T23:31:04.590Z","repository":{"id":26967086,"uuid":"30430441","full_name":"PaNaVTEC/DrawableView","owner":"PaNaVTEC","description":"A view that allows to paint and saves the result as a bitmap","archived":false,"fork":false,"pushed_at":"2017-08-02T08:08:25.000Z","size":572,"stargazers_count":585,"open_issues_count":16,"forks_count":100,"subscribers_count":18,"default_branch":"master","last_synced_at":"2024-07-31T18:17:27.456Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":"http://panavtec.me","language":"Java","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"apache-2.0","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/PaNaVTEC.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null}},"created_at":"2015-02-06T19:58:53.000Z","updated_at":"2024-06-24T13:52:23.000Z","dependencies_parsed_at":"2022-08-24T15:04:10.478Z","dependency_job_id":null,"html_url":"https://github.com/PaNaVTEC/DrawableView","commit_stats":null,"previous_names":[],"tags_count":2,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/PaNaVTEC%2FDrawableView","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/PaNaVTEC%2FDrawableView/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/PaNaVTEC%2FDrawableView/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/PaNaVTEC%2FDrawableView/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/PaNaVTEC","download_url":"https://codeload.github.com/PaNaVTEC/DrawableView/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":221421540,"owners_count":16817825,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":[],"created_at":"2024-07-30T18:00:50.845Z","updated_at":"2024-10-25T11:30:31.622Z","avatar_url":"https://github.com/PaNaVTEC.png","language":"Java","readme":"# Android Drawable View \n[![Android Arsenal](https://img.shields.io/badge/Android%20Arsenal-Android%20Drawable%20View-brightgreen.svg?style=flat)](https://android-arsenal.com/details/1/1510) ![Maven Central](https://img.shields.io/maven-central/v/me.panavtec/drawableview.svg)\n\n![Logo](art/drawabledroid.png)\n\n## Sample app:\n\n![](art/DrawableView.gif)\n\nAn Android view that allows to paint with a finger in the screen and saves the result as a Bitmap.\n\n## Importing to your project\nAdd this dependency to your build.gradle file:\n\n```java\ndependencies {\n    compile 'me.panavtec:drawableview:{Lib version, see the mvn central badge}'\n}\n```\n\n## Basic usage\nAdd the view to your xml layout in this way:\n\n```xml\n\u003cme.panavtec.drawableview.DrawableView\n        android:id=\"@+id/paintView\"\n        android:layout_width=\"match_parent\"\n        android:layout_height=\"match_parent\"/\u003e\n```\n\nNow in your activity code set a config to this view:\n\n```java\nDrawableViewConfig config = new DrawableViewConfig();\nconfig.setStrokeColor(getResources().getColor(android.R.color.black));\nconfig.setShowCanvasBounds(true); // If the view is bigger than canvas, with this the user will see the bounds (Recommended)\nconfig.setStrokeWidth(20.0f);\nconfig.setMinZoom(1.0f);\nconfig.setMaxZoom(3.0f);\nconfig.setCanvasHeight(1080);\nconfig.setCanvasWidth(1920);\ndrawableView.setConfig(config);\n```\n\nNow the view is ready to paint! You can see the attached sample for more info\n\nTo save the results of the view to a Bitmap just call:\n\n```java drawableView.obtainBitmap()```\n\n\nChangeLog\n=========\n**0.6**\n\n\\[**Bug/Improvement**] When the view is bigger than the canvas (config width/height) now I'm showing a rect and don't allow user to draw outside the canvas.\n\n\\[**Improvement**] Added obtainBitmap(Bitmap method) to draw inside an already created Bitmap\n\n**0.5**\n\nInitial version\n\nDeveloped by\n============\nChristian Panadero Martinez - \u003ca href=\"http://panavtec.me\"\u003ehttp://panavtec.me\u003c/a\u003e - \u003ca href=\"https://twitter.com/panavtec\"\u003e@PaNaVTEC\u003c/a\u003e\n\nCarlos Morera de la Chica - \u003ca href=\"https://twitter.com/CarlosMChica\"\u003e@CarlosMChica\u003c/a\u003e\n\nLicense\n=======\n\n    Copyright 2015 Christian Panadero Martinez\n\n    Licensed under the Apache License, Version 2.0 (the \"License\");\n    you may not use this file except in compliance with the License.\n    You may obtain a copy of the License at\n\n       http://www.apache.org/licenses/LICENSE-2.0\n\n    Unless required by applicable law or agreed to in writing, software\n    distributed under the License is distributed on an \"AS IS\" BASIS,\n    WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n    See the License for the specific language governing permissions and\n    limitations under the License.\n","funding_links":[],"categories":["Index `(light-weight pages)`","Index","HarmonyOS","Libs"],"sub_categories":["Windows Manager","\u003cA NAME=\"Widget\"\u003e\u003c/A\u003eWidget"],"project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2FPaNaVTEC%2FDrawableView","html_url":"https://awesome.ecosyste.ms/projects/github.com%2FPaNaVTEC%2FDrawableView","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2FPaNaVTEC%2FDrawableView/lists"}