├── app ├── .gitignore ├── src │ └── main │ │ ├── res │ │ ├── values │ │ │ ├── strings.xml │ │ │ ├── colors.xml │ │ │ └── styles.xml │ │ ├── mipmap-hdpi │ │ │ ├── ic_launcher.png │ │ │ └── ic_launcher_round.png │ │ ├── mipmap-mdpi │ │ │ ├── ic_launcher.png │ │ │ └── ic_launcher_round.png │ │ ├── mipmap-xhdpi │ │ │ ├── ic_launcher.png │ │ │ └── ic_launcher_round.png │ │ ├── mipmap-xxhdpi │ │ │ ├── ic_launcher.png │ │ │ └── ic_launcher_round.png │ │ ├── mipmap-xxxhdpi │ │ │ ├── ic_launcher.png │ │ │ └── ic_launcher_round.png │ │ ├── mipmap-anydpi-v26 │ │ │ ├── ic_launcher.xml │ │ │ └── ic_launcher_round.xml │ │ ├── layout │ │ │ ├── sample_layout.xml │ │ │ └── activity_main.xml │ │ ├── drawable-v24 │ │ │ └── ic_launcher_foreground.xml │ │ └── drawable │ │ │ └── ic_launcher_background.xml │ │ ├── AndroidManifest.xml │ │ └── java │ │ └── id │ │ └── zelory │ │ └── cekrek │ │ └── sample │ │ └── MainActivity.kt ├── proguard-rules.pro └── build.gradle ├── cekrek ├── .gitignore ├── consumer-rules.pro ├── src │ ├── main │ │ ├── AndroidManifest.xml │ │ └── java │ │ │ └── id │ │ │ └── zelory │ │ │ └── cekrek │ │ │ ├── config │ │ │ ├── CekrekConfig.kt │ │ │ ├── CanvasConfig.kt │ │ │ ├── CanvasSize.kt │ │ │ └── CekrekImageFileConfig.kt │ │ │ ├── extension │ │ │ ├── BitmapExt.kt │ │ │ └── ViewExt.kt │ │ │ └── Cekrek.kt │ └── test │ │ └── java │ │ └── id │ │ └── zelory │ │ └── cekrek │ │ ├── extension │ │ ├── BitmapExtTest.kt │ │ └── ViewExtTest.kt │ │ └── CekrekTest.kt ├── proguard-rules.pro └── build.gradle ├── settings.gradle ├── gradle └── wrapper │ ├── gradle-wrapper.jar │ └── gradle-wrapper.properties ├── .gitignore ├── .travis.yml ├── gradle.properties ├── gradlew.bat ├── README.md ├── gradlew └── LICENSE /app/.gitignore: -------------------------------------------------------------------------------- 1 | /build -------------------------------------------------------------------------------- /cekrek/.gitignore: -------------------------------------------------------------------------------- 1 | /build -------------------------------------------------------------------------------- /cekrek/consumer-rules.pro: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /settings.gradle: -------------------------------------------------------------------------------- 1 | include ':cekrek' 2 | include ':app' 3 | rootProject.name = "Cekrek" -------------------------------------------------------------------------------- /app/src/main/res/values/strings.xml: -------------------------------------------------------------------------------- 1 | 2 | Cekrek 3 | -------------------------------------------------------------------------------- /gradle/wrapper/gradle-wrapper.jar: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/zetbaitsu/Cekrek/HEAD/gradle/wrapper/gradle-wrapper.jar -------------------------------------------------------------------------------- /app/src/main/res/mipmap-hdpi/ic_launcher.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/zetbaitsu/Cekrek/HEAD/app/src/main/res/mipmap-hdpi/ic_launcher.png -------------------------------------------------------------------------------- /app/src/main/res/mipmap-mdpi/ic_launcher.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/zetbaitsu/Cekrek/HEAD/app/src/main/res/mipmap-mdpi/ic_launcher.png -------------------------------------------------------------------------------- /app/src/main/res/mipmap-xhdpi/ic_launcher.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/zetbaitsu/Cekrek/HEAD/app/src/main/res/mipmap-xhdpi/ic_launcher.png -------------------------------------------------------------------------------- /app/src/main/res/mipmap-xxhdpi/ic_launcher.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/zetbaitsu/Cekrek/HEAD/app/src/main/res/mipmap-xxhdpi/ic_launcher.png -------------------------------------------------------------------------------- /app/src/main/res/mipmap-xxxhdpi/ic_launcher.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/zetbaitsu/Cekrek/HEAD/app/src/main/res/mipmap-xxxhdpi/ic_launcher.png -------------------------------------------------------------------------------- /app/src/main/res/mipmap-hdpi/ic_launcher_round.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/zetbaitsu/Cekrek/HEAD/app/src/main/res/mipmap-hdpi/ic_launcher_round.png -------------------------------------------------------------------------------- /app/src/main/res/mipmap-mdpi/ic_launcher_round.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/zetbaitsu/Cekrek/HEAD/app/src/main/res/mipmap-mdpi/ic_launcher_round.png -------------------------------------------------------------------------------- /app/src/main/res/mipmap-xhdpi/ic_launcher_round.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/zetbaitsu/Cekrek/HEAD/app/src/main/res/mipmap-xhdpi/ic_launcher_round.png -------------------------------------------------------------------------------- /app/src/main/res/mipmap-xxhdpi/ic_launcher_round.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/zetbaitsu/Cekrek/HEAD/app/src/main/res/mipmap-xxhdpi/ic_launcher_round.png -------------------------------------------------------------------------------- /app/src/main/res/mipmap-xxxhdpi/ic_launcher_round.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/zetbaitsu/Cekrek/HEAD/app/src/main/res/mipmap-xxxhdpi/ic_launcher_round.png -------------------------------------------------------------------------------- /cekrek/src/main/AndroidManifest.xml: -------------------------------------------------------------------------------- 1 | 3 | 4 | / 5 | -------------------------------------------------------------------------------- /app/src/main/res/values/colors.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | #6200EE 4 | #3700B3 5 | #03DAC5 6 | -------------------------------------------------------------------------------- /.gitignore: -------------------------------------------------------------------------------- 1 | *.iml 2 | .gradle 3 | /local.properties 4 | /.idea/caches 5 | /.idea/libraries 6 | /.idea/modules.xml 7 | /.idea/workspace.xml 8 | /.idea/navEditor.xml 9 | /.idea/assetWizardSettings.xml 10 | .DS_Store 11 | /build 12 | /captures 13 | .externalNativeBuild 14 | .cxx 15 | -------------------------------------------------------------------------------- /gradle/wrapper/gradle-wrapper.properties: -------------------------------------------------------------------------------- 1 | #Sun Aug 02 10:17:38 WIB 2020 2 | distributionBase=GRADLE_USER_HOME 3 | distributionPath=wrapper/dists 4 | zipStoreBase=GRADLE_USER_HOME 5 | zipStorePath=wrapper/dists 6 | distributionUrl=https\://services.gradle.org/distributions/gradle-6.1.1-all.zip 7 | -------------------------------------------------------------------------------- /app/src/main/res/mipmap-anydpi-v26/ic_launcher.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | -------------------------------------------------------------------------------- /app/src/main/res/mipmap-anydpi-v26/ic_launcher_round.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | -------------------------------------------------------------------------------- /app/src/main/res/values/styles.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 9 | 10 | -------------------------------------------------------------------------------- /cekrek/src/main/java/id/zelory/cekrek/config/CekrekConfig.kt: -------------------------------------------------------------------------------- 1 | package id.zelory.cekrek.config 2 | 3 | import android.graphics.Bitmap 4 | 5 | /** 6 | * Created on : August 02, 2020 7 | * Author : zetbaitsu 8 | * Name : Zetra 9 | * GitHub : https://github.com/zetbaitsu 10 | */ 11 | data class CekrekConfig @JvmOverloads constructor( 12 | var canvasConfig: CanvasConfig = CanvasConfig(), 13 | var bitmapConfig: Bitmap.Config = Bitmap.Config.ARGB_8888 14 | ) -------------------------------------------------------------------------------- /cekrek/src/main/java/id/zelory/cekrek/config/CanvasConfig.kt: -------------------------------------------------------------------------------- 1 | package id.zelory.cekrek.config 2 | 3 | import android.graphics.Color 4 | 5 | /** 6 | * Created on : August 02, 2020 7 | * Author : zetbaitsu 8 | * Name : Zetra 9 | * GitHub : https://github.com/zetbaitsu 10 | */ 11 | data class CanvasConfig @JvmOverloads constructor( 12 | var width: CanvasSize = CanvasSize.WrapContent, 13 | var height: CanvasSize = CanvasSize.WrapContent, 14 | var color: Int = Color.WHITE 15 | ) -------------------------------------------------------------------------------- /cekrek/src/main/java/id/zelory/cekrek/config/CanvasSize.kt: -------------------------------------------------------------------------------- 1 | package id.zelory.cekrek.config 2 | 3 | import android.view.View 4 | 5 | /** 6 | * Created on : August 02, 2020 7 | * Author : zetbaitsu 8 | * Name : Zetra 9 | * GitHub : https://github.com/zetbaitsu 10 | */ 11 | sealed class CanvasSize(val specSize: Int) { 12 | object WrapContent : 13 | CanvasSize(View.MeasureSpec.makeMeasureSpec((1 shl 30) - 1, View.MeasureSpec.AT_MOST)) 14 | 15 | data class Specific(private val size: Int) : 16 | CanvasSize(View.MeasureSpec.makeMeasureSpec(size, View.MeasureSpec.EXACTLY)) 17 | } -------------------------------------------------------------------------------- /cekrek/src/main/java/id/zelory/cekrek/config/CekrekImageFileConfig.kt: -------------------------------------------------------------------------------- 1 | package id.zelory.cekrek.config 2 | 3 | import android.graphics.Bitmap 4 | import id.zelory.cekrek.extension.compressFormat 5 | import java.io.File 6 | 7 | /** 8 | * Created on : August 02, 2020 9 | * Author : zetbaitsu 10 | * Name : Zetra 11 | * GitHub : https://github.com/zetbaitsu 12 | */ 13 | data class CekrekImageFileConfig @JvmOverloads constructor( 14 | val destination: File, 15 | var format: Bitmap.CompressFormat = destination.compressFormat(), 16 | var quality: Int = 100, 17 | var cekrekConfig: CekrekConfig = CekrekConfig() 18 | ) -------------------------------------------------------------------------------- /app/src/main/AndroidManifest.xml: -------------------------------------------------------------------------------- 1 | 2 | 4 | 5 | 12 | 13 | 14 | 15 | 16 | 17 | 18 | 19 | 20 | 21 | -------------------------------------------------------------------------------- /app/proguard-rules.pro: -------------------------------------------------------------------------------- 1 | # Add project specific ProGuard rules here. 2 | # You can control the set of applied configuration files using the 3 | # proguardFiles setting in build.gradle. 4 | # 5 | # For more details, see 6 | # http://developer.android.com/guide/developing/tools/proguard.html 7 | 8 | # If your project uses WebView with JS, uncomment the following 9 | # and specify the fully qualified class name to the JavaScript interface 10 | # class: 11 | #-keepclassmembers class fqcn.of.javascript.interface.for.webview { 12 | # public *; 13 | #} 14 | 15 | # Uncomment this to preserve the line number information for 16 | # debugging stack traces. 17 | #-keepattributes SourceFile,LineNumberTable 18 | 19 | # If you keep the line number information, uncomment this to 20 | # hide the original source file name. 21 | #-renamesourcefileattribute SourceFile -------------------------------------------------------------------------------- /cekrek/proguard-rules.pro: -------------------------------------------------------------------------------- 1 | # Add project specific ProGuard rules here. 2 | # You can control the set of applied configuration files using the 3 | # proguardFiles setting in build.gradle. 4 | # 5 | # For more details, see 6 | # http://developer.android.com/guide/developing/tools/proguard.html 7 | 8 | # If your project uses WebView with JS, uncomment the following 9 | # and specify the fully qualified class name to the JavaScript interface 10 | # class: 11 | #-keepclassmembers class fqcn.of.javascript.interface.for.webview { 12 | # public *; 13 | #} 14 | 15 | # Uncomment this to preserve the line number information for 16 | # debugging stack traces. 17 | #-keepattributes SourceFile,LineNumberTable 18 | 19 | # If you keep the line number information, uncomment this to 20 | # hide the original source file name. 21 | #-renamesourcefileattribute SourceFile -------------------------------------------------------------------------------- /.travis.yml: -------------------------------------------------------------------------------- 1 | language: android 2 | dist: trusty 3 | android: 4 | components: 5 | # Uncomment the lines below if you want to 6 | # use the latest revision of Android SDK Tools 7 | # - tools 8 | # - platform-tools 9 | 10 | # The BuildTools version used by your project 11 | - build-tools-29.0.3 12 | 13 | # The SDK version used to compile your project 14 | - android-29 15 | 16 | # Additional components 17 | - extra-google-google_play_services 18 | - extra-google-m2repository 19 | - extra-android-m2repository 20 | 21 | # Specify at least one system image, 22 | # if you need to run emulator(s) during your tests 23 | - sys-img-x86-android-21 24 | before_script: 25 | - touch local.properties 26 | script: 27 | - ./gradlew clean build jacocoTestReleaseUnitTestReport 28 | after_success: 29 | - bash <(curl -s https://codecov.io/bash) -------------------------------------------------------------------------------- /app/src/main/res/layout/sample_layout.xml: -------------------------------------------------------------------------------- 1 | 2 | 7 | 8 | 13 | 14 | 23 | 24 | -------------------------------------------------------------------------------- /app/src/main/res/layout/activity_main.xml: -------------------------------------------------------------------------------- 1 | 2 | 9 | 10 | 14 | 15 |