{"id":18352346,"url":"https://github.com/cleveroad/droidart","last_synced_at":"2025-04-06T11:32:53.139Z","repository":{"id":82112918,"uuid":"140836589","full_name":"Cleveroad/DroidArt","owner":"Cleveroad","description":"Android library that allows perform manipulations with text and easily combine it with images.","archived":false,"fork":false,"pushed_at":"2018-11-19T09:12:11.000Z","size":3874,"stargazers_count":209,"open_issues_count":3,"forks_count":27,"subscribers_count":7,"default_branch":"master","last_synced_at":"2025-03-31T06:31:53.714Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":"https://www.cleveroad.com/","language":"Kotlin","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/Cleveroad.png","metadata":{"files":{"readme":"README.md","changelog":"CHANGELOG.md","contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null}},"created_at":"2018-07-13T11:01:08.000Z","updated_at":"2024-05-25T15:09:37.000Z","dependencies_parsed_at":"2023-03-15T01:32:56.582Z","dependency_job_id":null,"html_url":"https://github.com/Cleveroad/DroidArt","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Cleveroad%2FDroidArt","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Cleveroad%2FDroidArt/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Cleveroad%2FDroidArt/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Cleveroad%2FDroidArt/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/Cleveroad","download_url":"https://codeload.github.com/Cleveroad/DroidArt/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":247478152,"owners_count":20945258,"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-11-05T21:35:41.961Z","updated_at":"2025-04-06T11:32:48.341Z","avatar_url":"https://github.com/Cleveroad.png","language":"Kotlin","funding_links":[],"categories":[],"sub_categories":[],"readme":"# DroidArt [![Awesome](https://cdn.rawgit.com/sindresorhus/awesome/d7305f38d29fed78fa85652e3a63e154dd8e8829/media/badge.svg)](https://github.com/sindresorhus/awesome) \u003cimg src=\"https://www.cleveroad.com/public/comercial/label-android.svg\" height=\"19\"\u003e \u003ca href=\"https://www.cleveroad.com/?utm_source=github\u0026utm_medium=label\u0026utm_campaign=contacts\"\u003e\u003cimg src=\"https://www.cleveroad.com/public/comercial/label-cleveroad.svg\" height=\"19\"\u003e\u003c/a\u003e\n![Header image](/images/header.jpg)\n\n## Meet DroidArt by Cleveroad\n\nWe are happy to share our latest Android library with you - DroidArt. The Android app component shows the example of DroidArt library usage. It allows perform manipulations with text and easily combine it with images. If your app is about image editing, take a closer look at this customizable component.\n\n![Demo image](/images/demo.gif)\n\nHere is how the DroidArt app component works. The first step is to select a background. Users can choose an image from the device’s gallery or take a photo right away. The next step is to type text over the image. Users can customize text by choosing font, changing size and color, adding shadow and blurring it.\n\nHowever, the main feature of the library is the possibility to bend text along the Bézier curve. Therefore, it can fit any shape of your background image. After all the manipulations, user can save the result in the device’s gallery.\n\nTry this simple and intuitive library for Android apps and bring new experience to your app users. If you need more details on how you can use the component and what benefits it provides, get in touch with us.\n\n[![Awesome](/images/logo-footer.png)](https://www.cleveroad.com/?utm_source=github\u0026utm_medium=label\u0026utm_campaign=contacts)\n\u003cbr/\u003e\n\n## Setup and usage\n### Installation\nby gradle : \n```groovy\ndependencies {\n    implementation 'com.cleveroad.droidart:droidart:1.0.1'\n}\n```\n### Usage ###\n#### DroidArt ####\n```XML\n  \u003ccom.cleveroad.droidart.EditorView\n          android:id=\"@+id/evDroidArt\"\n          android:layout_width=\"match_parent\"\n          android:layout_height=\"match_parent\"\n          app:font_path=\"fonts/some_fonts.ttf\"\n          app:text=\"@string/some_text\"\n          app:text_color=\"@color/text_color\"\n          app:text_shadow_color=\"@color/text_shadow\"\n          app:text_size=\"25sp\"/\u003e\n```\n|  attribute name | description |\n|---|---|\n| text  | Text value for displaying. |\n| text_color  | Value of color for displaying text. |\n| text_size  | Value for size of displaying text. |\n| text_elevation_percent  | Elevation in percent. Shadow will be shown only if [textShadowColor] will be set. |\n| text_shadow_color  | Color of the shadow of the text. |\n| text_shadow_blur_radius  | Radius for shadow blur. |\n| selector_color | Value of color for the selector rectangle. |\n| button_color | Value of color for the control buttons. |\n| font_id | Id to the custom font for text. Note than if id will be incorrect, you will receive [RuntimeException]. |\n| icon_reset_button | drag and drop mode. If enable, column or row will change its position with dragging after long press on row or column header. |\n| icon_scale_button | drag and drop mode. If enable, column or row will change its position with dragging after long press on row or column header. |\n| icon_change_view_button | drag and drop mode. If enable, column or row will change its position with dragging after long press on row or column header. |\n\n```groovy\n/**\n* Text value for displaying\n*/\nvar text: String\n\n/**\n * Value of color for displaying text\n */\nvar textColor: Int\n\n/**\n * Value for size of displaying text\n */\nvar textSize: Float\n\n/**\n * Id to the custom font for text\n *\n * Note than if id will be incorrect, you will receive [RuntimeException]\n */\nvar fontId: Int\n\n/**\n * Elevation in percent\n *\n * Shadow will be shown only if [textShadowColor] will be set\n */\nvar textElevationPercent: Int\n\n/**\n * Color of the shadow of the text\n */\nvar textShadowColor: Int\n\n/**\n * Radius for shadow blur\n */\nvar textShadowBlurRadius: Float\n\n/**\n * Use the method to subscribe to receive a callback when a touch event occurs\n *\n * @param touchEventCallback  The interface for listener to the touch event\n */\nfun subscribeTouchEventCallback(touchEventCallback: TouchEventCallback)\n\n/**\n * Use the method to subscribe to receive a callback when a touch event occurs\n *\n * @param changeViewTextCallback  The interface for listener to the change view text mode\n */\nfun subscribeChangeViewTextCallback(changeViewTextCallback: ChangeViewTextCallback)\n\n/**\n * Use the method to cancel the subscription of receiving a callback\n * when a touch event occurs\n *\n * @param touchEventCallback  The interface for listener to the touch event\n */\nfun unsubscribeTouchEventCallback(touchEventCallback: TouchEventCallback)\n\n/**\n * Use the method to cancel the subscription of receiving a callback\n * when a change view text mode occurs\n *\n * @param changeViewTextCallback  The interface for listener to the change view text mode\n */\nfun unsubscribeChangeViewTextCallback(changeViewTextCallback: ChangeViewTextCallback)\n\n/**\n * Use the method to set [PathEffect] to the selector paint\n * @see PathEffect\n */\nfun setPathEffectForSelector(effect: PathEffect)\n\n/**\n * Use the method to set [Color] to the selector rectangle\n * @see Color\n */\nfun setColorForSelector(@ColorInt intColor: Int)\n\n/**\n * Use the method to set [Color] to the dash paint\n * @see Color\n */\nfun setColorForDashLine(@ColorInt intColor: Int)\n\n/**\n * Use the method to set [Color] to control buttons\n * @see Color\n */\nfun setColorForSelectorButton(@ColorInt intColor: Int)\n\n/**\n * Use the method to set [Color] to shadow\n * @see Color\n */\nfun setColorForTextShadow(@ColorInt intColor: Int)\n\n/**\n * Use the method to set the width for stroking\n *\n * @param width set the paint's stroke width, used whenever the paint's\n *              style is Stroke or StrokeAndFill.\n */\nfun setStrokeWidthForSelector(width: Float)\n\n/**\n * Use the method to set the width for stroking\n *\n * @param width set the paint's stroke width, used whenever the paint's\n *              style is Stroke or StrokeAndFill.\n */\nfun setStrokeWidthForDashLine(width: Float)\n\n/**\n * Use the method to set the icon for the change view button\n *\n * @param resId  The resource id for the button icon\n */\nfun setBitmapChangeViewTextButton(@DrawableRes resId: Int)\n\n/**\n * Use the method to set the icon for the scale button\n *\n * @param resId  The resource id for the button icon\n */\nfun setBitmapScaleButton(@DrawableRes resId: Int)\n\n/**\n * Use the method to set the icon for the reset button\n *\n * @param resId  The resource id for the button icon\n */\nfun setBitmapResetChangeViewTextButton(@DrawableRes resId: Int)\n\n/**\n * Use the method to obtain current [ChangeText] mod\n */\nfun getChangeViewTextMode()\n\n/**\n * Use the method for set the [ShowButtonOnSelector] mode for the button\n *\n * @param showButtonOnSelector  The enum for show a button on the selector\n */\nfun showScaleRotateButton(showButtonOnSelector: ShowButtonOnSelector)\n\n/**\n * Use the method for set the [ShowButtonOnSelector] mode for the button\n *\n * @param showButtonOnSelector  The enum for show a button on the selector\n */\nfun showChangeViewTextButton(showButtonOnSelector: ShowButtonOnSelector)\n\n/**\n * Use the method for set the [ShowButtonOnSelector] mode for the button\n *\n * @param showButtonOnSelector  The enum for show a button on the selector\n */\nfun showResetViewTextButton(showButtonOnSelector: ShowButtonOnSelector)\n\n/**\n * Use the method for set the [ChangeText] mode for text\n *\n * @param changeText  The enum with different types of actions for interacting with text\n */\nfun changeViewTextMode(changeText: ChangeText)\n\n/**\n * Use the method for set the initial value for the Bezier curve\n */\nfun resetViewText()\n\n/**\n * Use the method to draw the text in the bitmap\n *@see Bitmap\n *\n * @param bitmap  The bitmap that will be drawn below the text\n */\nfun saveResult(bitmap: Bitmap): Bitmap\n\n/**\n * Use the method to move text to the center of the screen\n */\nfun moveTextToCenter()\n\n```\n#### Fragment/Activity usage ####\n```groovy\nprivate const val DASH_PATH_ON_DISTANCE = 30F\nprivate const val DASH_PATH_OFF_DISTANCE = 10F\nprivate const val DASH_PATH_PHASE = 0F\nprivate const val STROKE_WIDTH_FOR_DASH_LINE = 4F\n...\nevDroidArt = (EditorView) view.findViewById(R.id.evDroidArt)\n\nevDroidArt?.apply {\n    setPathEffectForSelector(\n                DashPathEffect(floatArrayOf(DASH_PATH_ON_DISTANCE, DASH_PATH_OFF_DISTANCE),\n                DASH_PATH_PHASE))\n    setStrokeWidthForDashLine(STROKE_WIDTH_FOR_DASH_LINE)\n    setColorForTextShadow(Color.GRAY)\n    setColorForSelectorButton(Color.WHITE)\n    setColorForDashLine(Color.WHITE)\n    showScaleRotateButton(ShowButtonOnSelector.HIDE_BUTTON)\n    showResetViewTextButton(ShowButtonOnSelector.HIDE_BUTTON)\n    subscribeTouchEventCallback(touchEventCallback)\n}\n```\n#### XML usage ####\n```groovy\n   \u003ccom.cleveroad.droidart.EditorView\n           android:id=\"@+id/evDroidArt\"\n           android:layout_width=\"match_parent\"\n           android:layout_height=\"match_parent\"\n           app:font_path=\"fonts/some_fonts.ttf\"\n           app:text=\"@string/some_text\"\n           app:text_color=\"@color/text_color\"\n           app:text_shadow_color=\"@color/text_shadow\"\n           app:text_size=\"25sp\"/\u003e\n```\n\n## Changelog\nSee [changelog history].\n\n### Support ###\nIf you have any questions, issues or propositions, please create a \u003ca href=\"../../issues/new\"\u003enew issue\u003c/a\u003e in this repository.\n\nIf you want to hire us, send an email to sales@cleveroad.com or fill the form on \u003ca href=\"https://www.cleveroad.com/contact\"\u003econtact page\u003c/a\u003e\n\nFollow us:\n\n[![Awesome](/images/social/facebook.png)](https://www.facebook.com/cleveroadinc/)   [![Awesome](/images/social/twitter.png)](https://twitter.com/cleveroadinc)   [![Awesome](/images/social/google.png)](https://plus.google.com/+CleveroadInc)   [![Awesome](/images/social/linkedin.png)](https://www.linkedin.com/company/cleveroad-inc-)   [![Awesome](/images/social/youtube.png)](https://www.youtube.com/channel/UCFNHnq1sEtLiy0YCRHG2Vaw)\n\u003cbr/\u003e\n\n### License ###\n* * *\n    The MIT License (MIT)\n    \n    Copyright (c) 2016 Cleveroad Inc.\n    \n    Permission is hereby granted, free of charge, to any person obtaining a copy\n    of this software and associated documentation files (the \"Software\"), to deal\n    in the Software without restriction, including without limitation the rights\n    to use, copy, modify, merge, publish, distribute, sublicense, and/or sell\n    copies of the Software, and to permit persons to whom the Software is\n    furnished to do so, subject to the following conditions:\n    \n    The above copyright notice and this permission notice shall be included in all\n    copies or substantial portions of the Software.\n    \n    THE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR\n    IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,\n    FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE\n    AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER\n    LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,\n    OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE\n    SOFTWARE.\n\n[changelog history]: /CHANGELOG.md","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fcleveroad%2Fdroidart","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fcleveroad%2Fdroidart","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fcleveroad%2Fdroidart/lists"}