{"id":14460134,"url":"https://github.com/Fbada006/ArtMaker","last_synced_at":"2025-08-28T18:32:03.777Z","repository":{"id":253372292,"uuid":"832254480","full_name":"Fbada006/ArtMaker","owner":"Fbada006","description":"ArtMaker is a flexible and customisable library that allows users to draw anything they want on screen and has been built fully with Jetpack Compose.","archived":false,"fork":false,"pushed_at":"2024-11-15T07:01:51.000Z","size":67360,"stargazers_count":73,"open_issues_count":3,"forks_count":3,"subscribers_count":1,"default_branch":"main","last_synced_at":"2024-11-15T08:18:06.334Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":"","language":"Kotlin","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":null,"status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/Fbada006.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":null,"code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2024-07-22T16:24:57.000Z","updated_at":"2024-11-12T04:03:18.000Z","dependencies_parsed_at":"2024-09-16T09:17:34.479Z","dependency_job_id":"ca6ad403-293a-4751-9b2c-1151f2481c06","html_url":"https://github.com/Fbada006/ArtMaker","commit_stats":null,"previous_names":["fbada006/artmaker"],"tags_count":9,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Fbada006%2FArtMaker","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Fbada006%2FArtMaker/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Fbada006%2FArtMaker/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Fbada006%2FArtMaker/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/Fbada006","download_url":"https://codeload.github.com/Fbada006/ArtMaker/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":231294144,"owners_count":18354140,"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-09-01T21:01:04.584Z","updated_at":"2024-12-25T23:30:28.658Z","avatar_url":"https://github.com/Fbada006.png","language":"Kotlin","funding_links":[],"categories":["Kotlin"],"sub_categories":[],"readme":"[![Build ArtMaker](https://github.com/Fbada006/ArtMaker/actions/workflows/build.yml/badge.svg)](https://github.com/Fbada006/ArtMaker/actions/workflows/build.yml)\n[![Android Weekly](https://androidweekly.net/issues/issue-637/badge)](https://androidweekly.net/issues/issue-637)\n\n\u003ch1 align=\"center\" style=\"font-size: 48px; margin-bottom: 0;\"\u003eArtMaker\u003c/h1\u003e\n\u003ch1 align=\"center\" style=\"margin-top: 0;\"\u003e\n  \u003cimg src=\"art/artmaker%20banner.png\" alt=\"ArtMaker Logo\"\u003e\n\u003c/h1\u003e\n\u003cp align=\"center\" style=\"margin-top: 0;\"\u003eA Flexible and Lightweight Drawing Library\u003c/p\u003e\n\nArtMaker is a flexible and customisable Android and iOS (through Kotlin Multiplatform - KMP) library that allows users to draw anything they want on\nscreen and has been built fully with Jetpack Compose. Integrated with advanced features like [Palm Rejection](https://enticio.com/blogs/studio-and-office/a-beginner-s-guide-to-palm-rejection), line style customization, exportation, blazing performance, etc, it allows drawing on screen through the `Canvas`, sharing the drawn `Bitmap`, or programmatically exposing\nthe `Bitmap` for use in the calling application.\n\n## Demo\n\n| Android                                                         |                             | iOS                                                   |\n|-----------------------------------------------------------------|-----------------------------|-------------------------------------------------------|\n| \u003cimg src=\"art/android_demo.gif\" style=\"width:350px;height:px;\"\u003e | \u003cdiv style=\"padding:30px;\"\u003e | \u003cimg src=\"art/ios_demo.gif\" width=\"350\" height=\"700\"\u003e |\n\n## Download\n\n[![Maven central](https://img.shields.io/maven-central/v/io.github.fbada006/artmaker.svg)](https://search.maven.org/artifact/io.github.fbada006/artmaker)\n\n### Setup\n\nAdd the following in `settings.gradle.kts` if it has not been included:\n\n```kotlin\nrepositories {\n    mavenCentral()\n}\n```\n\nIn Kotlin Multiplatform (KMP) projects, add the following dependency in your `commonMain` sourceSet:\n\n```kotlin\nsourceSets {\n    commonMain.dependencies {\n        implementation(dependencyNotation = \"io.github.fbada006:artmaker:$latest_version\")\n    }\n}\n```\n\nIn Android projects, add the following dependency in your app-level (or module-level for modularised Android projects) `build.gradle.kts` file:\n\n```kotlin\ndependencies {\n    implementation(dependencyNotation = \"io.github.fbada006:artmaker:$latest_version\")\n}\n```\n\nIf you are using Gradle's Version Catalogs, then define the dependency as follows:\n\n```toml\n[versions]\nartmaker = \"$latest-version\"\n\n[libraries]\nartmaker = { module = \"io.github.fbada006:artmaker\", version.ref = \"artmaker\" }\n```\n\nSync your project and then add the dependency as follows:\n\n#### Kotlin Multiplatform\n\n```kotlin\nsourceSets {\n    commonMain.dependencies {\n        implementation(dependencyNotation = libs.artmaker)\n    }\n}\n```\n\n#### Android\n\n```kotlin\ndependencies {\n    implementation(dependencyNotation = libs.artmaker)\n}\n```\n\nFind latest version and release notes [here](https://github.com/Fbada006/ArtMaker/releases)\n\n## Usage\n\n**ArtMaker** implements canvas, which allows you to draw points with custom properties.\n\n### Android\n\nYou can use `ArtMaker` with default configuration as the following example:\n\n```kotlin\nArtMaker(\n    modifier = Modifier.fillMaxSize(),\n)\n```\n\nIn the Android project, you also need to call `ArtMakerInitializer.initialise(this)` inside your activity, otherwise a runtime exception will be\nthrown:\n\n```kotlin\nclass MainActivity : ComponentActivity() {\n    override fun onCreate(savedInstanceState: Bundle?) {\n        super.onCreate(savedInstanceState)\n        ArtMakerInitializer.initialise(this) // Do not forget this line\n        setContent {\n            ArtMakerTheme {\n                ArtMaker(\n                    modifier = Modifier.fillMaxSize(),\n                )\n            }\n        }\n    }\n}\n```\n\nYou also have full control of `ArtMaker` and choose how you want the control menu composable (the bar below the drawing area) to be\ndisplayed by customizing the `ArtMakerConfiguration` object as shown below:\n\n```kotlin\nArtMaker(\n    modifier = Modifier.fillMaxSize(),\n    configuration = ArtMakerConfiguration(\n        strokeSliderThumbColor = MaterialTheme.colorScheme.primary,\n        strokeSliderActiveTrackColor = MaterialTheme.colorScheme.onPrimary,\n        strokeSliderInactiveTickColor = MaterialTheme.colorScheme.inversePrimary,\n        strokeSliderTextColor = MaterialTheme.colorScheme.secondaryContainer,\n        pickerCustomColors = listOf(\n            Color.Red, Color.Blue, Color.Green,\n        ),\n        canvasBackgroundColor = Color.Green.toArgb(),\n        controllerBackgroundColor = Color.Cyan,\n        strokeSliderBackgroundColor = Color.Magenta,\n        canShareArt = true\n    )\n)\n```\n\nIf you wish to receive the completed image as a bitmap, you can utilise the `onFinishDrawing: (Bitmap) -\u003e Unit` callback exposed by `ArtMaker` as\nfollows:\n\n```kotlin\nArtMaker(\n    modifier = Modifier.fillMaxSize(),\n    onFinishDrawing = { bitmap -\u003e\n        // Utilise the bitmap here\n    }\n)\n```\n\n\u003e **_NOTE:_**  The default Jetpack Compose project created by Android Studio for Android has `enableEdgeToEdge()` added in the `onCreate()`. To\n\u003e effectively use the library, please ensure that you remove this line.\n\n### iOS\n\nIn iOS, you can use the SDK as below:\n\n```swift\nimport UIKit\nimport SwiftUI\nimport artmaker\n\nstruct ComposeView: UIViewControllerRepresentable {\n    func makeUIViewController(context: Context) -\u003e UIViewController {\n        MainViewControllerKt.mainViewController()\n    }\n\n    func updateUIViewController(_ uiViewController: UIViewController, context: Context) {}\n}\n\nstruct ContentView: View {\n    var body: some View {\n        ComposeView()\n    }\n}\n```\n\nYou can then call `ContentView` as follows in your main entry point for iOS as follows:\n\n```swift\nimport SwiftUI\n\n@main\nstruct iosAppApp: App {\n    var body: some Scene {\n        WindowGroup {\n            ContentView()\n        }\n    }\n}\n```\n\n## Contribute\n\nDo you see any improvements or want to implement a missing feature? Contributions are very welcome!\n\n- Is your contribution relatively small? You can, make your changes, run the code checks, open a PR\n  and make sure the CI is green. That's it!\n- Are the changes big and do they make a lot of impact? Please open an\n  issue [here](https://github.com/Fbada006/ArtMaker/issues?q=is%3Aissue) or reach out\n  to [Ferdinand](https://github.com/Fbada006), [Emmanuel](https://github.com/emmanuelmuturia) or [Caleb](https://github.com/CalebKL) and\n  let's discuss.\n- Ensure your change is properly formatted by running the following command from the terminal:\n\n```gradle\n./gradlew spotlessApply\n```\n\nThe CI will fail if the code is not properly formatted. Please correct any failures before requesting a review.\n\nTake into account that changes and requests can be rejected if they don't align with the **purpose\nof the library**. To ensure you do not waste any time, you can always open an\nissue [here](https://github.com/Fbada006/ArtMaker/issues?q=is%3Aissue) or talk to us before you\nstart making any changes.\n\n## License\n\n     Copyright 2024 ArtMaker, Inc. All Rights Reserved.\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","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2FFbada006%2FArtMaker","html_url":"https://awesome.ecosyste.ms/projects/github.com%2FFbada006%2FArtMaker","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2FFbada006%2FArtMaker/lists"}