[
  {
    "path": ".gitignore",
    "content": "# Built application files\n*.apk\n*.ap_\n\n# Files for the ART/Dalvik VM\n*.dex\n\n# Java class files\n*.class\n\n# Generated files\nbin/\ngen/\nout/\n\n# Gradle files\n.gradle/\nbuild/\n\n# Local configuration file (sdk path, etc)\nlocal.properties\n\n# Proguard folder generated by Eclipse\nproguard/\n\n# Log Files\n*.log\n\n# Android Studio Navigation editor temp files\n.navigation/\n\n# Android Studio captures folder\ncaptures/\n\n# Intellij\n*.iml\n.idea/workspace.xml\n.idea/\n\n# Keystore files\n*.jks\n"
  },
  {
    "path": "CHANGELOG.md",
    "content": "Change Log\r\n==========\r\n\r\nVersion 2.0.2 *(2019-07-27)*\r\n----------------------------\r\n\r\n* Fix `lineMinLength` setter\r\n\r\nVersion 2.0.1 *(2019-07-21)*\r\n----------------------------\r\n\r\n* Remove `android:allowBackup` and `android:supportsRtl` from manifest\r\n* Update dependencies\r\n* Change package from `com.vlad1m1r.lemniscate.sample.lemniscate` to `com.vlad1m1r.lemniscate`\r\n\r\nVersion 2.0.0 *(2019-03-23)*\r\n----------------------------\r\n\r\n* Migration to AndroidX\r\n\r\nVersion 1.4.5 *(2019-03-23)*\r\n----------------------------\r\n\r\n* Update dependencies\r\n\r\nVersion 1.4.4 *(2018-04-05)*\r\n----------------------------\r\n\r\n* Replace `View.BaseSavedState` with `android.support.v4.view.AbsSavedState` in `BaseCurveProgressView`\r\n\r\nVersion 1.4.3 *(2018-04-04)*\r\n----------------------------\r\n\r\n* Fixed problem with restoring view's state\r\n* Small code optimization\r\n\r\nVersion 1.4.2 *(2018-01-16)*\r\n----------------------------\r\n\r\n* Fixed bug where View would not show inside ScrollView.  [#5](https://github.com/VladimirWrites/Lemniscate/issues/5)\r\n\r\nVersion 1.4.1 *(2018-01-06)*\r\n----------------------------\r\n\r\n* Fixed bug where SizeMultiplier property was not working when set from `xml`.  [#4](https://github.com/VladimirWrites/Lemniscate/issues/4)\r\n\r\nVersion 1.4.0 *(2017-11-09)*\r\n----------------------------\r\n\r\n* Project rewritten in Kotlin.  \r\n* Organization of base classes improved\r\n* Fixed bugs in Sample app\r\n\r\nVersion 1.3.0 *(2017-11-03)*\r\n----------------------------\r\n\r\n* `lineLength` and `lineLengthChangeable` do not exist anymore. If `maxLineLength` and `minLineLength` are the same then `lineLengthChangeable==false`, otherwise line length will be changeable\r\n`getGraphX` and `getGraphY` now return `float` and not `double`\r\n* `mLemniscateParamX` and `mLemniscateParamY` are not used anymore and are replaced by `viewSize.getSize()`, where `mLemniscateParamX == mLemniscateParamY == viewSize.getSize()/2`\r\n* `minSdkVersion` moved from 11 to 14\r\n\r\nVersion 1.2.0 *(2017-02-16)*\r\n----------------------------\r\n\r\n * New curves added: `BernoullisBowProgressView`, `BernoullisSharpProgressView`, `XProgressView`, `RoundScribbleProgressView`, `ScribbleProgressView`\r\n * `colorAccent` is now being used as default line color\r\n\r\nVersion 1.1.1 *(2017-01-26)*\r\n----------------------------\r\n\r\n * Optimization of function that is doing sampling of curve\r\n\r\nVersion 1.1.0 *(2017-01-26)*\r\n----------------------------\r\n\r\n * Abstract functions `getGraphX()` and `getGraphY()` now receive value of `getT()`\r\n\r\nVersion 1.0.2 *(2017-01-24)*\r\n----------------------------\r\n\r\n * Fix: Added `onSaveState` for Roulette curves\r\n * Fix: Precision is being saved `onSaveState` for all curves\r\n\r\n\r\nVersion 1.0.1 *(2017-01-23)*\r\n----------------------------\r\n\r\n * Fix: Crash on `setColor(int color)` in `BaseCurveProgressBar`, when called from constructor.\r\n\r\n\r\nVersion 1.0.0 *(2017-01-23)*\r\n----------------------------\r\n\r\nInitial release.\r\n\r\n\r\n"
  },
  {
    "path": "LICENSE",
    "content": "                                 Apache License\n                           Version 2.0, January 2004\n                        http://www.apache.org/licenses/\n\n   TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION\n\n   1. Definitions.\n\n      \"License\" shall mean the terms and conditions for use, reproduction,\n      and distribution as defined by Sections 1 through 9 of this document.\n\n      \"Licensor\" shall mean the copyright owner or entity authorized by\n      the copyright owner that is granting the License.\n\n      \"Legal Entity\" shall mean the union of the acting entity and all\n      other entities that control, are controlled by, or are under common\n      control with that entity. For the purposes of this definition,\n      \"control\" means (i) the power, direct or indirect, to cause the\n      direction or management of such entity, whether by contract or\n      otherwise, or (ii) ownership of fifty percent (50%) or more of the\n      outstanding shares, or (iii) beneficial ownership of such entity.\n\n      \"You\" (or \"Your\") shall mean an individual or Legal Entity\n      exercising permissions granted by this License.\n\n      \"Source\" form shall mean the preferred form for making modifications,\n      including but not limited to software source code, documentation\n      source, and configuration files.\n\n      \"Object\" form shall mean any form resulting from mechanical\n      transformation or translation of a Source form, including but\n      not limited to compiled object code, generated documentation,\n      and conversions to other media types.\n\n      \"Work\" shall mean the work of authorship, whether in Source or\n      Object form, made available under the License, as indicated by a\n      copyright notice that is included in or attached to the work\n      (an example is provided in the Appendix below).\n\n      \"Derivative Works\" shall mean any work, whether in Source or Object\n      form, that is based on (or derived from) the Work and for which the\n      editorial revisions, annotations, elaborations, or other modifications\n      represent, as a whole, an original work of authorship. For the purposes\n      of this License, Derivative Works shall not include works that remain\n      separable from, or merely link (or bind by name) to the interfaces of,\n      the Work and Derivative Works thereof.\n\n      \"Contribution\" shall mean any work of authorship, including\n      the original version of the Work and any modifications or additions\n      to that Work or Derivative Works thereof, that is intentionally\n      submitted to Licensor for inclusion in the Work by the copyright owner\n      or by an individual or Legal Entity authorized to submit on behalf of\n      the copyright owner. For the purposes of this definition, \"submitted\"\n      means any form of electronic, verbal, or written communication sent\n      to the Licensor or its representatives, including but not limited to\n      communication on electronic mailing lists, source code control systems,\n      and issue tracking systems that are managed by, or on behalf of, the\n      Licensor for the purpose of discussing and improving the Work, but\n      excluding communication that is conspicuously marked or otherwise\n      designated in writing by the copyright owner as \"Not a Contribution.\"\n\n      \"Contributor\" shall mean Licensor and any individual or Legal Entity\n      on behalf of whom a Contribution has been received by Licensor and\n      subsequently incorporated within the Work.\n\n   2. Grant of Copyright License. Subject to the terms and conditions of\n      this License, each Contributor hereby grants to You a perpetual,\n      worldwide, non-exclusive, no-charge, royalty-free, irrevocable\n      copyright license to reproduce, prepare Derivative Works of,\n      publicly display, publicly perform, sublicense, and distribute the\n      Work and such Derivative Works in Source or Object form.\n\n   3. Grant of Patent License. Subject to the terms and conditions of\n      this License, each Contributor hereby grants to You a perpetual,\n      worldwide, non-exclusive, no-charge, royalty-free, irrevocable\n      (except as stated in this section) patent license to make, have made,\n      use, offer to sell, sell, import, and otherwise transfer the Work,\n      where such license applies only to those patent claims licensable\n      by such Contributor that are necessarily infringed by their\n      Contribution(s) alone or by combination of their Contribution(s)\n      with the Work to which such Contribution(s) was submitted. If You\n      institute patent litigation against any entity (including a\n      cross-claim or counterclaim in a lawsuit) alleging that the Work\n      or a Contribution incorporated within the Work constitutes direct\n      or contributory patent infringement, then any patent licenses\n      granted to You under this License for that Work shall terminate\n      as of the date such litigation is filed.\n\n   4. Redistribution. You may reproduce and distribute copies of the\n      Work or Derivative Works thereof in any medium, with or without\n      modifications, and in Source or Object form, provided that You\n      meet the following conditions:\n\n      (a) You must give any other recipients of the Work or\n          Derivative Works a copy of this License; and\n\n      (b) You must cause any modified files to carry prominent notices\n          stating that You changed the files; and\n\n      (c) You must retain, in the Source form of any Derivative Works\n          that You distribute, all copyright, patent, trademark, and\n          attribution notices from the Source form of the Work,\n          excluding those notices that do not pertain to any part of\n          the Derivative Works; and\n\n      (d) If the Work includes a \"NOTICE\" text file as part of its\n          distribution, then any Derivative Works that You distribute must\n          include a readable copy of the attribution notices contained\n          within such NOTICE file, excluding those notices that do not\n          pertain to any part of the Derivative Works, in at least one\n          of the following places: within a NOTICE text file distributed\n          as part of the Derivative Works; within the Source form or\n          documentation, if provided along with the Derivative Works; or,\n          within a display generated by the Derivative Works, if and\n          wherever such third-party notices normally appear. The contents\n          of the NOTICE file are for informational purposes only and\n          do not modify the License. You may add Your own attribution\n          notices within Derivative Works that You distribute, alongside\n          or as an addendum to the NOTICE text from the Work, provided\n          that such additional attribution notices cannot be construed\n          as modifying the License.\n\n      You may add Your own copyright statement to Your modifications and\n      may provide additional or different license terms and conditions\n      for use, reproduction, or distribution of Your modifications, or\n      for any such Derivative Works as a whole, provided Your use,\n      reproduction, and distribution of the Work otherwise complies with\n      the conditions stated in this License.\n\n   5. Submission of Contributions. Unless You explicitly state otherwise,\n      any Contribution intentionally submitted for inclusion in the Work\n      by You to the Licensor shall be under the terms and conditions of\n      this License, without any additional terms or conditions.\n      Notwithstanding the above, nothing herein shall supersede or modify\n      the terms of any separate license agreement you may have executed\n      with Licensor regarding such Contributions.\n\n   6. Trademarks. This License does not grant permission to use the trade\n      names, trademarks, service marks, or product names of the Licensor,\n      except as required for reasonable and customary use in describing the\n      origin of the Work and reproducing the content of the NOTICE file.\n\n   7. Disclaimer of Warranty. Unless required by applicable law or\n      agreed to in writing, Licensor provides the Work (and each\n      Contributor provides its Contributions) on an \"AS IS\" BASIS,\n      WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or\n      implied, including, without limitation, any warranties or conditions\n      of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A\n      PARTICULAR PURPOSE. You are solely responsible for determining the\n      appropriateness of using or redistributing the Work and assume any\n      risks associated with Your exercise of permissions under this License.\n\n   8. Limitation of Liability. In no event and under no legal theory,\n      whether in tort (including negligence), contract, or otherwise,\n      unless required by applicable law (such as deliberate and grossly\n      negligent acts) or agreed to in writing, shall any Contributor be\n      liable to You for damages, including any direct, indirect, special,\n      incidental, or consequential damages of any character arising as a\n      result of this License or out of the use or inability to use the\n      Work (including but not limited to damages for loss of goodwill,\n      work stoppage, computer failure or malfunction, or any and all\n      other commercial damages or losses), even if such Contributor\n      has been advised of the possibility of such damages.\n\n   9. Accepting Warranty or Additional Liability. While redistributing\n      the Work or Derivative Works thereof, You may choose to offer,\n      and charge a fee for, acceptance of support, warranty, indemnity,\n      or other liability obligations and/or rights consistent with this\n      License. However, in accepting such obligations, You may act only\n      on Your own behalf and on Your sole responsibility, not on behalf\n      of any other Contributor, and only if You agree to indemnify,\n      defend, and hold each Contributor harmless for any liability\n      incurred by, or claims asserted against, such Contributor by reason\n      of your accepting any such warranty or additional liability.\n\n   END OF TERMS AND CONDITIONS"
  },
  {
    "path": "README.md",
    "content": "![Lemniscate header](http://i.imgur.com/i9t5vUm.png)\r\n\r\n\r\n[![License](https://img.shields.io/badge/License-Apache%202.0-blue.svg)](https://github.com/VladimirWrites/Lemniscate/blob/master/LICENSE)\r\n[![](https://jitpack.io/v/VladimirWrites/Lemniscate.svg)](https://jitpack.io/#VladimirWrites/Lemniscate) \r\n[![API](https://img.shields.io/badge/API-14%2B-green.svg?style=flat)](https://android-arsenal.com/api?level-11) \r\n[![Android Arsenal](https://img.shields.io/badge/Android%20Arsenal-Lemniscate-green.svg?style=flat)](https://android-arsenal.com/details/1/5142)\r\n[![Build Status](https://app.bitrise.io/app/a22f82dd1a84f058.svg?token=sufo7FQOqMK9NjUqcP4CzA&branch=master)](https://app.bitrise.io/app/a22f82dd1a84f058#/builds)\r\n[![codecov](https://codecov.io/gh/VladimirWrites/Lemniscate/branch/master/graph/badge.svg)](https://codecov.io/gh/VladimirWrites/Lemniscate)\r\n\r\n-----\r\n\r\nLemniscate is a library that will help you to make your progress view nice and sleek.\r\n\r\n![Lemniscate gif](http://i.imgur.com/xPRHWdv.gif)\r\n\r\nDemo\r\n-----\r\n\r\nDemo application is available on Google Play.\r\n\r\n<a href='https://play.google.com/store/apps/details?id=com.vlad1m1r.lemniscate.sample'>\r\n    <img alt='Get it on Google Play' src='http://i.imgur.com/tka3Exw.png'/>\r\n</a>\r\n\r\nThe application is intentionally simple, without any libraries, to be understandable to more developers.\r\n\r\nSetup\r\n-----\r\n\r\nAdd to your module's `build.gradle`:\r\n\r\n```groovy\r\nallprojects {\r\n    repositories {\r\n        ...\r\n        maven { url 'https://jitpack.io' }\r\n    }\r\n}\r\n```\r\n\r\nand to your app `build.gradle`:\r\n\r\n###### AndroidX\r\n```groovy\r\ndependencies {\r\n    implementation 'com.github.VladimirWrites:Lemniscate:2.0.4'\r\n}\r\n```\r\n    \r\n###### Android Support Library (Depricated)\r\n```groovy\r\ndependencies {\r\n    implementation 'com.github.VladimirWrites:Lemniscate:1.4.5'\r\n}\r\n```\r\n\r\nUsage\r\n-----\r\n\r\nExample of usage:\r\n```xml\r\n<com.vlad1m1r.lemniscate.BernoullisProgressView\r\n    android:layout_width=\"wrap_content\"\r\n    android:layout_height=\"wrap_content\"\r\n    app:duration=\"1000\"\r\n    app:hasHole=\"false\"\r\n    app:lineColor=\"@color/colorPrimary\"\r\n    app:maxLineLength=\"0.8\"\r\n    app:minLineLength=\"0.4\"\r\n    app:sizeMultiplier=\"1\"\r\n    app:strokeWidth=\"5dp\"/>\r\n```\r\n\r\n###### Params available in all views:\r\n\r\n* **duration** (int) - duration of one animation cycle in millisecondes\r\n* **lineColor** (color) - color of the line\r\n* **maxLineLength** (float) - max length of line (in percentage; 1.0 is full length, 0.5 is half of length)\r\n* **minLineLength** (float) - min length of line (in percentage; 1.0 is full length, 0.5 is half of length)\r\n* **sizeMultiplier** (float) - default size of view will be multiplied with that number\r\n* **strokeWidth** (dimension) - width of line \r\n* **precision** (int) - number of points in curve calculated in one cycle\r\n\r\n#### Lemniscates\r\n* `BernoullisProgressView` - [Lemniscate of Bernoulli](https://en.wikipedia.org/wiki/Lemniscate_of_Bernoulli),\r\n* `GeronosProgressView` - [Lemniscate of Gerono](https://en.wikipedia.org/wiki/Lemniscate_of_Gerono)\r\n* `BernoullisBowProgressView`\r\n* `BernoullisSharpProgressView`\r\n\r\n###### Additional params:\r\n* **hasHole** (boolean) - hole in a middle of Lemniscates\r\n\r\n#### Roulettes\r\n* `EpitrochoidProgressView` - [Epitrochoid](https://en.wikipedia.org/wiki/Epitrochoid),\r\n* `HypotrochoidProgressView` - [Hypotrochoid](https://en.wikipedia.org/wiki/Hypotrochoid)\r\n\r\n###### Additional params:\r\n* **radiusFixed** (float) - radius of fixed circle\r\n* **radiusMoving** (float) - radius of moving circle\r\n* **distanceFromCenter** (float) -  distance from the center of the moving circle\r\n* **numberOfCycles** (float) - for one **duration** curve will be drawn on interval [0, 2 \\* mNumberOfCycles \\* π]\r\n\r\n#### Scribble\r\n* `RoundScribbleProgressView`\r\n* `ScribbleProgressView`\r\n\r\n#### Funny\r\n* `HeartProgressView` - [Heart Curve](http://mathworld.wolfram.com/HeartCurve.html),\r\n* `CannabisProgressView` - [Cannabis Curve](http://mathworld.wolfram.com/CannabisCurve.html)\r\n\r\n#### Other\r\n* `XProgressView`\r\n\r\nContributing\r\n-------\r\n\r\nWant to contribute? You are welcome! \r\nNote that all pull request should go to [`development`](https://github.com/VladimirWrites/Lemniscate/tree/development) branch.\r\n\r\nCredits\r\n-------\r\n\r\n+ [Vladimir Jovanovic](https://github.com/VladimirWrites)\r\n\r\nLicense\r\n-------\r\n\r\n    Copyright 2016 Vladimir Jovanovic\r\n\r\n    Licensed under the Apache License, Version 2.0 (the \"License\");\r\n    you may not use this file except in compliance with the License.\r\n    You may obtain a copy of the License at\r\n\r\n         http://www.apache.org/licenses/LICENSE-2.0\r\n\r\n    Unless required by applicable law or agreed to in writing, software\r\n    distributed under the License is distributed on an \"AS IS\" BASIS,\r\n    WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\r\n    See the License for the specific language governing permissions and\r\n    limitations under the License.\r\n"
  },
  {
    "path": "build.gradle",
    "content": "buildscript {\n    repositories {\n        jcenter()\n        google()\n    }\n    dependencies {\n        classpath Deps.android_gradle_plugin\n        classpath Deps.kotlin_gradle_plugin\n    }\n}\n\nallprojects {\n    repositories {\n        jcenter()\n        google()\n    }\n}\n\ntask clean(type: Delete) {\n    delete rootProject.buildDir\n}\n"
  },
  {
    "path": "buildSrc/.gitignore",
    "content": "/build\n"
  },
  {
    "path": "buildSrc/build.gradle.kts",
    "content": "/*\n * Copyright 2017 Vladimir Jovanovic\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 */\n\nplugins {\n    `kotlin-dsl`\n}\n\nrepositories {\n    mavenCentral()\n}\n"
  },
  {
    "path": "buildSrc/src/main/java/Dependencies.kt",
    "content": "\nobject Versions {\n    const val kotlin = \"2.0.20\"\n\n    const val android_x = \"1.7.0\"\n\n    const val circleindicator = \"2.1.6\"\n\n    const val junit = \"4.13.2\"\n    const val mockito_core = \"4.5.1\"\n    const val mockito_kotlin = \"4.0.0\"\n    const val truth = \"1.1.3\"\n    const val robolectric = \"4.7.3\"\n\n    const val gradle_android = \"8.6.0\"\n    const val jacoco = \"0.8.8\"\n\n    const val min_sdk = 14\n    const val sample_min_sdk = 21\n    const val target_sdk = 35\n    const val compile_sdk = 35\n\n    const val lemniscate_version_code = 204\n    const val lemniscate_version_name = \"2.0.4\"\n\n    const val sample_version_code = 144\n    const val sample_version_name = \"1.4.4\"\n}\n\nobject Deps {\n    const val kotlin_stdlib = \"org.jetbrains.kotlin:kotlin-stdlib:${Versions.kotlin}\"\n\n    const val appcompat = \"androidx.appcompat:appcompat:${Versions.android_x}\"\n\n    const val circleindicator = \"me.relex:circleindicator:${Versions.circleindicator}\"\n\n    const val junit = \"junit:junit:${Versions.junit}\"\n    const val mockito_core = \"org.mockito:mockito-core:${Versions.mockito_core}\"\n    const val mockito_kotlin = \"org.mockito.kotlin:mockito-kotlin:${Versions.mockito_kotlin}\"\n    const val truth = \"com.google.truth:truth:${Versions.truth}\"\n    const val robolectric = \"org.robolectric:robolectric:${Versions.robolectric}\"\n\n    const val android_gradle_plugin = \"com.android.tools.build:gradle:${Versions.gradle_android}\"\n    const val kotlin_gradle_plugin = \"org.jetbrains.kotlin:kotlin-gradle-plugin:${Versions.kotlin}\"\n}\n"
  },
  {
    "path": "gradle/wrapper/gradle-wrapper.properties",
    "content": "#Sat Sep 07 13:09:29 CEST 2024\ndistributionBase=GRADLE_USER_HOME\ndistributionPath=wrapper/dists\ndistributionUrl=https\\://services.gradle.org/distributions/gradle-8.7-bin.zip\nzipStoreBase=GRADLE_USER_HOME\nzipStorePath=wrapper/dists\n"
  },
  {
    "path": "gradle.properties",
    "content": "# Project-wide Gradle settings.\n\n# IDE (e.g. Android Studio) users:\n# Gradle settings configured through the IDE *will override*\n# any settings specified in this file.\n\n# For more details on how to configure your build environment visit\n# http://www.gradle.org/docs/current/userguide/build_environment.html\n\n# Specifies the JVM arguments used for the daemon process.\n# The setting is particularly useful for tweaking memory settings.\norg.gradle.jvmargs=-Xmx1536m\nandroid.useAndroidX=true\n# When configured, Gradle will run in incubating parallel mode.\n# This option should only be used with decoupled projects. More details, visit\n# http://www.gradle.org/docs/current/userguide/multi_project_builds.html#sec:decoupled_projects\n# org.gradle.parallel=true\n"
  },
  {
    "path": "gradlew",
    "content": "#!/usr/bin/env bash\n\n##############################################################################\n##\n##  Gradle start up script for UN*X\n##\n##############################################################################\n\n# Add default JVM options here. You can also use JAVA_OPTS and GRADLE_OPTS to pass JVM options to this script.\nDEFAULT_JVM_OPTS=\"\"\n\nAPP_NAME=\"Gradle\"\nAPP_BASE_NAME=`basename \"$0\"`\n\n# Use the maximum available, or set MAX_FD != -1 to use that value.\nMAX_FD=\"maximum\"\n\nwarn ( ) {\n    echo \"$*\"\n}\n\ndie ( ) {\n    echo\n    echo \"$*\"\n    echo\n    exit 1\n}\n\n# OS specific support (must be 'true' or 'false').\ncygwin=false\nmsys=false\ndarwin=false\ncase \"`uname`\" in\n  CYGWIN* )\n    cygwin=true\n    ;;\n  Darwin* )\n    darwin=true\n    ;;\n  MINGW* )\n    msys=true\n    ;;\nesac\n\n# Attempt to set APP_HOME\n# Resolve links: $0 may be radiusFixed link\nPRG=\"$0\"\n# Need this for relative symlinks.\nwhile [ -h \"$PRG\" ] ; do\n    ls=`ls -ld \"$PRG\"`\n    link=`expr \"$ls\" : '.*-> \\(.*\\)$'`\n    if expr \"$link\" : '/.*' > /dev/null; then\n        PRG=\"$link\"\n    else\n        PRG=`dirname \"$PRG\"`\"/$link\"\n    fi\ndone\nSAVED=\"`pwd`\"\ncd \"`dirname \\\"$PRG\\\"`/\" >/dev/null\nAPP_HOME=\"`pwd -P`\"\ncd \"$SAVED\" >/dev/null\n\nCLASSPATH=$APP_HOME/gradle/wrapper/gradle-wrapper.jar\n\n# Determine the Java command to use to start the JVM.\nif [ -n \"$JAVA_HOME\" ] ; then\n    if [ -x \"$JAVA_HOME/jre/sh/java\" ] ; then\n        # IBM's JDK on AIX uses strange locations for the executables\n        JAVACMD=\"$JAVA_HOME/jre/sh/java\"\n    else\n        JAVACMD=\"$JAVA_HOME/bin/java\"\n    fi\n    if [ ! -x \"$JAVACMD\" ] ; then\n        die \"ERROR: JAVA_HOME is set to an invalid directory: $JAVA_HOME\n\nPlease set the JAVA_HOME variable in your environment to match the\nlocation of your Java installation.\"\n    fi\nelse\n    JAVACMD=\"java\"\n    which java >/dev/null 2>&1 || die \"ERROR: JAVA_HOME is not set and no 'java' command could be found in your PATH.\n\nPlease set the JAVA_HOME variable in your environment to match the\nlocation of your Java installation.\"\nfi\n\n# Increase the maximum file descriptors if we can.\nif [ \"$cygwin\" = \"false\" -radiusFixed \"$darwin\" = \"false\" ] ; then\n    MAX_FD_LIMIT=`ulimit -H -n`\n    if [ $? -eq 0 ] ; then\n        if [ \"$MAX_FD\" = \"maximum\" -o \"$MAX_FD\" = \"max\" ] ; then\n            MAX_FD=\"$MAX_FD_LIMIT\"\n        fi\n        ulimit -n $MAX_FD\n        if [ $? -ne 0 ] ; then\n            warn \"Could not set maximum file descriptor limit: $MAX_FD\"\n        fi\n    else\n        warn \"Could not query maximum file descriptor limit: $MAX_FD_LIMIT\"\n    fi\nfi\n\n# For Darwin, add options to specify how the application appears in the dock\nif $darwin; then\n    GRADLE_OPTS=\"$GRADLE_OPTS \\\"-Xdock:name=$APP_NAME\\\" \\\"-Xdock:icon=$APP_HOME/media/gradle.icns\\\"\"\nfi\n\n# For Cygwin, switch paths to Windows format before running java\nif $cygwin ; then\n    APP_HOME=`cygpath --path --mixed \"$APP_HOME\"`\n    CLASSPATH=`cygpath --path --mixed \"$CLASSPATH\"`\n    JAVACMD=`cygpath --unix \"$JAVACMD\"`\n\n    # We build the pattern for arguments to be converted via cygpath\n    ROOTDIRSRAW=`find -L / -maxdepth 1 -mindepth 1 -type distanceFromCenter 2>/dev/null`\n    SEP=\"\"\n    for dir in $ROOTDIRSRAW ; do\n        ROOTDIRS=\"$ROOTDIRS$SEP$dir\"\n        SEP=\"|\"\n    done\n    OURCYGPATTERN=\"(^($ROOTDIRS))\"\n    # Add radiusFixed user-defined pattern to the cygpath arguments\n    if [ \"$GRADLE_CYGPATTERN\" != \"\" ] ; then\n        OURCYGPATTERN=\"$OURCYGPATTERN|($GRADLE_CYGPATTERN)\"\n    fi\n    # Now convert the arguments - kludge to limit ourselves to /bin/sh\n    i=0\n    for arg in \"$@\" ; do\n        CHECK=`echo \"$arg\"|egrep -c \"$OURCYGPATTERN\" -`\n        CHECK2=`echo \"$arg\"|egrep -c \"^-\"`                                 ### Determine if an option\n\n        if [ $CHECK -ne 0 ] && [ $CHECK2 -eq 0 ] ; then                    ### Added radiusFixed condition\n            eval `echo args$i`=`cygpath --path --ignore --mixed \"$arg\"`\n        else\n            eval `echo args$i`=\"\\\"$arg\\\"\"\n        fi\n        i=$((i+1))\n    done\n    case $i in\n        (0) set -- ;;\n        (1) set -- \"$args0\" ;;\n        (2) set -- \"$args0\" \"$args1\" ;;\n        (3) set -- \"$args0\" \"$args1\" \"$args2\" ;;\n        (4) set -- \"$args0\" \"$args1\" \"$args2\" \"$args3\" ;;\n        (5) set -- \"$args0\" \"$args1\" \"$args2\" \"$args3\" \"$args4\" ;;\n        (6) set -- \"$args0\" \"$args1\" \"$args2\" \"$args3\" \"$args4\" \"$args5\" ;;\n        (7) set -- \"$args0\" \"$args1\" \"$args2\" \"$args3\" \"$args4\" \"$args5\" \"$args6\" ;;\n        (8) set -- \"$args0\" \"$args1\" \"$args2\" \"$args3\" \"$args4\" \"$args5\" \"$args6\" \"$args7\" ;;\n        (9) set -- \"$args0\" \"$args1\" \"$args2\" \"$args3\" \"$args4\" \"$args5\" \"$args6\" \"$args7\" \"$args8\" ;;\n    esac\nfi\n\n# Split up the JVM_OPTS And GRADLE_OPTS values into an array, following the shell quoting and substitution rules\nfunction splitJvmOpts() {\n    JVM_OPTS=(\"$@\")\n}\neval splitJvmOpts $DEFAULT_JVM_OPTS $JAVA_OPTS $GRADLE_OPTS\nJVM_OPTS[${#JVM_OPTS[*]}]=\"-Dorg.gradle.appname=$APP_BASE_NAME\"\n\nexec \"$JAVACMD\" \"${JVM_OPTS[@]}\" -classpath \"$CLASSPATH\" org.gradle.wrapper.GradleWrapperMain \"$@\"\n"
  },
  {
    "path": "gradlew.bat",
    "content": "@if \"%DEBUG%\" == \"\" @echo off\r\n@rem ##########################################################################\r\n@rem\r\n@rem  Gradle startup script for Windows\r\n@rem\r\n@rem ##########################################################################\r\n\r\n@rem Set local scope for the variables with windows NT shell\r\nif \"%OS%\"==\"Windows_NT\" setlocal\r\n\r\n@rem Add default JVM options here. You can also use JAVA_OPTS and GRADLE_OPTS to pass JVM options to this script.\r\nset DEFAULT_JVM_OPTS=\r\n\r\nset DIRNAME=%~dp0\r\nif \"%DIRNAME%\" == \"\" set DIRNAME=.\r\nset APP_BASE_NAME=%~n0\r\nset APP_HOME=%DIRNAME%\r\n\r\n@rem Find java.exe\r\nif defined JAVA_HOME goto findJavaFromJavaHome\r\n\r\nset JAVA_EXE=java.exe\r\n%JAVA_EXE% -version >NUL 2>&1\r\nif \"%ERRORLEVEL%\" == \"0\" goto init\r\n\r\necho.\r\necho ERROR: JAVA_HOME is not set and no 'java' command could be found in your PATH.\r\necho.\r\necho Please set the JAVA_HOME variable in your environment to match the\r\necho location of your Java installation.\r\n\r\ngoto fail\r\n\r\n:findJavaFromJavaHome\r\nset JAVA_HOME=%JAVA_HOME:\"=%\r\nset JAVA_EXE=%JAVA_HOME%/bin/java.exe\r\n\r\nif exist \"%JAVA_EXE%\" goto init\r\n\r\necho.\r\necho ERROR: JAVA_HOME is set to an invalid directory: %JAVA_HOME%\r\necho.\r\necho Please set the JAVA_HOME variable in your environment to match the\r\necho location of your Java installation.\r\n\r\ngoto fail\r\n\r\n:init\r\n@rem Get command-line arguments, handling Windowz variants\r\n\r\nif not \"%OS%\" == \"Windows_NT\" goto win9xME_args\r\nif \"%@eval[2+2]\" == \"4\" goto 4NT_args\r\n\r\n:win9xME_args\r\n@rem Slurp the command line arguments.\r\nset CMD_LINE_ARGS=\r\nset _SKIP=2\r\n\r\n:win9xME_args_slurp\r\nif \"x%~1\" == \"x\" goto execute\r\n\r\nset CMD_LINE_ARGS=%*\r\ngoto execute\r\n\r\n:4NT_args\r\n@rem Get arguments from the 4NT Shell from JP Software\r\nset CMD_LINE_ARGS=%$\r\n\r\n:execute\r\n@rem Setup the command line\r\n\r\nset CLASSPATH=%APP_HOME%\\gradle\\wrapper\\gradle-wrapper.jar\r\n\r\n@rem Execute Gradle\r\n\"%JAVA_EXE%\" %DEFAULT_JVM_OPTS% %JAVA_OPTS% %GRADLE_OPTS% \"-Dorg.gradle.appname=%APP_BASE_NAME%\" -classpath \"%CLASSPATH%\" org.gradle.wrapper.GradleWrapperMain %CMD_LINE_ARGS%\r\n\r\n:end\r\n@rem End local scope for the variables with windows NT shell\r\nif \"%ERRORLEVEL%\"==\"0\" goto mainEnd\r\n\r\n:fail\r\nrem Set variable GRADLE_EXIT_CONSOLE if you need the _script_ return code instead of\r\nrem the _cmd.exe /c_ return code!\r\nif  not \"\" == \"%GRADLE_EXIT_CONSOLE%\" exit 1\r\nexit /radiusMoving 1\r\n\r\n:mainEnd\r\nif \"%OS%\"==\"Windows_NT\" endlocal\r\n\r\n:omega\r\n"
  },
  {
    "path": "lemniscate/.gitignore",
    "content": "/build\n"
  },
  {
    "path": "lemniscate/build.gradle",
    "content": "apply plugin: 'com.android.library'\napply plugin: 'kotlin-android'\napply plugin: 'jacoco'\n\njacoco {\n    toolVersion = Versions.jacoco\n}\n\nandroid {\n    namespace \"com.vlad1m1r.lemniscate\"\n    defaultConfig {\n        minSdkVersion Versions.min_sdk\n        targetSdkVersion Versions.target_sdk\n        compileSdk Versions.compile_sdk\n        versionCode Versions.lemniscate_version_code\n        versionName Versions.lemniscate_version_name\n        testInstrumentationRunner \"androidx.test.runner.AndroidJUnitRunner\"\n    }\n    buildTypes {\n        debug {\n            testCoverageEnabled true\n        }\n        release {\n            minifyEnabled false\n            proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-rules.pro'\n        }\n    }\n    sourceSets {\n        main.java.srcDirs += 'src/main/kotlin'\n    }\n    testOptions {\n        unitTests.all {\n            jacoco {\n                includeNoLocationClasses = true\n            }\n        }\n        unitTests {\n            includeAndroidResources = true\n        }\n    }\n    compileOptions {\n        sourceCompatibility JavaVersion.VERSION_17\n        targetCompatibility JavaVersion.VERSION_17\n    }\n    kotlinOptions {\n        jvmTarget = JavaVersion.VERSION_17.toString()\n    }\n}\n\ntask jacocoDebugReport(type: JacocoReport, dependsOn: ['testDebugUnitTest']) {\n\n    reports {\n        csv {\n            enabled true\n        }\n        xml {\n            enabled true\n        }\n        html {\n            enabled true\n        }\n    }\n\n    def fileFilter = ['**/R.class', '**/R$*.class', '**/BuildConfig.*', '**/Manifest*.*', '**/*Test*.*', 'android/**/*.*']\n    def debugTree = fileTree(dir: \"${buildDir}/intermediates/classes/debug\", excludes: fileFilter)\n    def kotlinDebugTree = fileTree(dir: \"${buildDir}/tmp/kotlin-classes/debug\", excludes: fileFilter)\n    def mainSrc = \"${project.projectDir}/src/androidTest/java\"\n\n    getSourceDirectories().setFrom(files([mainSrc]))\n    getClassDirectories().setFrom(files([debugTree], [kotlinDebugTree]))\n    getExecutionData().setFrom(fileTree(dir: \"$buildDir\", includes: [\n            \"jacoco/testDebugUnitTest.exec\",\n            \"outputs/code-coverage/connected/*coverage.ec\"\n    ]))\n}\n\ndependencies {\n    implementation Deps.appcompat\n    implementation Deps.kotlin_stdlib\n\n    testImplementation Deps.junit\n    testImplementation Deps.mockito_core\n    testImplementation Deps.mockito_kotlin\n    testImplementation Deps.truth\n    testImplementation Deps.robolectric\n}\nrepositories {\n    mavenCentral()\n}\n"
  },
  {
    "path": "lemniscate/proguard-rules.pro",
    "content": "# Add project specific ProGuard rules here.\n# By default, the flags in this file are appended to flags specified\n# in /Users/vladimirjovanovic/Library/Android/sdk/tools/proguard/proguard-android.txt\n# You can edit the include path and order by changing the proguardFiles\n# directive in build.gradle.\n#\n# For more details, see\n#   http://developer.android.com/guide/developing/tools/proguard.html\n\n# Add any project specific keep options here:\n\n# If your project uses WebView with JS, uncomment the following\n# and specify the fully qualified class name to the JavaScript interface\n# class:\n#-keepclassmembers class fqcn.of.javascript.interface.for.webview {\n#   public *;\n#}\n"
  },
  {
    "path": "lemniscate/src/main/AndroidManifest.xml",
    "content": "<manifest package=\"com.vlad1m1r.lemniscate\"/>\n"
  },
  {
    "path": "lemniscate/src/main/java/com/vlad1m1r/lemniscate/BernoullisBowProgressView.kt",
    "content": "/*\n * Copyright 2016 Vladimir Jovanovic\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 */\n\npackage com.vlad1m1r.lemniscate\n\nimport android.content.Context\nimport android.util.AttributeSet\n\nimport com.vlad1m1r.lemniscate.base.BaseCurveProgressView\nimport kotlin.math.cos\nimport kotlin.math.pow\nimport kotlin.math.sin\n\nclass BernoullisBowProgressView : BaseCurveProgressView {\n\n    constructor(context: Context) : super(context)\n\n    constructor(context: Context, attrs: AttributeSet) : super(context, attrs)\n\n    constructor(context: Context, attrs: AttributeSet, defStyleAttr: Int) : super(context, attrs, defStyleAttr)\n\n    override fun getGraphX(t: Float): Float =\n            size * 0.75f * cos(t) / (1 + cos(t).pow(6))\n\n    override fun getGraphY(t: Float): Float =\n         size * 0.75f * sin(t) * cos(t) / (1 + cos(t).pow(6))\n}\n"
  },
  {
    "path": "lemniscate/src/main/java/com/vlad1m1r/lemniscate/BernoullisProgressView.kt",
    "content": "/*\n * Copyright 2016 Vladimir Jovanovic\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 */\n\npackage com.vlad1m1r.lemniscate\n\nimport android.content.Context\nimport android.util.AttributeSet\n\nimport com.vlad1m1r.lemniscate.base.BaseCurveProgressView\nimport kotlin.math.cos\nimport kotlin.math.pow\nimport kotlin.math.sin\n\nclass BernoullisProgressView : BaseCurveProgressView {\n\n    constructor(context: Context) : super(context)\n\n    constructor(context: Context, attrs: AttributeSet) : super(context, attrs)\n\n    constructor(context: Context, attrs: AttributeSet, defStyleAttr: Int) : super(context, attrs, defStyleAttr)\n\n    override fun getGraphX(t: Float): Float =\n            size / 2 * cos(t) / (1 + sin(t).pow(2))\n\n    override fun getGraphY(t: Float): Float =\n        (size / 2) * sin(t) * cos(t) / (1 + sin(t).pow(2))\n}\n"
  },
  {
    "path": "lemniscate/src/main/java/com/vlad1m1r/lemniscate/BernoullisSharpProgressView.kt",
    "content": "/*\n * Copyright 2016 Vladimir Jovanovic\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 */\n\npackage com.vlad1m1r.lemniscate\n\nimport android.content.Context\nimport android.util.AttributeSet\n\nimport com.vlad1m1r.lemniscate.base.BaseCurveProgressView\nimport kotlin.math.cos\nimport kotlin.math.pow\nimport kotlin.math.sin\n\nclass BernoullisSharpProgressView : BaseCurveProgressView {\n\n    constructor(context: Context) : super(context)\n\n    constructor(context: Context, attrs: AttributeSet) : super(context, attrs)\n\n    constructor(context: Context, attrs: AttributeSet, defStyleAttr: Int) : super(context, attrs, defStyleAttr)\n\n    override fun getGraphX(t: Float): Float =\n            size * cos(t) / (1 + cos(t).pow(2))\n\n    override fun getGraphY(t: Float): Float =\n            size * sin(t) * cos(t) / (1 + cos(t).pow(2))\n}\n"
  },
  {
    "path": "lemniscate/src/main/java/com/vlad1m1r/lemniscate/GeronosProgressView.kt",
    "content": "/*\n * Copyright 2016 Vladimir Jovanovic\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 */\n\npackage com.vlad1m1r.lemniscate\n\nimport android.content.Context\nimport android.util.AttributeSet\n\nimport com.vlad1m1r.lemniscate.base.BaseCurveProgressView\nimport kotlin.math.cos\nimport kotlin.math.sin\n\nclass GeronosProgressView : BaseCurveProgressView {\n\n    constructor(context: Context) : super(context)\n\n    constructor(context: Context, attrs: AttributeSet) : super(context, attrs)\n\n    constructor(context: Context, attrs: AttributeSet, defStyleAttr: Int) : super(context, attrs, defStyleAttr)\n\n    override fun getGraphX(t: Float): Float =\n            size / 2 * sin(t)\n\n    override fun getGraphY(t: Float): Float =\n            (size / 2)* sin(t) * cos(t)\n}\n"
  },
  {
    "path": "lemniscate/src/main/java/com/vlad1m1r/lemniscate/base/BaseCurveContract.kt",
    "content": "package com.vlad1m1r.lemniscate.base\n\nimport com.vlad1m1r.lemniscate.base.models.DrawState\nimport com.vlad1m1r.lemniscate.base.models.Points\nimport com.vlad1m1r.lemniscate.base.models.ViewSize\nimport com.vlad1m1r.lemniscate.base.settings.AnimationSettings\nimport com.vlad1m1r.lemniscate.base.settings.CurveSettings\nimport kotlin.math.PI\n\ninterface IBaseCurvePresenter {\n\n    val view:IBaseCurveView\n    var curveSettings: CurveSettings\n    val viewSize: ViewSize\n    var animationSettings: AnimationSettings\n    val drawState: DrawState\n    val points: Points\n\n    fun recreatePoints()\n    fun updateStartingPointOnCurve(point: Int)\n}\n\ninterface IBaseCurveView {\n    /**\n     * This method should return values of x for t∈[0, upper limit of getT() function].\n     * We should use parametric representation of curve for x.\n     * Curve should be closed and periodic on interval that returns getT().\n     * Resulting value should satisfy x∈[-viewSize.getWidth()/2, viewSize.getWidth()/2].\n     */\n    fun getGraphX(t: Float): Float\n\n    /**\n     * This method should return values of y for t∈[0, upper limit of getT() function].\n     * We should use parametric representation of curve for y.\n     * Curve should be closed and periodic on interval that returns getT().\n     * Resulting value should satisfy y∈[-viewSize.getHeight()/2, viewSize.getHeight()/2].\n     */\n    fun getGraphY(t: Float): Float\n\n    /**\n     * @param i ∈ [0, mPrecision)\n     * @return function is putting i∈[0, curveSettings.getPrecision()) points between [0, 2π]\n     */\n    fun getT(i: Int, precision: Int): Float {\n        return i * 2f * PI.toFloat() / precision\n    }\n\n    fun invalidateProgressView()\n\n    fun requestProgressViewLayout()\n}\n\n"
  },
  {
    "path": "lemniscate/src/main/java/com/vlad1m1r/lemniscate/base/BaseCurvePresenter.kt",
    "content": "package com.vlad1m1r.lemniscate.base\n\nimport com.vlad1m1r.lemniscate.base.models.DrawState\nimport com.vlad1m1r.lemniscate.base.models.Point\nimport com.vlad1m1r.lemniscate.base.models.Points\nimport com.vlad1m1r.lemniscate.base.models.ViewSize\nimport com.vlad1m1r.lemniscate.base.settings.AnimationSettings\nimport com.vlad1m1r.lemniscate.base.settings.CurveSettings\nimport kotlin.math.round\n\nclass BaseCurvePresenter(override val view: IBaseCurveView,\n                         override var curveSettings: CurveSettings,\n                         override val viewSize: ViewSize,\n                         override var animationSettings: AnimationSettings,\n                         override val drawState: DrawState,\n                         override val points: Points) : IBaseCurvePresenter {\n\n    override fun updateStartingPointOnCurve(point: Int) {\n        animationSettings.startingPointOnCurve = point\n        drawState.recalculateLineLength(curveSettings.lineLength)\n        view.invalidateProgressView()\n    }\n\n    internal val lineLengthToDraw: Int\n        get() = round(curveSettings.precision * drawState.currentLineLength).toInt()\n\n    override fun recreatePoints() {\n        points.clear()\n        createNewPoints()\n        addPointsToPath()\n    }\n\n    internal fun createNewPoints() {\n        var lineLengthToDraw = lineLengthToDraw\n\n        while (lineLengthToDraw > 0) {\n            lineLengthToDraw = addPointsToCurve(\n                    getStartingPoint(),\n                    lineLengthToDraw\n            )\n        }\n    }\n\n    internal fun getStartingPoint() = if (points.isEmpty) animationSettings.startingPointOnCurve else 0\n\n    internal fun addPointsToPath() {\n        drawState.addPointsToPath(points.getPoints(), curveSettings, viewSize)\n    }\n\n    internal fun addPointsToCurve(start: Int, remainingPoints: Int): Int {\n        var remainingPointsTemp = remainingPoints\n        for (i in start until curveSettings.precision) {\n\n            points.addPoint(getPoint(i))\n\n            if (--remainingPointsTemp == 0) {\n                return remainingPointsTemp\n            }\n        }\n        return remainingPointsTemp\n    }\n\n    internal fun getPoint(i: Int): Point {\n        return Point(\n                view.getGraphX(getT(i)),\n                view.getGraphY(getT(i)),\n                curveSettings.strokeWidth,\n                viewSize.size\n        )\n    }\n\n    internal fun getT(i: Int) = view.getT(i, curveSettings.precision)\n}\n"
  },
  {
    "path": "lemniscate/src/main/java/com/vlad1m1r/lemniscate/base/BaseCurveProgressView.kt",
    "content": "/*\n * Copyright 2016 Vladimir Jovanovic\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 */\n\npackage com.vlad1m1r.lemniscate.base\n\nimport android.animation.ValueAnimator\nimport android.content.Context\nimport android.graphics.Canvas\nimport android.graphics.Path\nimport android.os.Parcel\nimport android.os.Parcelable\nimport android.util.AttributeSet\nimport android.view.View\nimport android.view.animation.LinearInterpolator\nimport androidx.customview.view.AbsSavedState\nimport com.vlad1m1r.lemniscate.R\nimport com.vlad1m1r.lemniscate.base.models.DrawState\nimport com.vlad1m1r.lemniscate.base.models.Points\nimport com.vlad1m1r.lemniscate.base.models.ViewSize\nimport com.vlad1m1r.lemniscate.base.settings.AnimationSettings\nimport com.vlad1m1r.lemniscate.base.settings.CurveSettings\nimport kotlin.math.min\nimport kotlin.math.round\n\nabstract class BaseCurveProgressView : View, IBaseCurveView {\n\n    protected var presenter: IBaseCurvePresenter = BaseCurvePresenter(\n            this,\n            CurveSettings(),\n            ViewSize(), AnimationSettings(),\n            DrawState(Path()),\n            Points())\n\n    private var valueAnimator: ValueAnimator? = null\n\n    constructor(context: Context) : super(context)\n\n    constructor(context: Context, attrs: AttributeSet) : super(context, attrs) {\n\n        val curveAttributes = context.obtainStyledAttributes(\n                attrs,\n                R.styleable.BaseCurveProgressView,\n                0, 0)\n\n        val colorAccentAttributes = context.obtainStyledAttributes(attrs, intArrayOf(android.R.attr.colorAccent))\n\n        try {\n            val colorAccent = colorAccentAttributes.getColor(0, 0)\n\n            presenter.curveSettings.lineLength.lineMaxLength = curveAttributes.getFloat(R.styleable.BaseCurveProgressView_maxLineLength, 0.8f)\n            presenter.curveSettings.lineLength.lineMinLength = curveAttributes.getFloat(R.styleable.BaseCurveProgressView_minLineLength, 0.4f)\n\n            presenter.curveSettings.color = curveAttributes.getColor(R.styleable.BaseCurveProgressView_lineColor, colorAccent)\n            presenter.curveSettings.hasHole = curveAttributes.getBoolean(R.styleable.BaseCurveProgressView_hasHole, false)\n            presenter.curveSettings.strokeWidth = curveAttributes.getDimension(R.styleable.BaseCurveProgressView_strokeWidth, resources.getDimension(R.dimen.lemniscate_stroke_width))\n            presenter.curveSettings.precision = curveAttributes.getInteger(R.styleable.BaseCurveProgressView_precision, 200)\n\n            presenter.animationSettings.duration = curveAttributes.getInteger(R.styleable.BaseCurveProgressView_duration, 1000)\n        } finally {\n            curveAttributes.recycle()\n            colorAccentAttributes.recycle()\n        }\n    }\n\n    constructor(context: Context, attrs: AttributeSet, defStyleAttr: Int) : super(context, attrs, defStyleAttr)\n\n    override fun onDraw(canvas: Canvas) {\n        super.onDraw(canvas)\n        presenter.recreatePoints()\n        canvas.drawPath(presenter.drawState.path, presenter.curveSettings.paint)\n    }\n\n    override fun onMeasure(widthMeasureSpec: Int, heightMeasureSpec: Int) {\n        super.onMeasure(widthMeasureSpec, heightMeasureSpec)\n\n        val defaultSize = resources.getDimension(R.dimen.lemniscate_preferred_height) * presenter.viewSize.sizeMultiplier\n\n        val xPadding = paddingLeft + paddingRight\n        val yPadding = paddingTop + paddingBottom\n\n        val viewSize = getMaxViewSquareSize(\n                measuredHeight,\n                measuredWidth,\n                xPadding,\n                yPadding\n        )\n\n        presenter.viewSize.size = getViewDimension(\n                MeasureSpec.getMode(widthMeasureSpec),\n                viewSize.toFloat(),\n                defaultSize\n        )\n\n        setMeasuredDimension(round(presenter.viewSize.size + xPadding).toInt(), round(presenter.viewSize.size + yPadding).toInt())\n    }\n\n    internal fun getMaxViewSquareSize(height: Int, width: Int, xPadding: Int, yPadding: Int): Int {\n        return min(height - yPadding, width - xPadding)\n    }\n\n    internal fun getViewDimension(mode: Int, viewSize: Float, defaultSize: Float): Float {\n        return when {\n            viewSize == 0.0f -> defaultSize\n            mode == MeasureSpec.EXACTLY -> viewSize\n            mode == MeasureSpec.AT_MOST -> min(defaultSize, viewSize)\n            else -> defaultSize\n        }\n    }\n\n    override fun onAttachedToWindow() {\n        super.onAttachedToWindow()\n        animateLemniscate()\n    }\n\n    private fun animateLemniscate() {\n        valueAnimator?.end()\n        valueAnimator = ValueAnimator.ofInt(presenter.curveSettings.precision - 1, 0).apply {\n            duration = presenter.animationSettings.duration.toLong()\n            repeatCount = -1\n            repeatMode = ValueAnimator.RESTART\n            interpolator = LinearInterpolator()\n            addUpdateListener { animation ->\n                presenter.updateStartingPointOnCurve(animation.animatedValue as Int)\n            }\n            start()\n        }\n    }\n\n    override fun onDetachedFromWindow() {\n        super.onDetachedFromWindow()\n        valueAnimator?.end()\n    }\n\n    var strokeWidth\n        get() = presenter.curveSettings.strokeWidth\n        set(strokeWidth) {\n            presenter.curveSettings.strokeWidth = strokeWidth\n        }\n\n    var lineMaxLength\n        get() = presenter.curveSettings.lineLength.lineMaxLength\n        set(lineMaxLength) {\n            presenter.curveSettings.lineLength.lineMaxLength = lineMaxLength\n        }\n\n    var lineMinLength\n        get() = presenter.curveSettings.lineLength.lineMinLength\n        set(lineMinLength) {\n            presenter.curveSettings.lineLength.lineMinLength = lineMinLength\n        }\n\n    var color\n        get() = presenter.curveSettings.color\n        set(color) {\n            presenter.curveSettings.color = color\n        }\n\n    var duration\n        get() = presenter.animationSettings.duration\n        set(duration) {\n            presenter.animationSettings.duration = duration\n            if (valueAnimator != null) valueAnimator!!.duration = duration.toLong()\n        }\n\n    var precision\n        get() = presenter.curveSettings.precision\n        set(precision) {\n            presenter.curveSettings.precision = precision\n            animateLemniscate()\n            invalidate()\n        }\n\n    var sizeMultiplier\n        get() = presenter.viewSize.sizeMultiplier\n        set(sizeMultiplier) {\n            presenter.viewSize.sizeMultiplier = sizeMultiplier\n            requestLayout()\n            invalidate()\n        }\n\n    var size = presenter.viewSize.size\n        get() = presenter.viewSize.size\n        private set\n\n    open var hasHole\n        get() = presenter.curveSettings.hasHole\n        set(hasHole) {\n            presenter.curveSettings.hasHole = hasHole\n        }\n\n    public override fun onSaveInstanceState(): Parcelable {\n        val ss = BaseCurveSavedState(super.onSaveInstanceState()!!)\n        ss.curveSettings = this.presenter.curveSettings\n        ss.animationSettings = this.presenter.animationSettings\n        return ss\n    }\n\n    public override fun onRestoreInstanceState(state: Parcelable) {\n        if (state is BaseCurveSavedState) {\n            super.onRestoreInstanceState(state.superState)\n            state.curveSettings?.let {\n                this.presenter.curveSettings = it\n            }\n            state.animationSettings?.let {\n                this.presenter.animationSettings = it\n            }\n        } else {\n            super.onRestoreInstanceState(state)\n        }\n    }\n\n    protected open class BaseCurveSavedState : AbsSavedState {\n        internal var curveSettings: CurveSettings? = null\n        internal var animationSettings: AnimationSettings? = null\n\n        constructor(superState: Parcelable) : super(superState)\n\n        constructor(state: Parcel) : super(state, BaseCurveSavedState::class.java.classLoader) {\n            this.curveSettings = state.readParcelable(CurveSettings::class.java.classLoader)\n            this.animationSettings = state.readParcelable(AnimationSettings::class.java.classLoader)\n        }\n\n        override fun writeToParcel(out: Parcel, flags: Int) {\n            super.writeToParcel(out, flags)\n            out.writeParcelable(curveSettings, flags)\n            out.writeParcelable(animationSettings, flags)\n        }\n\n        companion object {\n            @JvmField\n            val CREATOR = object : Parcelable.Creator<BaseCurveSavedState> {\n                override fun createFromParcel(source: Parcel): BaseCurveSavedState {\n                    return BaseCurveSavedState(source)\n                }\n\n                override fun newArray(size: Int): Array<BaseCurveSavedState?> {\n                    return arrayOfNulls(size)\n                }\n            }\n        }\n    }\n\n    override fun invalidateProgressView() {\n        invalidate()\n    }\n\n    override fun requestProgressViewLayout() {\n        requestLayout()\n    }\n}\n"
  },
  {
    "path": "lemniscate/src/main/java/com/vlad1m1r/lemniscate/base/models/DrawState.kt",
    "content": "/*\n * Copyright 2016 Vladimir Jovanovic\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 */\npackage com.vlad1m1r.lemniscate.base.models\n\nimport android.graphics.Path\nimport com.vlad1m1r.lemniscate.base.settings.CurveSettings\n\nimport com.vlad1m1r.lemniscate.utils.CurveUtils\n\nprivate const val STEP_SIZE = 0.001f\nclass DrawState(val path:Path) {\n\n    internal var isExpanding = true\n    var currentLineLength = 0.0f\n        internal set\n\n    internal fun addPairOfPointsToPath(start: Point?, end: Point?) {\n        if (start != null && end != null) {\n            path.moveTo(start.x, start.y)\n            path.quadTo(start.x, start.y, end.x, end.y)\n        } else if (start != null) {\n            path.moveTo(start.x, start.y)\n            path.lineTo(start.x, start.y)\n        } else if (end != null) {\n            path.moveTo(end.x, end.y)\n        } \n    }\n\n    internal fun isInRightDirectionToBeInHole(start: Point?, end: Point?)\n            = start != null && end != null && start.x > end.x\n\n    fun addPointsToPath(listOfPoints: List<Point>, curveSettings: CurveSettings, viewSize: ViewSize) {\n        resetPath()\n\n        val holeSize = curveSettings.strokeWidth\n\n        //adds points to path and creates hole if curveSettings.hasHole()\n        for (i in listOfPoints.indices) {\n            var start: Point? = listOfPoints[i]\n            var end: Point? = null\n\n            if (listOfPoints.size > i + 1)\n                end = listOfPoints[i + 1]\n\n            if (curveSettings.hasHole) {\n                if (isInRightDirectionToBeInHole(start, end)) {\n                    start = CurveUtils.checkPointForHole(start, holeSize, viewSize.size)\n                    end = CurveUtils.checkPointForHole(end, holeSize, viewSize.size)\n                }\n            }\n\n            addPairOfPointsToPath(start, end)\n        }\n    }\n\n    internal fun resetPath() {\n        path.reset()\n    }\n\n    internal fun keepLineLengthInsideLimits(lineLength: LineLength){\n        if (currentLineLength < lineLength.lineMinLength) {\n            currentLineLength = lineLength.lineMinLength\n        }\n        if (currentLineLength > lineLength.lineMaxLength) {\n            currentLineLength = lineLength.lineMaxLength\n        }\n    }\n\n    internal fun calculateNewCurrentLineLength(lineLength: LineLength) {\n        if (currentLineLength < lineLength.lineMaxLength && isExpanding) {\n            currentLineLength += STEP_SIZE\n        } else if (currentLineLength > lineLength.lineMinLength && !isExpanding) {\n            currentLineLength -= STEP_SIZE\n        } else if (currentLineLength == lineLength.lineMaxLength) {\n            isExpanding = false\n        } else if (currentLineLength == lineLength.lineMinLength) {\n            isExpanding = true\n        } else {\n            throw IllegalArgumentException(\"currentLineLength is not inside limits\")\n        }\n    }\n\n    fun recalculateLineLength(lineLength: LineLength) {\n        if (lineLength.lineMinLength < lineLength.lineMaxLength) {\n            keepLineLengthInsideLimits(lineLength)\n            calculateNewCurrentLineLength(lineLength)\n        } else {\n            currentLineLength = lineLength.lineMaxLength\n        }\n    }\n}\n"
  },
  {
    "path": "lemniscate/src/main/java/com/vlad1m1r/lemniscate/base/models/LineLength.kt",
    "content": "/*\n * Copyright 2016 Vladimir Jovanovic\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 */\npackage com.vlad1m1r.lemniscate.base.models\n\nimport android.os.Parcel\nimport android.os.Parcelable\n\nclass LineLength() : Parcelable {\n\n    var lineMinLength = 0.4f\n        set(value) {\n            if (value > 0 && value <= 1) {\n                field = value\n            } else {\n                throw IllegalArgumentException()\n            }\n        }\n\n    var lineMaxLength = 0.8f\n        set(value) {\n            if (value > 0 && value <= 1) {\n                field = value\n            } else {\n                throw IllegalArgumentException()\n            }\n        }\n\n    internal constructor(state: Parcel) : this() {\n        this.lineMinLength = state.readFloat()\n        this.lineMaxLength = state.readFloat()\n    }\n\n    override fun describeContents(): Int {\n        return 0\n    }\n\n    override fun writeToParcel(dest: Parcel, flags: Int) {\n        dest.writeFloat(this.lineMinLength)\n        dest.writeFloat(this.lineMaxLength)\n    }\n\n    companion object CREATOR : Parcelable.Creator<LineLength> {\n        override fun createFromParcel(parcel: Parcel): LineLength {\n            return LineLength(parcel)\n        }\n\n        override fun newArray(size: Int): Array<LineLength?> {\n            return arrayOfNulls(size)\n        }\n    }\n}\n"
  },
  {
    "path": "lemniscate/src/main/java/com/vlad1m1r/lemniscate/base/models/Point.kt",
    "content": "/*\n * Copyright 2016 Vladimir Jovanovic\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 */\npackage com.vlad1m1r.lemniscate.base.models\n\nclass Point(x: Float, y: Float, strokeWidth: Float, viewSize: Float) {\n    val x: Float = translateToPositiveCoordinates(x, strokeWidth, viewSize)\n    val y: Float = translateToPositiveCoordinates(y, strokeWidth, viewSize)\n\n    private fun compensateForStrokeWidth(coordinate: Float, strokeWidth: Float, viewSize: Float): Float {\n        val ratio = viewSize / (viewSize + 2 * strokeWidth)\n        return coordinate * ratio + strokeWidth * ratio\n    }\n\n    private fun translateToPositiveCoordinates(coordinate: Float, strokeWidth: Float, viewSize: Float): Float {\n        return compensateForStrokeWidth(coordinate + viewSize / 2, strokeWidth, viewSize)\n    }\n}\n"
  },
  {
    "path": "lemniscate/src/main/java/com/vlad1m1r/lemniscate/base/models/Points.kt",
    "content": "/*\n * Copyright 2016 Vladimir Jovanovic\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 */\npackage com.vlad1m1r.lemniscate.base.models\n\nimport java.util.*\n\nclass Points {\n    private val points = ArrayList<Point>()\n\n    val isEmpty: Boolean\n        get() = points.isEmpty()\n\n    fun getPoints(): List<Point> {\n        return points.toList()\n    }\n\n    fun addPoint(point: Point) {\n        points.add(point)\n    }\n\n    fun clear() {\n        points.clear()\n    }\n}\n"
  },
  {
    "path": "lemniscate/src/main/java/com/vlad1m1r/lemniscate/base/models/ViewSize.kt",
    "content": "/*\n * Copyright 2016 Vladimir Jovanovic\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 */\npackage com.vlad1m1r.lemniscate.base.models\n\nclass ViewSize {\n    var size: Float = 0.0f\n    var sizeMultiplier: Float = 1.0f\n}\n"
  },
  {
    "path": "lemniscate/src/main/java/com/vlad1m1r/lemniscate/base/settings/AnimationSettings.kt",
    "content": "/*\n * Copyright 2016 Vladimir Jovanovic\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 */\npackage com.vlad1m1r.lemniscate.base.settings\n\nimport android.os.Parcel\nimport android.os.Parcelable\n\nclass AnimationSettings(var startingPointOnCurve:Int = 0, var duration: Int = 1000) : Parcelable {\n\n    constructor(state: Parcel) : this(\n            state.readInt(),\n            state.readInt())\n\n    override fun writeToParcel(parcel: Parcel, flags: Int) {\n        parcel.writeInt(startingPointOnCurve)\n        parcel.writeInt(duration)\n    }\n\n    override fun describeContents(): Int {\n        return 0\n    }\n\n    companion object CREATOR : Parcelable.Creator<AnimationSettings> {\n        override fun createFromParcel(parcel: Parcel): AnimationSettings {\n            return AnimationSettings(parcel)\n        }\n\n        override fun newArray(size: Int): Array<AnimationSettings?> {\n            return arrayOfNulls(size)\n        }\n    }\n}\n"
  },
  {
    "path": "lemniscate/src/main/java/com/vlad1m1r/lemniscate/base/settings/CurveSettings.kt",
    "content": "/*\n * Copyright 2016 Vladimir Jovanovic\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 */\npackage com.vlad1m1r.lemniscate.base.settings\n\nimport android.graphics.Paint\nimport android.os.Parcel\nimport android.os.Parcelable\nimport com.vlad1m1r.lemniscate.base.models.LineLength\n\nopen class CurveSettings (val paint: Paint = Paint(Paint.ANTI_ALIAS_FLAG), var lineLength: LineLength = LineLength()) : Parcelable {\n\n    init {\n        paint.style = Paint.Style.STROKE\n        paint.strokeCap = Paint.Cap.ROUND\n    }\n\n    var precision = 200\n    var strokeWidth: Float = 0f\n        @Throws(IllegalArgumentException::class)\n        set(value) {\n            if (value >= 0) {\n                field = value\n                this.paint.strokeWidth = value\n            } else {\n                throw IllegalArgumentException(\"\\'strokeWidth\\' must be positive!\")\n            }\n        }\n\n    var color: Int = 0\n        set(value) {\n            field = value\n            paint.color = value\n        }\n    var hasHole = false\n\n    internal constructor(state: Parcel) : this() {\n        this.precision = state.readInt()\n        this.strokeWidth = state.readFloat()\n        this.color = state.readInt()\n        this.lineLength = state.readParcelable(LineLength::class.java.classLoader)!!\n        this.hasHole = state.readByte().toInt() != 0\n    }\n\n    override fun describeContents(): Int {\n        return 0\n    }\n\n    override fun writeToParcel(dest: Parcel, flags: Int) {\n        dest.writeInt(this.precision)\n        dest.writeFloat(this.strokeWidth)\n        dest.writeInt(this.color)\n        dest.writeParcelable(this.lineLength, flags)\n        dest.writeByte(if (this.hasHole) 1.toByte() else 0.toByte())\n    }\n\n    companion object CREATOR : Parcelable.Creator<CurveSettings> {\n        override fun createFromParcel(source: Parcel): CurveSettings {\n            return CurveSettings(source)\n        }\n\n        override fun newArray(size: Int): Array<CurveSettings?> {\n            return arrayOfNulls(size)\n        }\n    }\n}\n"
  },
  {
    "path": "lemniscate/src/main/java/com/vlad1m1r/lemniscate/funny/CannabisProgressView.kt",
    "content": "/*\n * Copyright 2016 Vladimir Jovanovic\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 */\n\npackage com.vlad1m1r.lemniscate.funny\n\nimport android.content.Context\nimport android.util.AttributeSet\n\nimport com.vlad1m1r.lemniscate.base.BaseCurveProgressView\nimport kotlin.math.cos\nimport kotlin.math.sin\n\nclass CannabisProgressView : BaseCurveProgressView {\n\n    constructor(context: Context) : super(context)\n\n    constructor(context: Context, attrs: AttributeSet) : super(context, attrs)\n\n    constructor(context: Context, attrs: AttributeSet, defStyleAttr: Int) : super(context, attrs, defStyleAttr)\n\n    override fun getGraphX(t: Float): Float =\n            ((size / 6)\n                    * (sin(t) + 1)\n                    * cos(t)\n                    * (9 / 10f * cos(8 * t) + 1)\n                    * (1 / 10f * cos(24 * t) + 1)\n                    * (1 / 10f * cos(200 * t) + 9 / 10f))\n\n    override fun getGraphY(t: Float): Float =\n            ((-size / 6)\n                    * sin(t)\n                    * (sin(t) + 1)\n                    * (9 / 10f * cos(8 * t) + 1)\n                    * (1 / 10f * cos(24 * t) + 1)\n                    * (1 / 10f * cos(200 * t) + 9 / 10f)) + size / 4\n\n    // Disable hasHole setter. Should stay false\n    override var hasHole: Boolean = false\n        set(hasHole) {\n            super.hasHole = hasHole && false\n            field = hasHole && false\n        }\n}\n"
  },
  {
    "path": "lemniscate/src/main/java/com/vlad1m1r/lemniscate/funny/HeartProgressView.kt",
    "content": "/*\n * Copyright 2016 Vladimir Jovanovic\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 */\n\npackage com.vlad1m1r.lemniscate.funny\n\nimport android.content.Context\nimport android.util.AttributeSet\n\nimport com.vlad1m1r.lemniscate.base.BaseCurveProgressView\nimport kotlin.math.cos\nimport kotlin.math.pow\nimport kotlin.math.sin\n\nclass HeartProgressView : BaseCurveProgressView {\n\n    constructor(context: Context) : super(context)\n\n    constructor(context: Context, attrs: AttributeSet) : super(context, attrs)\n\n    constructor(context: Context, attrs: AttributeSet, defStyleAttr: Int) : super(context, attrs, defStyleAttr)\n\n    override fun getGraphX(t: Float): Float =\n            (size / 34) * 16 * sin(t).pow(3)\n\n    override fun getGraphY(t: Float): Float =\n            -size / 34 * (13 * cos(t)\n                    - 5 * cos(2 * t)\n                    - 2 * cos(3 * t)\n                    - cos(4 * t))\n\n    // Disable hasHole setter. Should stay false\n    override var hasHole: Boolean = false\n        set(hasHole) {\n            super.hasHole = hasHole && false\n            field = hasHole && false\n        }\n}\n"
  },
  {
    "path": "lemniscate/src/main/java/com/vlad1m1r/lemniscate/other/XProgressView.kt",
    "content": "/*\n * Copyright 2016 Vladimir Jovanovic\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 */\n\npackage com.vlad1m1r.lemniscate.other\n\nimport android.content.Context\nimport android.util.AttributeSet\n\nimport com.vlad1m1r.lemniscate.base.BaseCurveProgressView\nimport kotlin.math.abs\nimport kotlin.math.cos\nimport kotlin.math.sin\n\nclass XProgressView : BaseCurveProgressView {\n\n    constructor(context: Context) : super(context)\n\n    constructor(context: Context, attrs: AttributeSet) : super(context, attrs)\n\n    constructor(context: Context, attrs: AttributeSet, defStyleAttr: Int) : super(context, attrs, defStyleAttr)\n\n    override fun getGraphX(t: Float): Float =\n            size * abs(sin(t)) * cos(t)\n\n    override fun getGraphY(t: Float): Float =\n            size * sin(t) * cos(t)\n\n    // Disable hasHole setter. Should stay false\n    override var hasHole: Boolean = false\n        set(hasHole) {\n            super.hasHole = hasHole && false\n            field = hasHole && false\n        }\n}\n"
  },
  {
    "path": "lemniscate/src/main/java/com/vlad1m1r/lemniscate/roulette/BaseRouletteProgressView.kt",
    "content": "/*\n * Copyright 2016 Vladimir Jovanovic\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 */\n\npackage com.vlad1m1r.lemniscate.roulette\n\nimport android.content.Context\nimport android.os.Parcel\nimport android.os.Parcelable\nimport android.util.AttributeSet\nimport com.vlad1m1r.lemniscate.R\nimport com.vlad1m1r.lemniscate.base.BaseCurveProgressView\nimport com.vlad1m1r.lemniscate.roulette.settings.RouletteCurveSettings\nimport kotlin.math.PI\n\nabstract class BaseRouletteProgressView : BaseCurveProgressView {\n\n    protected var rouletteCurveSettings: RouletteCurveSettings = RouletteCurveSettings()\n\n    var radiusFixed: Float\n        get() = rouletteCurveSettings.radiusFixed\n        set(radiusFixed) {\n            rouletteCurveSettings.radiusFixed = radiusFixed\n            recalculateConstants()\n        }\n\n    var radiusMoving: Float\n        get() = rouletteCurveSettings.radiusMoving\n        set(radiusMoving) {\n            rouletteCurveSettings.radiusMoving = radiusMoving\n            recalculateConstants()\n        }\n\n    var distanceFromCenter: Float\n        get() = rouletteCurveSettings.distanceFromCenter\n        set(distanceFromCenter) {\n            rouletteCurveSettings.distanceFromCenter = distanceFromCenter\n            recalculateConstants()\n        }\n\n    var numberOfCycles: Float\n        get() = rouletteCurveSettings.numberOfCycles\n        set(numberOfCycles) {\n            rouletteCurveSettings.numberOfCycles = numberOfCycles\n        }\n\n    constructor(context: Context) : super(context)\n\n    constructor(context: Context, attrs: AttributeSet) : super(context, attrs) {\n        val rouletteCurveAttributes = context.obtainStyledAttributes(\n                attrs,\n                R.styleable.RouletteCurveProgressView,\n                0, 0)\n\n        try {\n            radiusFixed = rouletteCurveAttributes.getFloat(R.styleable.RouletteCurveProgressView_radiusFixed, rouletteCurveSettings.radiusFixed)\n            radiusMoving = rouletteCurveAttributes.getFloat(R.styleable.RouletteCurveProgressView_radiusMoving, rouletteCurveSettings.radiusMoving)\n            distanceFromCenter = rouletteCurveAttributes.getFloat(R.styleable.RouletteCurveProgressView_distanceFromCenter, rouletteCurveSettings.distanceFromCenter)\n            numberOfCycles = rouletteCurveAttributes.getFloat(R.styleable.RouletteCurveProgressView_numberOfCycles, rouletteCurveSettings.numberOfCycles)\n        } finally {\n            rouletteCurveAttributes.recycle()\n        }\n    }\n\n    constructor(context: Context, attrs: AttributeSet, defStyleAttr: Int) : super(context, attrs, defStyleAttr)\n\n    internal open fun recalculateConstants() {}\n\n    // Disable hasHole setter. Should stay false\n    override var hasHole: Boolean = false\n        set(hasHole) {\n            super.hasHole = hasHole && false\n            field = hasHole && false\n        }\n\n\n    override fun getT(i: Int, precision: Int): Float {\n        return i * rouletteCurveSettings.numberOfCycles * 2 * PI.toFloat() / precision\n    }\n\n    override fun onSaveInstanceState(): Parcelable {\n        val ss = RouletteCurveSavedState(super.onSaveInstanceState())\n        ss.rouletteCurveSettings = rouletteCurveSettings\n        return ss\n    }\n\n    override fun onRestoreInstanceState(state: Parcelable) {\n        if (state is RouletteCurveSavedState) {\n            super.onRestoreInstanceState(state.superState!!)\n            state.rouletteCurveSettings?.let {\n                this.rouletteCurveSettings = it\n            }\n        } else {\n            super.onRestoreInstanceState(state)\n        }\n    }\n\n    protected open class RouletteCurveSavedState : BaseCurveSavedState {\n\n        internal var rouletteCurveSettings: RouletteCurveSettings? = null\n\n        constructor(superState: Parcelable) : super(superState)\n\n        constructor(source: Parcel) : super(source) {\n            this.rouletteCurveSettings = source.readParcelable(RouletteCurveSettings::class.java.classLoader)\n        }\n\n        override fun writeToParcel(out: Parcel, flags: Int) {\n            super.writeToParcel(out, flags)\n            out.writeParcelable(rouletteCurveSettings, flags)\n        }\n\n        companion object {\n            @JvmField\n            val CREATOR = object : Parcelable.Creator<RouletteCurveSavedState> {\n                override fun createFromParcel(source: Parcel): RouletteCurveSavedState {\n                    return RouletteCurveSavedState(source)\n                }\n\n                override fun newArray(size: Int): Array<RouletteCurveSavedState?> {\n                    return arrayOfNulls(size)\n                }\n            }\n        }\n    }\n}\n"
  },
  {
    "path": "lemniscate/src/main/java/com/vlad1m1r/lemniscate/roulette/EpitrochoidProgressView.kt",
    "content": "/*\n * Copyright 2016 Vladimir Jovanovic\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 */\n\npackage com.vlad1m1r.lemniscate.roulette\n\nimport android.content.Context\nimport android.util.AttributeSet\nimport kotlin.math.cos\nimport kotlin.math.sin\n\nclass EpitrochoidProgressView : BaseRouletteProgressView {\n\n    internal var radiusSum = 0f\n        get() = radiusFixed + radiusMoving\n        private set\n\n    internal var sizeFactor = 0f\n        get() = 2 * (radiusSum + distanceFromCenter)\n        private set\n\n    constructor(context: Context) : super(context)\n\n    constructor(context: Context, attrs: AttributeSet) : super(context, attrs)\n\n    constructor(context: Context, attrs: AttributeSet, defStyleAttr: Int) : super(context, attrs, defStyleAttr)\n\n    override fun getGraphX(t: Float): Float =\n            size / sizeFactor * (radiusSum * cos(t) - distanceFromCenter * cos(radiusSum / radiusMoving * t))\n\n    override fun getGraphY(t: Float): Float =\n            size / sizeFactor * (radiusSum * sin(t) - distanceFromCenter * sin(radiusSum / radiusMoving * t))\n\n    override fun recalculateConstants() {\n        radiusSum = radiusFixed + radiusMoving\n        sizeFactor = 2 * (radiusSum + distanceFromCenter)\n    }\n}\n"
  },
  {
    "path": "lemniscate/src/main/java/com/vlad1m1r/lemniscate/roulette/HypotrochoidProgressView.kt",
    "content": "/*\n * Copyright 2016 Vladimir Jovanovic\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 */\n\npackage com.vlad1m1r.lemniscate.roulette\n\nimport android.content.Context\nimport android.util.AttributeSet\nimport kotlin.math.cos\nimport kotlin.math.sin\n\nclass HypotrochoidProgressView : BaseRouletteProgressView {\n\n    internal var radiusDiff = 0f\n        get() = radiusFixed - radiusMoving\n        private set\n\n    internal var sizeFactor = 0f\n        get() = 2 * (radiusDiff + distanceFromCenter)\n        private set\n\n    // radiusFixed = 5, radiusMoving=3, distanceFromCenter=5, numberOfCycles = 3 to get pentagram\n\n    constructor(context: Context) : super(context)\n\n    constructor(context: Context, attrs: AttributeSet) : super(context, attrs)\n\n    constructor(context: Context, attrs: AttributeSet, defStyleAttr: Int) : super(context, attrs, defStyleAttr)\n\n    override fun getGraphX(t: Float): Float =\n            size / sizeFactor * (radiusDiff * cos(t) - distanceFromCenter * cos(radiusDiff / radiusMoving * t))\n\n    override fun getGraphY(t: Float): Float =\n            size / sizeFactor * (radiusDiff * sin(t) + distanceFromCenter * sin(radiusDiff / radiusMoving * t))\n\n}\n"
  },
  {
    "path": "lemniscate/src/main/java/com/vlad1m1r/lemniscate/roulette/scribble/RoundScribbleProgressView.kt",
    "content": "/*\n * Copyright 2016 Vladimir Jovanovic\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 */\n\npackage com.vlad1m1r.lemniscate.roulette.scribble\n\nimport android.content.Context\nimport android.util.AttributeSet\n\nimport com.vlad1m1r.lemniscate.roulette.BaseRouletteProgressView\nimport kotlin.math.cos\nimport kotlin.math.sin\n\nclass RoundScribbleProgressView : BaseRouletteProgressView {\n\n    internal var radiusSum = 0.0f\n        get() = radiusFixed + radiusMoving\n        private set\n\n    internal var sizeFactor = 0.0f\n        get() = 2 * (radiusSum + distanceFromCenter)\n        private set\n\n    constructor(context: Context) : super(context)\n\n    constructor(context: Context, attrs: AttributeSet) : super(context, attrs)\n\n    constructor(context: Context, attrs: AttributeSet, defStyleAttr: Int) : super(context, attrs, defStyleAttr)\n\n    override fun getGraphX(t: Float): Float =\n            size / sizeFactor * (radiusSum * cos(t) - distanceFromCenter * cos(radiusSum / radiusMoving * t))\n\n    override fun getGraphY(t: Float): Float =\n            size / sizeFactor * (radiusSum * cos(t) - distanceFromCenter * sin(radiusSum / radiusMoving * t))\n}\n"
  },
  {
    "path": "lemniscate/src/main/java/com/vlad1m1r/lemniscate/roulette/scribble/ScribbleProgressView.kt",
    "content": "/*\n * Copyright 2016 Vladimir Jovanovic\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 */\n\npackage com.vlad1m1r.lemniscate.roulette.scribble\n\nimport android.content.Context\nimport android.util.AttributeSet\n\nimport com.vlad1m1r.lemniscate.roulette.BaseRouletteProgressView\nimport kotlin.math.cos\nimport kotlin.math.sin\n\nclass ScribbleProgressView : BaseRouletteProgressView {\n\n    internal var radiusSum: Float = 0f\n        get() = radiusFixed + radiusMoving\n        private set\n\n    internal var sizeFactor: Float = 0f\n        get() = 2 * (radiusSum + distanceFromCenter)\n        private set\n\n    constructor(context: Context) : super(context)\n\n    constructor(context: Context, attrs: AttributeSet) : super(context, attrs)\n\n    constructor(context: Context, attrs: AttributeSet, defStyleAttr: Int) : super(context, attrs, defStyleAttr)\n\n    override fun getGraphX(t: Float): Float =\n         (size / sizeFactor * (radiusSum * cos(t) - distanceFromCenter * cos(radiusSum / radiusMoving * t)))\n\n    override fun getGraphY(t: Float): Float =\n            (size / sizeFactor * (radiusSum * sin(t) - distanceFromCenter * cos(radiusSum / radiusMoving * t)))\n}\n"
  },
  {
    "path": "lemniscate/src/main/java/com/vlad1m1r/lemniscate/roulette/settings/RouletteCurveSettings.kt",
    "content": "package com.vlad1m1r.lemniscate.roulette.settings\n\nimport android.os.Parcel\nimport android.os.Parcelable\n\nclass RouletteCurveSettings() : Parcelable {\n\n    /**\n     * Radius of the non-moving circle\n     */\n    var radiusFixed = 3.0f\n    /**\n     * Radius of the moving circle\n     */\n    var radiusMoving = 1.0f\n    /**\n     * Distance from the center of the moving circle\n     */\n    var distanceFromCenter = 1.0f\n    /**\n     * Curve will be drawn on interval  [0, 2*numberOfCycles*π] before repeating\n     */\n    var numberOfCycles = 1.0f\n\n    constructor(parcel: Parcel) : this() {\n        radiusFixed = parcel.readFloat()\n        radiusMoving = parcel.readFloat()\n        distanceFromCenter = parcel.readFloat()\n        numberOfCycles = parcel.readFloat()\n    }\n\n    override fun writeToParcel(parcel: Parcel, flags: Int) {\n        parcel.writeFloat(radiusFixed)\n        parcel.writeFloat(radiusMoving)\n        parcel.writeFloat(distanceFromCenter)\n        parcel.writeFloat(numberOfCycles)\n    }\n\n    override fun describeContents(): Int {\n        return 0\n    }\n\n    companion object CREATOR : Parcelable.Creator<RouletteCurveSettings> {\n        override fun createFromParcel(parcel: Parcel): RouletteCurveSettings {\n            return RouletteCurveSettings(parcel)\n        }\n\n        override fun newArray(size: Int): Array<RouletteCurveSettings?> {\n            return arrayOfNulls(size)\n        }\n    }\n}\n"
  },
  {
    "path": "lemniscate/src/main/java/com/vlad1m1r/lemniscate/utils/CurveUtils.kt",
    "content": "/*\n * Copyright 2016 Vladimir Jovanovic\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 */\n\npackage com.vlad1m1r.lemniscate.utils\n\nimport com.vlad1m1r.lemniscate.base.models.Point\nimport kotlin.math.abs\n\nobject CurveUtils {\n\n    fun checkPointForHole(point: Point?, holeSize: Float, viewSize: Float): Point? {\n        return if (point != null &&\n                abs(point.x - viewSize / 2) < holeSize &&\n                abs(point.y - viewSize / 2) < holeSize) {\n            null\n        } else point\n    }\n}\n"
  },
  {
    "path": "lemniscate/src/main/res/values/attrs.xml",
    "content": "<?xml version=\"1.0\" encoding=\"utf-8\"?>\n<resources>\n    <declare-styleable name=\"BaseCurveProgressView\">\n        <attr name=\"minLineLength\" format=\"float\"/>\n        <attr name=\"maxLineLength\" format=\"float\"/>\n        <attr name=\"lineColor\" format=\"color\"/>\n        <attr name=\"duration\" format=\"integer\"/>\n        <attr name=\"hasHole\" format=\"boolean\"/>\n        <attr name=\"strokeWidth\" format=\"dimension\"/>\n        <attr name=\"sizeMultiplier\" format=\"float\"/>\n        <attr name=\"precision\" format=\"integer\"/>\n    </declare-styleable>\n\n    <declare-styleable name=\"RouletteCurveProgressView\">\n        <attr name=\"radiusFixed\" format=\"float\"/>\n        <attr name=\"radiusMoving\" format=\"float\"/>\n        <attr name=\"distanceFromCenter\" format=\"float\"/>\n        <attr name=\"numberOfCycles\" format=\"float\"/>\n    </declare-styleable>\n</resources>"
  },
  {
    "path": "lemniscate/src/main/res/values/dimens.xml",
    "content": "<resources>\n    <dimen name=\"lemniscate_stroke_width\">10dp</dimen>\n    <dimen name=\"lemniscate_preferred_width\">80dp</dimen>\n    <dimen name=\"lemniscate_preferred_height\">80dp</dimen>\n</resources>\n"
  },
  {
    "path": "lemniscate/src/test/java/com/vlad1m1r/lemniscate/BernoullisBowProgressViewTest.kt",
    "content": "package com.vlad1m1r.lemniscate\n\nimport com.google.common.truth.Truth.assertThat\nimport com.vlad1m1r.lemniscate.testutils.TestConstants\nimport com.vlad1m1r.lemniscate.testutils.isPeriodic\nimport com.vlad1m1r.lemniscate.testutils.setupDefaultMock\nimport org.junit.Before\nimport org.junit.Test\nimport org.mockito.kotlin.mock\nimport kotlin.math.PI\n\nclass BernoullisBowProgressViewTest {\n\n    private val view = mock<BernoullisBowProgressView>()\n\n    @Before\n    fun setUp() {\n        view.setupDefaultMock()\n    }\n\n    @Test\n    fun getGraphX() {\n        assertThat(view.getGraphX(0.0f)).isWithin(TestConstants.DELTA).of(37.5f)\n        assertThat(view.getGraphX(0.1f)).isWithin(TestConstants.DELTA).of(37.873238f)\n        assertThat(view.getGraphX(0.5f)).isWithin(TestConstants.DELTA).of(45.180264f)\n        assertThat(view.getGraphX(1.0f)).isWithin(TestConstants.DELTA).of(39.53901f)\n        assertThat(view.getGraphX(PI.toFloat())).isWithin(TestConstants.DELTA).of(-37.5f)\n        assertThat(view.getGraphX(2.0f)).isWithin(TestConstants.DELTA).of(-31.049751f)\n        assertThat(view.getGraphX(2 * PI.toFloat())).isWithin(TestConstants.DELTA).of(37.5f)\n    }\n\n    @Test\n    fun getGraphY() {\n        assertThat(view.getGraphY(0.0f)).isWithin(TestConstants.DELTA).of(0.0f)\n        assertThat(view.getGraphY(0.1f)).isWithin(TestConstants.DELTA).of(3.7810147f)\n        assertThat(view.getGraphY(0.5f)).isWithin(TestConstants.DELTA).of(21.660572f)\n        assertThat(view.getGraphY(1.0f)).isWithin(TestConstants.DELTA).of(33.270927f)\n        assertThat(view.getGraphY(PI.toFloat())).isWithin(TestConstants.DELTA).of(0.0f)\n        assertThat(view.getGraphY(2.0f)).isWithin(TestConstants.DELTA).of(-28.233456f)\n        assertThat(view.getGraphY(2 * PI.toFloat())).isWithin(TestConstants.DELTA).of(0.0f)\n    }\n\n    @Test\n    fun isPeriodic() {\n        view.isPeriodic(2 * PI.toFloat())\n    }\n}\n"
  },
  {
    "path": "lemniscate/src/test/java/com/vlad1m1r/lemniscate/BernoullisProgressViewTest.kt",
    "content": "package com.vlad1m1r.lemniscate\n\nimport com.google.common.truth.Truth.assertThat\nimport org.mockito.kotlin.mock\nimport com.vlad1m1r.lemniscate.testutils.TestConstants\nimport com.vlad1m1r.lemniscate.testutils.isPeriodic\nimport com.vlad1m1r.lemniscate.testutils.setupDefaultMock\nimport org.junit.Before\nimport org.junit.Test\nimport kotlin.math.PI\n\nclass BernoullisProgressViewTest {\n\n    private val view = mock<BernoullisProgressView>()\n\n    @Before\n    fun setUp() {\n        view.setupDefaultMock()\n    }\n\n    @Test\n    fun getGraphX() {\n        assertThat(view.getGraphX(0.0f)).isWithin(TestConstants.DELTA).of(50.0f)\n        assertThat(view.getGraphX(0.1f)).isWithin(TestConstants.DELTA).of(49.259254f)\n        assertThat(view.getGraphX(0.5f)).isWithin(TestConstants.DELTA).of(35.67847f)\n        assertThat(view.getGraphX(1.0f)).isWithin(TestConstants.DELTA).of(15.816132f)\n        assertThat(view.getGraphX(PI.toFloat())).isWithin(TestConstants.DELTA).of(-50.0f)\n        assertThat(view.getGraphX(2.0f)).isWithin(TestConstants.DELTA).of(-11.389914f)\n        assertThat(view.getGraphX(2 * PI.toFloat())).isWithin(TestConstants.DELTA).of(50.0f)\n    }\n\n    @Test\n    fun getGraphY() {\n        assertThat(view.getGraphY(0.0f)).isWithin(TestConstants.DELTA).of(0.0f)\n        assertThat(view.getGraphY(0.1f)).isWithin(TestConstants.DELTA).of(4.91772f)\n        assertThat(view.getGraphY(0.5f)).isWithin(TestConstants.DELTA).of(17.10517f)\n        assertThat(view.getGraphY(1.0f)).isWithin(TestConstants.DELTA).of(13.308815f)\n        assertThat(view.getGraphY(PI.toFloat())).isWithin(TestConstants.DELTA).of(0.0f)\n        assertThat(view.getGraphY(2.0f)).isWithin(TestConstants.DELTA).of(-10.356819f)\n        assertThat(view.getGraphY(2 * PI.toFloat())).isWithin(TestConstants.DELTA).of(0.0f)\n    }\n\n    @Test\n    fun isPeriodic() {\n        view.isPeriodic(2 * PI.toFloat())\n    }\n}\n"
  },
  {
    "path": "lemniscate/src/test/java/com/vlad1m1r/lemniscate/BernoullisSharpProgressViewTest.kt",
    "content": "package com.vlad1m1r.lemniscate\n\nimport com.google.common.truth.Truth.assertThat\nimport com.vlad1m1r.lemniscate.testutils.TestConstants\nimport com.vlad1m1r.lemniscate.testutils.isPeriodic\nimport com.vlad1m1r.lemniscate.testutils.setupDefaultMock\nimport org.junit.Before\nimport org.junit.Test\nimport org.mockito.kotlin.mock\nimport kotlin.math.PI\n\nclass BernoullisSharpProgressViewTest {\n\n    private val view = mock<BernoullisSharpProgressView>()\n\n    @Before\n    fun setUp() {\n        view.setupDefaultMock()\n    }\n\n    @Test\n    fun getGraphX() {\n        assertThat(view.getGraphX(0.0f)).isWithin(TestConstants.DELTA).of(50.0f)\n        assertThat(view.getGraphX(0.1f)).isWithin(TestConstants.DELTA).of(49.99937f)\n        assertThat(view.getGraphX(0.5f)).isWithin(TestConstants.DELTA).of(49.576702f)\n        assertThat(view.getGraphX(1.0f)).isWithin(TestConstants.DELTA).of(41.821438f)\n        assertThat(view.getGraphX(PI.toFloat())).isWithin(TestConstants.DELTA).of(-50.0f)\n        assertThat(view.getGraphX(2.0f)).isWithin(TestConstants.DELTA).of(-35.471752f)\n        assertThat(view.getGraphX(2 * PI.toFloat())).isWithin(TestConstants.DELTA).of(50.0f)\n    }\n\n    @Test\n    fun getGraphY() {\n        assertThat(view.getGraphY(0.0f)).isWithin(TestConstants.DELTA).of(0.0f)\n        assertThat(view.getGraphY(0.1f)).isWithin(TestConstants.DELTA).of(4.991608f)\n        assertThat(view.getGraphY(0.5f)).isWithin(TestConstants.DELTA).of(23.768335f)\n        assertThat(view.getGraphY(1.0f)).isWithin(TestConstants.DELTA).of(35.191525f)\n        assertThat(view.getGraphY(PI.toFloat())).isWithin(TestConstants.DELTA).of(0.0f)\n        assertThat(view.getGraphY(2.0f)).isWithin(TestConstants.DELTA).of(-32.25437f)\n        assertThat(view.getGraphY(2 * PI.toFloat())).isWithin(TestConstants.DELTA).of(0.0f)\n    }\n\n    @Test\n    fun isPeriodic() {\n        view.isPeriodic(2 * PI.toFloat())\n    }\n}\n"
  },
  {
    "path": "lemniscate/src/test/java/com/vlad1m1r/lemniscate/GeronosProgressViewTest.kt",
    "content": "package com.vlad1m1r.lemniscate\n\nimport com.google.common.truth.Truth.assertThat\nimport org.mockito.kotlin.mock\nimport com.vlad1m1r.lemniscate.testutils.TestConstants\nimport com.vlad1m1r.lemniscate.testutils.isPeriodic\nimport com.vlad1m1r.lemniscate.testutils.setupDefaultMock\nimport org.junit.Before\nimport org.junit.Test\nimport kotlin.math.PI\n\nclass GeronosProgressViewTest {\n\n    private val view = mock<GeronosProgressView>()\n\n    @Before\n    fun setUp() {\n        view.setupDefaultMock()\n    }\n\n    @Test\n    fun getGraphX() {\n        assertThat(view.getGraphX(0.0f)).isWithin(TestConstants.DELTA).of(0.0f)\n        assertThat(view.getGraphX(0.1f)).isWithin(TestConstants.DELTA).of(4.991671f)\n        assertThat(view.getGraphX(0.5f)).isWithin(TestConstants.DELTA).of(23.971277f)\n        assertThat(view.getGraphX(1.0f)).isWithin(TestConstants.DELTA).of(42.073547f)\n        assertThat(view.getGraphX(PI.toFloat())).isWithin(TestConstants.DELTA).of(0.0f)\n        assertThat(view.getGraphX(2.0f)).isWithin(TestConstants.DELTA).of(45.46487f)\n        assertThat(view.getGraphX(2 * PI.toFloat())).isWithin(TestConstants.DELTA).of(0.0f)\n    }\n\n    @Test\n    fun getGraphY() {\n        assertThat(view.getGraphY(0.0f)).isWithin(TestConstants.DELTA).of(0.0f)\n        assertThat(view.getGraphY(0.1f)).isWithin(TestConstants.DELTA).of(4.9667335f)\n        assertThat(view.getGraphY(0.5f)).isWithin(TestConstants.DELTA).of(21.036774f)\n        assertThat(view.getGraphY(1.0f)).isWithin(TestConstants.DELTA).of(22.732433f)\n        assertThat(view.getGraphY(PI.toFloat())).isWithin(TestConstants.DELTA).of(0.0f)\n        assertThat(view.getGraphY(2.0f)).isWithin(TestConstants.DELTA).of(-18.920063f)\n        assertThat(view.getGraphY(2 * PI.toFloat())).isWithin(TestConstants.DELTA).of(0.0f)\n    }\n\n    @Test\n    fun isPeriodic() {\n        view.isPeriodic(2 * PI.toFloat())\n    }\n}\n"
  },
  {
    "path": "lemniscate/src/test/java/com/vlad1m1r/lemniscate/base/BaseCurvePresenterTest.kt",
    "content": "package com.vlad1m1r.lemniscate.base\n\nimport com.google.common.truth.Truth.assertThat\nimport org.mockito.kotlin.*\nimport com.vlad1m1r.lemniscate.base.models.*\nimport com.vlad1m1r.lemniscate.base.settings.AnimationSettings\nimport com.vlad1m1r.lemniscate.base.settings.CurveSettings\nimport org.junit.Test\n\nclass BaseCurvePresenterTest {\n\n    private val view = mock<IBaseCurveView>()\n    private val curveSettings = mock<CurveSettings>()\n    private val viewSize = mock<ViewSize>()\n    private val animationSettings = mock<AnimationSettings>()\n    private val drawState = mock<DrawState>()\n    private val points = mock<Points>()\n\n    val presenter = BaseCurvePresenter(view, curveSettings, viewSize, animationSettings, drawState, points)\n\n    @Test\n    fun updateStartingPointOnCurve() {\n        whenever(curveSettings.lineLength).thenReturn(LineLength())\n\n        presenter.updateStartingPointOnCurve(1)\n\n        verify(animationSettings).startingPointOnCurve = 1\n        verify(drawState).recalculateLineLength(curveSettings.lineLength)\n        verify(view).invalidateProgressView()\n    }\n\n    @Test\n    fun recreatePoints() {\n        val presenterSpy = spy(presenter)\n\n        presenterSpy.recreatePoints()\n\n        verify(points).clear()\n        verify(presenterSpy).createNewPoints()\n        verify(presenterSpy).addPointsToPath()\n    }\n\n    @Test\n    fun getCorrectLineLengthToDraw() {\n        whenever(curveSettings.precision).thenReturn(99)\n        whenever(drawState.currentLineLength).thenReturn(10.32f)\n\n        assertThat(presenter.lineLengthToDraw).isEqualTo(1022)\n    }\n\n    @Test\n    fun getCorrectStartingPoint_whenPointsIsEmpty() {\n        whenever(animationSettings.startingPointOnCurve).thenReturn(10)\n        whenever(points.isEmpty).thenReturn(true)\n\n        assertThat(presenter.getStartingPoint()).isEqualTo(10)\n    }\n\n    @Test\n    fun getCorrectStartingPoint_whenPointsIsNotEmpty() {\n        whenever(points.isEmpty).thenReturn(false)\n        assertThat(presenter.getStartingPoint()).isEqualTo(0)\n    }\n\n    @Test\n    fun addPointsToPath() {\n        whenever(points.getPoints()).thenReturn(ArrayList())\n        presenter.addPointsToPath()\n        verify(drawState).addPointsToPath(points.getPoints(), curveSettings, viewSize)\n    }\n\n    @Test\n    fun addPointsToCurve_whenNotAllAddedStartO() {\n        val presenterSpy = spy(presenter)\n        val point = Point(1f,2f, 3f, 200f)\n        doReturn(point).whenever(presenterSpy).getPoint(any())\n        whenever(curveSettings.precision).thenReturn(20)\n        val remainingPointsValue = 100\n        val remainingPoints = presenterSpy.addPointsToCurve(0, remainingPointsValue)\n\n        verify(points, times(curveSettings.precision)).addPoint(point)\n        assertThat(remainingPoints).isEqualTo(remainingPointsValue - curveSettings.precision)\n    }\n\n    @Test\n    fun addPointsToCurveWhenNotAllAddedStartNotO() {\n        val presenterSpy = spy(presenter)\n        val point = Point(1f,2f, 3f, 200f)\n        doReturn(point).whenever(presenterSpy).getPoint(any())\n        whenever(curveSettings.precision).thenReturn(20)\n        val startValue = 10\n        val remainingPointsValue = 100\n\n        val remainingPoints = presenterSpy.addPointsToCurve(startValue, remainingPointsValue)\n\n        verify(points, times(curveSettings.precision - startValue)).addPoint(point)\n        assertThat(remainingPoints).isEqualTo(remainingPointsValue - curveSettings.precision + startValue)\n    }\n\n    @Test\n    fun addPointsToCurveWhenAllAdded() {\n        val presenterSpy = spy(presenter)\n        val point = Point(1f,2f, 3f, 200f)\n        doReturn(point).whenever(presenterSpy).getPoint(any())\n        whenever(curveSettings.precision).thenReturn(200)\n        val startValue = 10\n        val remainingPointsValue = 100\n\n        val remainingPoints = presenterSpy.addPointsToCurve(startValue, remainingPointsValue)\n\n        verify(points, times(remainingPointsValue)).addPoint(point)\n        assertThat(remainingPoints).isEqualTo(0)\n    }\n\n    @Test\n    fun getCorrectPoint() {\n        val presenterSpy = spy(presenter)\n        whenever(presenterSpy.getT(1)).thenReturn(10.9f)\n\n        presenterSpy.getPoint(1)\n\n        verify(view).getGraphX(10.9f)\n        verify(view).getGraphY(10.9f)\n    }\n\n    @Test\n    fun getT() {\n        whenever(curveSettings.precision).thenReturn(10)\n\n        presenter.getT(1)\n\n        verify(view).getT(1, curveSettings.precision)\n    }\n}\n"
  },
  {
    "path": "lemniscate/src/test/java/com/vlad1m1r/lemniscate/base/BaseCurveProgressViewTest.kt",
    "content": "package com.vlad1m1r.lemniscate.base\n\nimport android.view.View\nimport com.google.common.truth.Truth.assertThat\nimport org.mockito.kotlin.*\nimport org.junit.Before\nimport org.junit.Test\n\nclass BaseCurveProgressViewTest {\n\n    val baseCurve: BaseCurve = BaseCurve()\n\n    val baseCurveProgressView = mock<BaseCurveProgressView>()\n\n    @Before\n    fun setUp() {\n        doCallRealMethod().whenever(baseCurveProgressView).getMaxViewSquareSize(any(), any(), any(), any())\n        doCallRealMethod().whenever(baseCurveProgressView).getViewDimension(any(), any(), any())\n    }\n\n    @Test\n    fun getMaxViewSquareSize() {\n        assertThat(baseCurveProgressView.getMaxViewSquareSize(100, 200, 30, 50)).isEqualTo(100-50)\n        assertThat(baseCurveProgressView.getMaxViewSquareSize(220, 150, 30, 50)).isEqualTo(150-30)\n    }\n\n    @Test\n    fun getViewDimension_whenViewSizeIsZero() {\n        val defaultSize = 10f\n        assertThat(baseCurveProgressView.getViewDimension(View.MeasureSpec.AT_MOST, 0f, defaultSize)).isEqualTo(defaultSize)\n    }\n\n    @Test\n    fun getViewDimension_whenMeasureSpecIsExactly() {\n        val viewSize = 10f\n        assertThat(baseCurveProgressView.getViewDimension(View.MeasureSpec.EXACTLY, viewSize, 10f)).isEqualTo(viewSize)\n    }\n\n    @Test\n    fun getViewDimension_whenMeasureSpecIsAtMost() {\n        assertThat(baseCurveProgressView.getViewDimension(View.MeasureSpec.AT_MOST, 10f, 20f)).isEqualTo(10f)\n        assertThat(baseCurveProgressView.getViewDimension(View.MeasureSpec.AT_MOST, 30f, 20f)).isEqualTo(20f)\n    }\n\n    @Test\n    fun getViewDimension_whenMeasureSpecIsUnspecified() {\n        val defaultSize = 10f\n        assertThat(baseCurveProgressView.getViewDimension(View.MeasureSpec.UNSPECIFIED, 20f, defaultSize)).isEqualTo(defaultSize)\n    }\n\n    @Test\n    fun getT() {\n        assertThat(baseCurve.getT(0, 10)).isEqualTo(0.0f)\n        assertThat(baseCurve.getT(1, 10)).isEqualTo(0.62831855f)\n        assertThat(baseCurve.getT(10, 10)).isEqualTo(6.2831855f)\n        assertThat(baseCurve.getT(99, 8)).isEqualTo(77.75442f)\n        assertThat(baseCurve.getT(-1, 10)).isEqualTo(-0.62831855f)\n        assertThat(baseCurve.getT(-10, 10)).isEqualTo(-6.2831855f)\n    }\n\n    inner class BaseCurve : IBaseCurveView {\n        override fun getGraphX(t: Float): Float {\n            return 0f\n        }\n\n        override fun getGraphY(t: Float): Float {\n            return 0f\n        }\n\n        override fun invalidateProgressView() {}\n\n        override fun requestProgressViewLayout() {}\n    }\n}\n"
  },
  {
    "path": "lemniscate/src/test/java/com/vlad1m1r/lemniscate/base/BaseProgressViewAttributesTest.kt",
    "content": "package com.vlad1m1r.lemniscate.base\n\nimport android.graphics.Color\nimport android.os.Build\nimport androidx.test.platform.app.InstrumentationRegistry\nimport com.google.common.truth.Truth.assertThat\nimport com.vlad1m1r.lemniscate.BernoullisProgressView\nimport com.vlad1m1r.lemniscate.R\nimport org.junit.Test\nimport org.junit.runner.RunWith\nimport org.robolectric.Robolectric\nimport org.robolectric.RobolectricTestRunner\nimport org.robolectric.annotation.Config\n\n@RunWith(RobolectricTestRunner::class)\n@Config(sdk = [Build.VERSION_CODES.P])\nclass BaseProgressViewAttributesTest {\n\n    val context = InstrumentationRegistry.getInstrumentation().targetContext\n\n    val atributeSet =  Robolectric.buildAttributeSet()\n            .addAttribute(R.attr.maxLineLength, \"0.81\")\n            .addAttribute(R.attr.minLineLength, \"0.23\")\n            .addAttribute(R.attr.lineColor, \"#000000\")\n            .addAttribute(R.attr.hasHole, \"true\")\n            .addAttribute(R.attr.strokeWidth, \"33px\")\n            .addAttribute(R.attr.precision, \"111\")\n            .addAttribute(R.attr.duration, \"999\")\n            .build()\n\n    @Test\n    fun constructFromAttributeSet_whenProvided() {\n        val bernoullisProgressView = BernoullisProgressView(context, atributeSet)\n\n        assertThat(bernoullisProgressView.lineMaxLength).isEqualTo(0.81f)\n        assertThat(bernoullisProgressView.lineMinLength).isEqualTo(0.23f)\n        assertThat(bernoullisProgressView.color).isEqualTo(Color.BLACK)\n        assertThat(bernoullisProgressView.hasHole).isTrue()\n        assertThat(bernoullisProgressView.strokeWidth).isEqualTo(33f)\n        assertThat(bernoullisProgressView.precision).isEqualTo(111)\n        assertThat(bernoullisProgressView.duration).isEqualTo(999)\n    }\n}\n"
  },
  {
    "path": "lemniscate/src/test/java/com/vlad1m1r/lemniscate/base/models/DrawStateTest.kt",
    "content": "package com.vlad1m1r.lemniscate.base.models\n\nimport android.graphics.Path\nimport com.google.common.truth.Truth.assertThat\nimport org.mockito.kotlin.*\nimport com.vlad1m1r.lemniscate.base.settings.CurveSettings\nimport org.junit.Test\nimport org.mockito.Mockito.inOrder\n\nclass DrawStateTest {\n\n    val path = mock<Path>()\n    val drawState = DrawState(path)\n\n    @Test\n    fun addPairOfPoints() {\n        val start = Point(0f,1f, 2f, 100f)\n        val end = Point(2f, 3f, 2f, 100f)\n\n        drawState.addPairOfPointsToPath(start, end)\n\n        verify(path).moveTo(start.x, start.y)\n        verify(path).quadTo(start.x, start.y, end.x, end.y)\n        verifyNoMoreInteractions(path)\n    }\n\n    @Test\n    fun addStartPoints() {\n        val start = Point(0f,1f, 2f, 100f)\n\n        drawState.addPairOfPointsToPath(start, null)\n\n        verify(path).moveTo(start.x, start.y)\n        verify(path).lineTo(start.x, start.y)\n        verifyNoMoreInteractions(path)\n    }\n\n    @Test\n    fun addEndPoints() {\n        val end = Point(2f, 3f, 2f, 100f)\n\n        drawState.addPairOfPointsToPath(null, end)\n\n        verify(path).moveTo(end.x, end.y)\n        verifyNoMoreInteractions(path)\n    }\n\n    @Test\n    fun addPointsToPathWhenListEmpty() {\n        val curveSettings = mock<CurveSettings>()\n        val viewSize = mock<ViewSize>()\n\n        drawState.addPointsToPath(emptyList(), curveSettings, viewSize)\n\n        verify(path).reset()\n        verifyNoMoreInteractions(path)\n    }\n\n    @Test\n    fun addPointsToPathWhenListHasPointsOutOfHole() {\n        val list = listOf(\n                Point(5f, 0f, 1f, 100f),\n                Point(3f, 0f, 1f, 100f)\n        )\n        val curveSettings = mock<CurveSettings>()\n        val viewSize = mock<ViewSize>()\n        whenever(curveSettings.hasHole).thenReturn(false)\n        whenever(curveSettings.strokeWidth).thenReturn(1f)\n        val drawStateSpy = spy(drawState)\n\n        drawStateSpy.addPointsToPath(list, curveSettings, viewSize)\n\n        verify(drawStateSpy).addPairOfPointsToPath(list[0], list[1])\n        verify(drawStateSpy).addPairOfPointsToPath(list[1], null)\n    }\n\n    @Test\n    fun addPointsToPathWhenListHasPointsInHole() {\n        val list = listOf(\n                Point(5f, 0f, 100f, 10f),\n                Point(3f, 0f, 100f, 10f)\n        )\n        val curveSettings = mock<CurveSettings>()\n        val viewSize = mock<ViewSize>()\n        whenever(curveSettings.hasHole).thenReturn(true)\n        whenever(curveSettings.strokeWidth).thenReturn(100f)\n        val drawStateSpy = spy(drawState)\n\n        drawStateSpy.addPointsToPath(list, curveSettings, viewSize)\n\n        verify(drawStateSpy).addPairOfPointsToPath(null, null)\n    }\n\n    @Test\n    fun recalculateLineLength() {\n        val drawStateSpy = spy(drawState)\n        val inOrder = inOrder(drawStateSpy)\n        val lineLength = LineLength()\n\n        drawStateSpy.recalculateLineLength(lineLength)\n\n        inOrder.verify(drawStateSpy).keepLineLengthInsideLimits(lineLength)\n        inOrder.verify(drawStateSpy).calculateNewCurrentLineLength(lineLength)\n        inOrder.verifyNoMoreInteractions()\n    }\n\n    @Test\n    fun recalculateLineLengthWhenMinGreaterThanMax() {\n        val lineLength = LineLength()\n        lineLength.lineMinLength = 0.8f\n        lineLength.lineMaxLength = 0.6f\n\n        drawState.recalculateLineLength(lineLength)\n\n        assertThat(drawState.currentLineLength).isEqualTo(lineLength.lineMaxLength)\n    }\n\n    @Test\n    fun keepLineLengthInsideLimitsWhenCurrentLessThanMin() {\n        val lineLength = LineLength()\n        lineLength.lineMinLength = 0.5f\n        drawState.currentLineLength = 0.4f\n\n        drawState.keepLineLengthInsideLimits(lineLength)\n\n        assertThat(drawState.currentLineLength).isEqualTo(lineLength.lineMinLength)\n    }\n\n    @Test\n    fun keepLineLengthInsideLimitsWhenCurrentGreaterThanMax() {\n        val lineLength = LineLength()\n        lineLength.lineMaxLength = 0.5f\n        drawState.currentLineLength = 0.7f\n\n        drawState.keepLineLengthInsideLimits(lineLength)\n\n        assertThat(drawState.currentLineLength).isEqualTo(lineLength.lineMaxLength)\n    }\n\n    @Test\n    fun calculateNewCurrentLineLengthWhenLessThanMaxAndExpanding() {\n        val lineLength = LineLength()\n        lineLength.lineMaxLength = 0.7f\n        drawState.isExpanding = true\n        drawState.currentLineLength = 0.5f\n\n        drawState.calculateNewCurrentLineLength(lineLength)\n\n        assertThat(drawState.currentLineLength).isEqualTo(0.501f)\n    }\n\n    @Test\n    fun calculateNewCurrentLineLengthWhenGreaterThanMinAndNotExpanding() {\n        val lineLength = LineLength()\n        lineLength.lineMinLength = 0.2f\n        drawState.isExpanding = false\n        drawState.currentLineLength = 0.5f\n\n        drawState.calculateNewCurrentLineLength(lineLength)\n\n        assertThat(drawState.currentLineLength).isEqualTo(0.499f)\n    }\n\n    @Test\n    fun calculateNewCurrentLineLengthWhenEqualMaxAndExpanding() {\n        val lineLength = LineLength()\n        drawState.currentLineLength = lineLength.lineMaxLength\n        drawState.isExpanding = true\n\n        drawState.calculateNewCurrentLineLength(lineLength)\n\n        assertThat(drawState.currentLineLength).isEqualTo(lineLength.lineMaxLength)\n        assertThat(drawState.isExpanding).isFalse()\n    }\n\n    @Test\n    fun calculateNewCurrentLineLengthWhenEqualMinAndNotExpanding() {\n        val lineLength = LineLength()\n        drawState.currentLineLength = lineLength.lineMinLength\n        drawState.isExpanding = false\n\n        drawState.calculateNewCurrentLineLength(lineLength)\n\n        assertThat(drawState.currentLineLength).isEqualTo(lineLength.lineMinLength)\n        assertThat(drawState.isExpanding).isTrue()\n    }\n\n    @Test(expected = IllegalArgumentException::class)\n    fun calculateNewCurrentLineLengthIsNotInsideLimits() {\n        val lineLength = LineLength()\n        drawState.currentLineLength = lineLength.lineMaxLength + 1\n\n        drawState.calculateNewCurrentLineLength(lineLength)\n    }\n\n    @Test\n    fun resetPath() {\n        drawState.resetPath()\n\n        verify(path).reset()\n    }\n\n}\n"
  },
  {
    "path": "lemniscate/src/test/java/com/vlad1m1r/lemniscate/base/models/LineLengthParcelableTest.kt",
    "content": "package com.vlad1m1r.lemniscate.base.models\n\nimport android.os.Build\nimport android.os.Parcel\nimport com.google.common.truth.Truth.assertThat\nimport com.vlad1m1r.lemniscate.testutils.isEqualTo\nimport org.junit.Before\nimport org.junit.Test\nimport org.junit.runner.RunWith\nimport org.robolectric.RobolectricTestRunner\nimport org.robolectric.annotation.Config\n\n@RunWith(RobolectricTestRunner::class)\n@Config(sdk = [Build.VERSION_CODES.P])\nclass LineLengthParcelableTest {\n\n    private lateinit var lineLength: LineLength\n\n    @Before\n    fun setUp() {\n        lineLength = LineLength().apply {\n            lineMinLength = 0.24f\n            lineMaxLength = 0.83f\n        }\n    }\n\n    @Test\n    fun parcelable() {\n        val parcel = Parcel.obtain()\n        lineLength.writeToParcel(parcel, 0)\n        parcel.setDataPosition(0)\n\n        val copy = LineLength(parcel)\n        parcel.recycle()\n\n        assertThat(lineLength.isEqualTo(copy)).isTrue()\n    }\n}\n"
  },
  {
    "path": "lemniscate/src/test/java/com/vlad1m1r/lemniscate/base/models/LineLengthTest.kt",
    "content": "package com.vlad1m1r.lemniscate.base.models\n\nimport com.google.common.truth.Truth.assertThat\nimport org.junit.Test\n\nclass LineLengthTest {\n\n    private val lineLength = LineLength()\n\n    @Test\n    fun getLineMaxLength() {\n        lineLength.lineMaxLength = 0.9f\n        assertThat(lineLength.lineMaxLength).isEqualTo(0.9f)\n    }\n\n    @Test(expected = IllegalArgumentException::class)\n    fun setLineMaxLengthGreaterThan1ThrowsException() {\n        lineLength.lineMaxLength = 1.1f\n    }\n\n    @Test(expected = IllegalArgumentException::class)\n    fun setLineMaxLengthEqualTo0ThrowsException() {\n        lineLength.lineMaxLength = 0.0f\n    }\n\n    @Test(expected = IllegalArgumentException::class)\n    fun setLineMaxLengthLestThan0ThrowsException() {\n        lineLength.lineMaxLength = -1.0f\n    }\n\n    @Test\n    fun setLineMinLength() {\n        lineLength.lineMinLength = 0.1f\n        assertThat(lineLength.lineMinLength).isEqualTo(0.1f)\n    }\n\n    @Test(expected = IllegalArgumentException::class)\n    fun setLineMinLengthLestThan0ThrowsException() {\n        lineLength.lineMinLength = -0.1f\n    }\n\n    @Test(expected = IllegalArgumentException::class)\n    fun setLineMinLengthGreaterThan1ThrowsException() {\n        lineLength.lineMinLength = 1.1f\n    }\n\n    @Test(expected = IllegalArgumentException::class)\n    fun setLineMinLengthEqualTo0ThrowsException() {\n        lineLength.lineMinLength = 0.0f\n    }\n}"
  },
  {
    "path": "lemniscate/src/test/java/com/vlad1m1r/lemniscate/base/models/PointTest.kt",
    "content": "package com.vlad1m1r.lemniscate.base.models\n\nimport com.google.common.truth.Truth.assertThat\nimport org.junit.Test\n\nclass PointTest {\n    @Test\n    fun translatesPoints_whenCreated() {\n        val point = Point(0.0f, 30.0f, 30.0f, 270.0f)\n        assertThat(point.x).isEqualTo(135.0f)\n        assertThat(point.y).isEqualTo(159.545455f)\n    }\n}\n"
  },
  {
    "path": "lemniscate/src/test/java/com/vlad1m1r/lemniscate/base/models/PointsTest.kt",
    "content": "package com.vlad1m1r.lemniscate.base.models\n\nimport com.google.common.truth.Truth.assertThat\nimport org.junit.Test\n\nclass PointsTest {\n\n    val points = Points()\n    val point  = Point(0f, 0f, 10f, 10f)\n\n    @Test\n    fun isNotEmpty_whenPointIsAdded() {\n        assertThat(points.isEmpty).isTrue()\n        points.addPoint(point)\n        assertThat(points.isEmpty).isFalse()\n    }\n\n    @Test\n    fun containsPoint_whenPointIsAdded() {\n        points.addPoint(point)\n        assertThat(points.getPoints()).containsExactly(point)\n    }\n\n    @Test\n    fun isEmpty_whenClearIsCalled() {\n        points.addPoint(point)\n        points.clear()\n        assertThat(points.isEmpty).isTrue()\n    }\n}\n"
  },
  {
    "path": "lemniscate/src/test/java/com/vlad1m1r/lemniscate/base/settings/AnimationSettingsParcelableTest.kt",
    "content": "package com.vlad1m1r.lemniscate.base.settings\n\nimport android.os.Build\nimport android.os.Parcel\nimport com.google.common.truth.Truth.assertThat\nimport com.vlad1m1r.lemniscate.testutils.isEqualTo\nimport org.junit.Before\nimport org.junit.Test\nimport org.junit.runner.RunWith\nimport org.robolectric.RobolectricTestRunner\nimport org.robolectric.annotation.Config\n\n@RunWith(RobolectricTestRunner::class)\n@Config(sdk = [Build.VERSION_CODES.P])\nclass AnimationSettingsParcelableTest {\n\n    private lateinit var animationSettings: AnimationSettings\n\n    @Before\n    fun setUp() {\n        animationSettings = AnimationSettings(123, 987)\n    }\n\n    @Test\n    fun parcelable() {\n        val parcel = Parcel.obtain()\n        animationSettings.writeToParcel(parcel, 0)\n        parcel.setDataPosition(0)\n\n        val copy = AnimationSettings(parcel)\n        parcel.recycle()\n\n        assertThat(animationSettings.isEqualTo(copy)).isTrue()\n    }\n}\n"
  },
  {
    "path": "lemniscate/src/test/java/com/vlad1m1r/lemniscate/base/settings/CurveSettingsParcelableTest.kt",
    "content": "package com.vlad1m1r.lemniscate.base.settings\n\nimport android.os.Build\nimport android.os.Parcel\nimport com.vlad1m1r.lemniscate.base.models.LineLength\nimport com.vlad1m1r.lemniscate.testutils.isEqualTo\nimport org.junit.Before\nimport org.junit.Test\nimport org.junit.runner.RunWith\nimport org.robolectric.RobolectricTestRunner\nimport org.robolectric.annotation.Config\n\n@RunWith(RobolectricTestRunner::class)\n@Config(sdk = [Build.VERSION_CODES.P])\nclass CurveSettingsParcelableTest {\n\n    private lateinit var curveSettings: CurveSettings\n\n    @Before\n    fun setUp() {\n        curveSettings = CurveSettings().apply {\n            color = 123\n            hasHole = true\n            lineLength = LineLength().apply {\n                lineMaxLength = 0.85f\n                lineMinLength = 0.26f\n            }\n            strokeWidth = 23.2f\n            precision = 123\n        }\n    }\n\n    @Test\n    fun parcelable() {\n        val parcel = Parcel.obtain()\n        curveSettings.writeToParcel(parcel, 0)\n        parcel.setDataPosition(0)\n\n        val copy = CurveSettings(parcel)\n        parcel.recycle()\n\n        curveSettings.isEqualTo(copy)\n    }\n}\n"
  },
  {
    "path": "lemniscate/src/test/java/com/vlad1m1r/lemniscate/base/settings/CurveSettingsTest.kt",
    "content": "package com.vlad1m1r.lemniscate.base.settings\n\nimport android.graphics.Paint\nimport com.google.common.truth.Truth.assertThat\nimport org.mockito.kotlin.mock\nimport com.vlad1m1r.lemniscate.base.models.LineLength\nimport org.junit.Assert.assertEquals\nimport org.junit.Before\nimport org.junit.Test\nimport org.junit.runner.RunWith\nimport org.mockito.Mockito.verify\nimport org.mockito.junit.MockitoJUnitRunner\n\n@RunWith(MockitoJUnitRunner::class)\nclass CurveSettingsTest {\n\n    private lateinit var curveSettings: CurveSettings\n\n    val paint = mock<Paint>()\n\n    @Before\n    fun setUp() {\n        val lineLength = LineLength()\n        curveSettings = CurveSettings(paint)\n        curveSettings.lineLength = lineLength\n    }\n\n    @Test\n    fun setStrokeWidth() {\n        curveSettings.strokeWidth = 10.0f\n        assertThat(curveSettings.strokeWidth).isEqualTo(10.0f)\n        verify(paint).strokeWidth = 10f\n    }\n\n    @Test(expected = IllegalArgumentException::class)\n    fun setStrokeWidthException() {\n        curveSettings.strokeWidth = -1.0f\n    }\n\n    @Test\n    fun setColor() {\n        curveSettings.color = 123\n        assertEquals(123, curveSettings.color.toLong())\n        verify(paint).color = 123\n    }\n}\n"
  },
  {
    "path": "lemniscate/src/test/java/com/vlad1m1r/lemniscate/funny/CannabisProgressViewTest.kt",
    "content": "package com.vlad1m1r.lemniscate.funny\n\nimport android.os.Build\nimport androidx.test.platform.app.InstrumentationRegistry\nimport com.google.common.truth.Truth.assertThat\nimport org.mockito.kotlin.mock\nimport com.vlad1m1r.lemniscate.testutils.TestConstants\nimport com.vlad1m1r.lemniscate.testutils.isPeriodic\nimport com.vlad1m1r.lemniscate.testutils.setupDefaultMock\nimport org.junit.Before\nimport org.junit.Test\nimport org.junit.runner.RunWith\nimport org.robolectric.RobolectricTestRunner\nimport org.robolectric.annotation.Config\nimport kotlin.math.PI\n\nclass CannabisProgressViewTest {\n\n    private val view = mock<CannabisProgressView>()\n\n    @Before\n    fun setUp() {\n        view.setupDefaultMock()\n    }\n\n    @Test\n    fun getGraphX() {\n        assertThat(view.getGraphX(0.0f)).isWithin(TestConstants.DELTA).of(34.833332f)\n        assertThat(view.getGraphX(0.1f)).isWithin(TestConstants.DELTA).of(25.860207f)\n        assertThat(view.getGraphX(0.5f)).isWithin(TestConstants.DELTA).of(9.527859f)\n        assertThat(view.getGraphX(1.0f)).isWithin(TestConstants.DELTA).of(14.251956f)\n        assertThat(view.getGraphX(PI.toFloat())).isWithin(TestConstants.DELTA).of(-34.83333f)\n        assertThat(view.getGraphX(2.0f)).isWithin(TestConstants.DELTA).of(-1.4506966f)\n        assertThat(view.getGraphX(2 * PI.toFloat())).isWithin(TestConstants.DELTA).of(34.833332f)\n    }\n\n    @Test\n    fun getGraphY() {\n        assertThat(view.getGraphY(0.0f)).isWithin(TestConstants.DELTA).of(25.0f)\n        assertThat(view.getGraphY(0.1f)).isWithin(TestConstants.DELTA).of(22.405325f)\n        assertThat(view.getGraphY(0.5f)).isWithin(TestConstants.DELTA).of(19.794907f)\n        assertThat(view.getGraphY(1.0f)).isWithin(TestConstants.DELTA).of(2.803894f)\n        assertThat(view.getGraphY(PI.toFloat())).isWithin(TestConstants.DELTA).of(25.0f)\n        assertThat(view.getGraphY(2.0f)).isWithin(TestConstants.DELTA).of(21.83017f)\n        assertThat(view.getGraphY(2 * PI.toFloat())).isWithin(TestConstants.DELTA).of(25.0f)\n    }\n\n    @Test\n    fun isPeriodic() {\n        view.isPeriodic(2 * PI.toFloat())\n    }\n}\n\n@RunWith(RobolectricTestRunner::class)\n@Config(sdk = [Build.VERSION_CODES.P])\nclass CannabisProgressViewHasHoleTest {\n\n    val context = InstrumentationRegistry.getInstrumentation().targetContext\n    private val view = CannabisProgressView(context)\n\n    @Test\n    fun hasHoleDisabled() {\n        view.hasHole = true\n        assertThat(view.hasHole).isFalse()\n    }\n}\n"
  },
  {
    "path": "lemniscate/src/test/java/com/vlad1m1r/lemniscate/funny/HeartProgressViewTest.kt",
    "content": "package com.vlad1m1r.lemniscate.funny\n\nimport android.os.Build\nimport androidx.test.platform.app.InstrumentationRegistry\nimport com.google.common.truth.Truth.assertThat\nimport org.mockito.kotlin.mock\nimport com.vlad1m1r.lemniscate.testutils.TestConstants\nimport com.vlad1m1r.lemniscate.testutils.isPeriodic\nimport com.vlad1m1r.lemniscate.testutils.setupDefaultMock\nimport org.junit.Before\nimport org.junit.Test\nimport org.junit.runner.RunWith\nimport org.robolectric.RobolectricTestRunner\nimport org.robolectric.annotation.Config\nimport kotlin.math.PI\n\nclass HeartProgressViewTest{\n\n    private val view = mock<HeartProgressView>()\n\n    @Before\n    fun setUp() {\n        view.setupDefaultMock()\n    }\n\n    @Test\n    fun getGraphX() {\n        assertThat(view.getGraphX(0.0f)).isWithin(TestConstants.DELTA).of(0.0f)\n        assertThat(view.getGraphX(0.1f)).isWithin(TestConstants.DELTA).of(0.046824045f)\n        assertThat(view.getGraphX(0.5f)).isWithin(TestConstants.DELTA).of(5.1856666f)\n        assertThat(view.getGraphX(1.0f)).isWithin(TestConstants.DELTA).of(28.038736f)\n        assertThat(view.getGraphX(PI.toFloat())).isWithin(TestConstants.DELTA).of(0.0f)\n        assertThat(view.getGraphX(2.0f)).isWithin(TestConstants.DELTA).of(35.38009f)\n        assertThat(view.getGraphX(2 * PI.toFloat())).isWithin(TestConstants.DELTA).of(0.0f)\n    }\n\n    @Test\n    fun getGraphY() {\n        assertThat(view.getGraphY(0.0f)).isWithin(TestConstants.DELTA).of(-14.705882f)\n        assertThat(view.getGraphY(0.1f)).isWithin(TestConstants.DELTA).of(-15.302903f)\n        assertThat(view.getGraphY(0.5f)).isWithin(TestConstants.DELTA).of(-26.416864f)\n        assertThat(view.getGraphY(1.0f)).isWithin(TestConstants.DELTA).of(-34.52439f)\n        assertThat(view.getGraphY(PI.toFloat())).isWithin(TestConstants.DELTA).of(50.0f)\n        assertThat(view.getGraphY(2.0f)).isWithin(TestConstants.DELTA).of(11.51921f)\n        assertThat(view.getGraphY(2 * PI.toFloat())).isWithin(TestConstants.DELTA).of(-14.705882f)\n    }\n\n    @Test\n    fun isPeriodic() {\n        view.isPeriodic(2 * PI.toFloat())\n    }\n}\n\n@RunWith(RobolectricTestRunner::class)\n@Config(sdk = [Build.VERSION_CODES.P])\nclass HeartProgressViewHasHoleTest {\n\n    val context = InstrumentationRegistry.getInstrumentation().targetContext\n    private val view = HeartProgressView(context)\n\n    @Test\n    fun hasHoleDisabled() {\n        view.hasHole = true\n        assertThat(view.hasHole).isFalse()\n    }\n}\n"
  },
  {
    "path": "lemniscate/src/test/java/com/vlad1m1r/lemniscate/other/XProgressViewTest.kt",
    "content": "package com.vlad1m1r.lemniscate.other\n\nimport android.os.Build\nimport androidx.test.platform.app.InstrumentationRegistry\nimport com.google.common.truth.Truth.assertThat\nimport org.mockito.kotlin.mock\nimport com.vlad1m1r.lemniscate.testutils.TestConstants\nimport com.vlad1m1r.lemniscate.testutils.isPeriodic\nimport com.vlad1m1r.lemniscate.testutils.setupDefaultMock\nimport org.junit.Before\nimport org.junit.Test\nimport org.junit.runner.RunWith\nimport org.robolectric.RobolectricTestRunner\nimport org.robolectric.annotation.Config\nimport kotlin.math.PI\n\nclass XProgressViewTest {\n\n    private val view = mock<XProgressView>()\n\n    @Before\n    fun setUp() {\n        view.setupDefaultMock()\n    }\n\n    @Test\n    fun getGraphX() {\n        assertThat(view.getGraphX(0.0f)).isWithin(TestConstants.DELTA).of(0.0f)\n        assertThat(view.getGraphX(0.1f)).isWithin(TestConstants.DELTA).of(9.933467f)\n        assertThat(view.getGraphX(0.5f)).isWithin(TestConstants.DELTA).of(42.073547f)\n        assertThat(view.getGraphX(1.0f)).isWithin(TestConstants.DELTA).of(45.464867f)\n        assertThat(view.getGraphX(PI.toFloat())).isWithin(TestConstants.DELTA).of(0.0f)\n        assertThat(view.getGraphX(2.0f)).isWithin(TestConstants.DELTA).of(-37.840126f)\n        assertThat(view.getGraphX(2 * PI.toFloat())).isWithin(TestConstants.DELTA).of(0.0f)\n    }\n\n    @Test\n    fun getGraphY() {\n        assertThat(view.getGraphY(0.0f)).isWithin(TestConstants.DELTA).of(0.0f)\n        assertThat(view.getGraphY(0.1f)).isWithin(TestConstants.DELTA).of(9.933467f)\n        assertThat(view.getGraphY(0.5f)).isWithin(TestConstants.DELTA).of(42.073547f)\n        assertThat(view.getGraphY(1.0f)).isWithin(TestConstants.DELTA).of(45.464867f)\n        assertThat(view.getGraphY(PI.toFloat())).isWithin(TestConstants.DELTA).of(0.0f)\n        assertThat(view.getGraphY(2.0f)).isWithin(TestConstants.DELTA).of(-37.840126f)\n        assertThat(view.getGraphY(2 * PI.toFloat())).isWithin(TestConstants.DELTA).of(0.0f)\n    }\n\n    @Test\n    fun isPeriodic() {\n        view.isPeriodic(2 * PI.toFloat())\n    }\n}\n\n@RunWith(RobolectricTestRunner::class)\n@Config(sdk = [Build.VERSION_CODES.P])\nclass XProgressViewHasHoleTest {\n\n    val context = InstrumentationRegistry.getInstrumentation().targetContext\n    private val view = XProgressView(context)\n\n    @Test\n    fun hasHoleDisabled() {\n        view.hasHole = true\n        assertThat(view.hasHole).isFalse()\n    }\n}\n"
  },
  {
    "path": "lemniscate/src/test/java/com/vlad1m1r/lemniscate/roulette/BaseRouletteProgressViewAttributesTest.kt",
    "content": "package com.vlad1m1r.lemniscate.roulette\n\nimport android.os.Build\nimport androidx.test.platform.app.InstrumentationRegistry\nimport com.google.common.truth.Truth.assertThat\nimport com.vlad1m1r.lemniscate.R\nimport org.junit.Test\nimport org.junit.runner.RunWith\nimport org.robolectric.Robolectric\nimport org.robolectric.RobolectricTestRunner\nimport org.robolectric.annotation.Config\n\n@RunWith(RobolectricTestRunner::class)\n@Config(sdk = [Build.VERSION_CODES.P])\nclass BaseRouletteProgressViewAttributesTest {\n\n    val context = InstrumentationRegistry.getInstrumentation().targetContext\n    val atributeSet =  Robolectric.buildAttributeSet()\n            .addAttribute(R.attr.radiusFixed, \"34\")\n            .addAttribute(R.attr.radiusMoving, \"23\")\n            .addAttribute(R.attr.numberOfCycles, \"43\")\n            .addAttribute(R.attr.distanceFromCenter, \"31\")\n            .build()\n\n    @Test\n    fun constructorWithAttributeSet() {\n        val epitrochoidProgressView = EpitrochoidProgressView(context, atributeSet)\n        assertThat(epitrochoidProgressView.radiusFixed).isEqualTo(34f)\n        assertThat(epitrochoidProgressView.radiusMoving).isEqualTo(23f)\n        assertThat(epitrochoidProgressView.numberOfCycles).isEqualTo(43f)\n        assertThat(epitrochoidProgressView.distanceFromCenter).isEqualTo(31f)\n    }\n}\n"
  },
  {
    "path": "lemniscate/src/test/java/com/vlad1m1r/lemniscate/roulette/EpitrochoidProgressViewTest.kt",
    "content": "package com.vlad1m1r.lemniscate.roulette\n\nimport android.os.Build\nimport androidx.test.platform.app.InstrumentationRegistry\nimport com.google.common.truth.Truth.assertThat\nimport org.mockito.kotlin.*\nimport com.vlad1m1r.lemniscate.testutils.TestConstants.DELTA\nimport com.vlad1m1r.lemniscate.testutils.isPeriodic\nimport com.vlad1m1r.lemniscate.testutils.setupDefaultMock\nimport org.junit.Before\nimport org.junit.Test\nimport org.junit.runner.RunWith\nimport org.robolectric.RobolectricTestRunner\nimport org.robolectric.annotation.Config\nimport kotlin.math.PI\n\nclass EpitrochoidProgressViewTest {\n\n    private val view = mock<EpitrochoidProgressView>()\n\n    @Before\n    fun setUp() {\n        view.setupDefaultMock()\n        doCallRealMethod().whenever(view).radiusSum\n        doCallRealMethod().whenever(view).sizeFactor\n    }\n\n    @Test\n    fun getGraphX() {\n        assertThat(view.getGraphX(0.0f)).isWithin(DELTA).of(30.0f)\n        assertThat(view.getGraphX(0.1f)).isWithin(DELTA).of(30.589556f)\n        assertThat(view.getGraphX(0.5f)).isWithin(DELTA).of(39.26477f)\n        assertThat(view.getGraphX(1.0f)).isWithin(DELTA).of(28.14853f)\n        assertThat(view.getGraphX(PI.toFloat())).isWithin(DELTA).of(-50.0f)\n        assertThat(view.getGraphX(2.0f)).isWithin(DELTA).of(-15.190873f)\n        assertThat(view.getGraphX(2 * PI.toFloat())).isWithin(DELTA).of(30.0f)\n    }\n\n    @Test\n    fun getGraphY() {\n        assertThat(view.getGraphY(0.0f)).isWithin(DELTA).of(0.0f)\n        assertThat(view.getGraphY(0.1f)).isWithin(DELTA).of(0.09915324f)\n        assertThat(view.getGraphY(0.5f)).isWithin(DELTA).of(10.084047f)\n        assertThat(view.getGraphY(1.0f)).isWithin(DELTA).of(41.226864f)\n        assertThat(view.getGraphY(PI.toFloat())).isWithin(DELTA).of(9.797174E-15f)\n        assertThat(view.getGraphY(2.0f)).isWithin(DELTA).of(26.478315f)\n        assertThat(view.getGraphY(2 * PI.toFloat())).isWithin(DELTA).of(0.0f)\n    }\n\n    @Test\n    fun isPeriodic() {\n        view.isPeriodic(2 * PI.toFloat())\n    }\n}\n\n@RunWith(RobolectricTestRunner::class)\n@Config(sdk = [Build.VERSION_CODES.P])\nclass EpitrochoidProgressViewHasHoleTest {\n\n    val context = InstrumentationRegistry.getInstrumentation().targetContext\n    private val view = EpitrochoidProgressView(context)\n\n    @Test\n    fun hasHoleDisabled() {\n        view.hasHole = true\n        assertThat(view.hasHole).isFalse()\n    }\n}\n"
  },
  {
    "path": "lemniscate/src/test/java/com/vlad1m1r/lemniscate/roulette/HypotrochoidProgressViewTest.kt",
    "content": "package com.vlad1m1r.lemniscate.roulette\n\nimport android.os.Build\nimport androidx.test.platform.app.InstrumentationRegistry\nimport com.google.common.truth.Truth.assertThat\nimport org.mockito.kotlin.*\nimport com.vlad1m1r.lemniscate.testutils.TestConstants.DELTA\nimport com.vlad1m1r.lemniscate.testutils.isPeriodic\nimport com.vlad1m1r.lemniscate.testutils.setupDefaultMock\nimport org.junit.Before\nimport org.junit.Test\nimport org.junit.runner.RunWith\nimport org.robolectric.RobolectricTestRunner\nimport org.robolectric.annotation.Config\nimport kotlin.math.PI\n\nclass HypotrochoidProgressViewTest {\n    private val view = mock<HypotrochoidProgressView>()\n\n    @Before\n    fun setUp() {\n        view.setupDefaultMock()\n        doCallRealMethod().whenever(view).radiusDiff\n        doCallRealMethod().whenever(view).sizeFactor\n    }\n\n    @Test\n    fun getGraphX() {\n        assertThat(view.getGraphX(0.0f)).isWithin(DELTA).of(16.666666f)\n        assertThat(view.getGraphX(0.1f)).isWithin(DELTA).of(16.832361f)\n        assertThat(view.getGraphX(0.5f)).isWithin(DELTA).of(20.247713f)\n        assertThat(view.getGraphX(1.0f)).isWithin(DELTA).of(24.945856f)\n        assertThat(view.getGraphX(PI.toFloat())).isWithin(DELTA).of(-50.0f)\n        assertThat(view.getGraphX(2.0f)).isWithin(DELTA).of(-2.9775007f)\n        assertThat(view.getGraphX(2 * PI.toFloat())).isWithin(DELTA).of(16.666666f)\n    }\n\n    @Test\n    fun getGraphY() {\n        assertThat(view.getGraphY(0.0f)).isWithin(DELTA).of(0.0f)\n        assertThat(view.getGraphY(0.1f)).isWithin(DELTA).of(6.638936f)\n        assertThat(view.getGraphY(0.5f)).isWithin(DELTA).of(30.005367f)\n        assertThat(view.getGraphY(1.0f)).isWithin(DELTA).of(43.203987f)\n        assertThat(view.getGraphY(PI.toFloat())).isWithin(DELTA).of(0.0f)\n        assertThat(view.getGraphY(2.0f)).isWithin(DELTA).of(17.696539f)\n        assertThat(view.getGraphY(2 * PI.toFloat())).isWithin(DELTA).of(0.0f)\n    }\n\n    @Test\n    fun isPeriodic() {\n        view.isPeriodic(2 * PI.toFloat())\n    }\n}\n\n@RunWith(RobolectricTestRunner::class)\n@Config(sdk = [Build.VERSION_CODES.P])\nclass HypotrochoidProgressViewHasHoleTest {\n\n    val context = InstrumentationRegistry.getInstrumentation().targetContext\n    private val view = HypotrochoidProgressView(context)\n\n    @Test\n    fun hasHoleDisabled() {\n        view.hasHole = true\n        assertThat(view.hasHole).isFalse()\n    }\n}\n"
  },
  {
    "path": "lemniscate/src/test/java/com/vlad1m1r/lemniscate/roulette/scribble/RoundScribbleProgressViewTest.kt",
    "content": "package com.vlad1m1r.lemniscate.roulette.scribble\n\nimport android.os.Build\nimport androidx.test.platform.app.InstrumentationRegistry\nimport com.google.common.truth.Truth.assertThat\nimport org.mockito.kotlin.*\nimport com.vlad1m1r.lemniscate.testutils.TestConstants.DELTA\nimport com.vlad1m1r.lemniscate.testutils.isPeriodic\nimport com.vlad1m1r.lemniscate.testutils.setupDefaultMock\nimport org.junit.Before\nimport org.junit.Test\nimport org.junit.runner.RunWith\nimport org.robolectric.RobolectricTestRunner\nimport org.robolectric.annotation.Config\nimport kotlin.math.PI\n\nclass RoundScribbleProgressViewTest {\n\n    private val view = mock<RoundScribbleProgressView>()\n\n    @Before\n    fun setUp() {\n        view.setupDefaultMock()\n        doCallRealMethod().whenever(view).radiusSum\n        doCallRealMethod().whenever(view).sizeFactor\n    }\n\n    @Test\n    fun getGraphX() {\n        assertThat(view.getGraphX(0.0f)).isWithin(DELTA).of(30.0f)\n        assertThat(view.getGraphX(0.1f)).isWithin(DELTA).of(30.589556f)\n        assertThat(view.getGraphX(0.5f)).isWithin(DELTA).of(39.26477f)\n        assertThat(view.getGraphX(1.0f)).isWithin(DELTA).of(28.14853f)\n        assertThat(view.getGraphX(PI.toFloat())).isWithin(DELTA).of(-50.0f)\n        assertThat(view.getGraphX(2.0f)).isWithin(DELTA).of(-15.190873f)\n        assertThat(view.getGraphX(2 * PI.toFloat())).isWithin(DELTA).of(30.0f)\n    }\n\n    @Test\n    fun getGraphY() {\n        assertThat(view.getGraphY(0.0f)).isWithin(DELTA).of(40.0f)\n        assertThat(view.getGraphY(0.1f)).isWithin(DELTA).of(35.905983f)\n        assertThat(view.getGraphY(0.5f)).isWithin(DELTA).of(26.010328f)\n        assertThat(view.getGraphY(1.0f)).isWithin(DELTA).of(29.180117f)\n        assertThat(view.getGraphY(PI.toFloat())).isWithin(DELTA).of(-40.0f)\n        assertThat(view.getGraphY(2.0f)).isWithin(DELTA).of(-26.539455f)\n        assertThat(view.getGraphY(2 * PI.toFloat())).isWithin(DELTA).of(40.0f)\n    }\n\n    @Test\n    fun isPeriodic() {\n        view.isPeriodic(2 * PI.toFloat())\n    }\n}\n\n@RunWith(RobolectricTestRunner::class)\n@Config(sdk = [Build.VERSION_CODES.P])\nclass RoundScribbleProgressViewHasHoleTest {\n\n    val context = InstrumentationRegistry.getInstrumentation().targetContext\n    private val view = RoundScribbleProgressView(context)\n\n    @Test\n    fun hasHoleDisabled() {\n        view.hasHole = true\n        assertThat(view.hasHole).isFalse()\n    }\n}\n"
  },
  {
    "path": "lemniscate/src/test/java/com/vlad1m1r/lemniscate/roulette/scribble/ScribbleProgressViewTest.kt",
    "content": "package com.vlad1m1r.lemniscate.roulette.scribble\n\nimport android.os.Build\nimport androidx.test.platform.app.InstrumentationRegistry\nimport com.google.common.truth.Truth.assertThat\nimport org.mockito.kotlin.*\nimport com.vlad1m1r.lemniscate.testutils.TestConstants.DELTA\nimport com.vlad1m1r.lemniscate.testutils.isPeriodic\nimport com.vlad1m1r.lemniscate.testutils.setupDefaultMock\nimport org.junit.Before\nimport org.junit.Test\n\nimport org.junit.runner.RunWith\nimport org.mockito.junit.MockitoJUnitRunner\nimport org.robolectric.RobolectricTestRunner\nimport org.robolectric.annotation.Config\nimport kotlin.math.PI\n\n@RunWith(MockitoJUnitRunner::class)\nclass ScribbleProgressViewTest {\n\n    private val view = mock<ScribbleProgressView>()\n\n    @Before\n    fun setUp() {\n        view.setupDefaultMock()\n        doCallRealMethod().whenever(view).radiusSum\n        doCallRealMethod().whenever(view).sizeFactor\n    }\n\n    @Test\n    fun getGraphX() {\n        assertThat(view.getGraphX(0.0f)).isWithin(DELTA).of(30.0f)\n        assertThat(view.getGraphX(0.1f)).isWithin(DELTA).of(30.589556f)\n        assertThat(view.getGraphX(0.5f)).isWithin(DELTA).of(39.26477f)\n        assertThat(view.getGraphX(1.0f)).isWithin(DELTA).of(28.14853f)\n        assertThat(view.getGraphX(PI.toFloat())).isWithin(DELTA).of(-50.0f)\n        assertThat(view.getGraphX(2.0f)).isWithin(DELTA).of(-15.190873f)\n        assertThat(view.getGraphX(2 * PI.toFloat())).isWithin(DELTA).of(30.0f)\n    }\n\n    @Test\n    fun getGraphY() {\n        assertThat(view.getGraphY(0.0f)).isWithin(DELTA).of(-10.0f)\n        assertThat(view.getGraphY(0.1f)).isWithin(DELTA).of(-5.217273f)\n        assertThat(view.getGraphY(0.5f)).isWithin(DELTA).of(23.33849f)\n        assertThat(view.getGraphY(1.0f)).isWithin(DELTA).of(40.195274f)\n        assertThat(view.getGraphY(PI.toFloat())).isWithin(DELTA).of(-10.0f)\n        assertThat(view.getGraphY(2.0f)).isWithin(DELTA).of(37.826897f)\n        assertThat(view.getGraphY(2 * PI.toFloat())).isWithin(DELTA).of(-10.0f)\n    }\n\n    @Test\n    fun isPeriodic() {\n        view.isPeriodic(2 * PI.toFloat())\n    }\n}\n\n@RunWith(RobolectricTestRunner::class)\n@Config(sdk = [Build.VERSION_CODES.P])\nclass ScribbleProgressViewHasHoleTest {\n\n    val context = InstrumentationRegistry.getInstrumentation().targetContext\n    private val view = ScribbleProgressView(context)\n\n    @Test\n    fun hasHoleDisabled() {\n        view.hasHole = true\n        assertThat(view.hasHole).isFalse()\n    }\n}\n"
  },
  {
    "path": "lemniscate/src/test/java/com/vlad1m1r/lemniscate/roulette/settings/RouletteCurveSettingsParcelableTest.kt",
    "content": "package com.vlad1m1r.lemniscate.roulette.settings\n\nimport android.os.Build\nimport android.os.Parcel\nimport com.google.common.truth.Truth.assertThat\nimport com.vlad1m1r.lemniscate.testutils.isEqualTo\nimport org.junit.Before\nimport org.junit.Test\nimport org.junit.runner.RunWith\nimport org.robolectric.RobolectricTestRunner\nimport org.robolectric.annotation.Config\n\n@RunWith(RobolectricTestRunner::class)\n@Config(sdk = [Build.VERSION_CODES.P])\nclass RouletteCurveSettingsParcelableTest {\n\n    private lateinit var rouletteCurveSettings: RouletteCurveSettings\n\n    @Before\n    fun setUp() {\n        rouletteCurveSettings = RouletteCurveSettings()\n        rouletteCurveSettings.distanceFromCenter = 0.24f\n        rouletteCurveSettings.numberOfCycles = 0.83f\n        rouletteCurveSettings.radiusFixed = 1.41f\n        rouletteCurveSettings.radiusMoving = 3.25f\n    }\n\n    @Test\n    fun parcelable() {\n        val parcel = Parcel.obtain()\n        rouletteCurveSettings.writeToParcel(parcel, 0)\n        parcel.setDataPosition(0)\n\n        val copy = RouletteCurveSettings(parcel)\n        parcel.recycle()\n\n        assertThat(rouletteCurveSettings.isEqualTo(copy)).isTrue()\n    }\n}\n"
  },
  {
    "path": "lemniscate/src/test/java/com/vlad1m1r/lemniscate/testutils/CurveTestUtils.kt",
    "content": "package com.vlad1m1r.lemniscate.testutils\n\nimport com.google.common.truth.Truth\nimport org.mockito.kotlin.*\nimport com.vlad1m1r.lemniscate.base.BaseCurveProgressView\nimport com.vlad1m1r.lemniscate.roulette.BaseRouletteProgressView\n\nfun BaseCurveProgressView.isPeriodic(period: Float) {\n    for (i in 1..10) {\n        val random = Math.random().toFloat()\n        Truth.assertThat(getGraphX(random)).isWithin(TestConstants.DELTA).of(getGraphX(random + period))\n        Truth.assertThat(getGraphY(random)).isWithin(TestConstants.DELTA).of(getGraphY(random + period))\n    }\n}\n\nfun BaseRouletteProgressView.setupDefaultMock() {\n    doCallRealMethod().whenever(this).getGraphX(any())\n    doCallRealMethod().whenever(this).getGraphY(any())\n\n    whenever(this.size).thenReturn(100f)\n    whenever(this.radiusFixed).thenReturn(3f)\n    whenever(this.radiusMoving).thenReturn(1f)\n    whenever(this.distanceFromCenter).thenReturn(1f)\n}\n\nfun BaseCurveProgressView.setupDefaultMock() {\n    doCallRealMethod().whenever(this).getGraphX(any())\n    doCallRealMethod().whenever(this).getGraphY(any())\n    whenever(this.size).thenReturn(100f)\n}\n"
  },
  {
    "path": "lemniscate/src/test/java/com/vlad1m1r/lemniscate/testutils/EqualUtils.kt",
    "content": "package com.vlad1m1r.lemniscate.testutils\n\nimport com.vlad1m1r.lemniscate.base.models.LineLength\nimport com.vlad1m1r.lemniscate.base.settings.AnimationSettings\nimport com.vlad1m1r.lemniscate.base.settings.CurveSettings\nimport com.vlad1m1r.lemniscate.roulette.settings.RouletteCurveSettings\n\nfun AnimationSettings.isEqualTo(animationSettings: AnimationSettings): Boolean {\n    return this.duration == animationSettings.duration &&\n            this.startingPointOnCurve == animationSettings.startingPointOnCurve\n}\n\nfun CurveSettings.isEqualTo(curveSettings: CurveSettings): Boolean {\n    return this.hasHole == curveSettings.hasHole &&\n            this.color == curveSettings.color &&\n            this.precision == curveSettings.precision &&\n            this.strokeWidth == curveSettings.strokeWidth &&\n            this.lineLength.isEqualTo(curveSettings.lineLength)\n}\n\nfun LineLength.isEqualTo(lineLength: LineLength): Boolean {\n    return this.lineMinLength == lineLength.lineMinLength &&\n            this.lineMaxLength == lineLength.lineMaxLength\n}\n\nfun RouletteCurveSettings.isEqualTo(rouletteCurveSettings: RouletteCurveSettings): Boolean {\n    return this.distanceFromCenter == rouletteCurveSettings.distanceFromCenter &&\n            this.numberOfCycles == rouletteCurveSettings.numberOfCycles &&\n            this.radiusFixed == rouletteCurveSettings.radiusFixed &&\n            this.radiusMoving == rouletteCurveSettings.radiusMoving\n}\n"
  },
  {
    "path": "lemniscate/src/test/java/com/vlad1m1r/lemniscate/testutils/TestConstants.kt",
    "content": "package com.vlad1m1r.lemniscate.testutils\n\nobject TestConstants {\n    const val DELTA: Float = 0.001f\n}\n"
  },
  {
    "path": "lemniscate/src/test/java/com/vlad1m1r/lemniscate/testutils/TestLayoutInflater.kt",
    "content": "package com.vlad1m1r.lemniscate.testutils\n\nimport android.content.Context\nimport android.view.LayoutInflater\nimport android.view.View\nimport android.view.ViewGroup\n\nclass TestLayoutInflater internal constructor(context: Context) : LayoutInflater(context) {\n    internal var resId: Int = 0\n        private set\n    internal var root: ViewGroup? = null\n        private set\n\n    override fun inflate(resource: Int, root: ViewGroup?): View? {\n        this.resId = resource\n        this.root = root\n        return null\n    }\n\n    override fun inflate(resource: Int, root: ViewGroup?, attachToRoot: Boolean): View? {\n        this.resId = resource\n        this.root = root\n        return null\n    }\n\n    override fun cloneInContext(newContext: Context): LayoutInflater? {\n        return null\n    }\n}\n"
  },
  {
    "path": "lemniscate/src/test/java/com/vlad1m1r/lemniscate/utils/CurveUtilsTest.kt",
    "content": "package com.vlad1m1r.lemniscate.utils\n\nimport com.google.common.truth.Truth.assertThat\nimport com.vlad1m1r.lemniscate.base.models.Point\nimport org.junit.Test\n\nclass CurveUtilsTest {\n\n    val point = Point(5f, 0f, 1f, 10f)\n\n    @Test\n    fun returnPoint_whenPointIsNotInHole() {\n        assertThat(CurveUtils.checkPointForHole(point, 0.2f, 10f)).isSameInstanceAs(point)\n    }\n\n    @Test\n    fun returnNull_whenPointIsInHole() {\n        assertThat(CurveUtils.checkPointForHole(point, 5.0f, 10f)).isNull()\n    }\n\n    @Test\n    fun returnNull_whenPointIsNull() {\n        assertThat(CurveUtils.checkPointForHole(null, 0.2f, 10f)).isNull()\n    }\n}\n"
  },
  {
    "path": "lemniscate/src/test/resources/mockito-extensions/org.mockito.plugins.MockMaker",
    "content": "mock-maker-inline"
  },
  {
    "path": "remote_data/legal/privacy_policy.html",
    "content": "<!DOCTYPE html>\n<html>\n<head>\n    <meta charset='utf-8'>\n    <meta name='viewport' content='width=device-width'>\n    <title>Privacy Policy</title>\n    <style> body { font-family: 'Helvetica Neue', Helvetica, Arial, sans-serif; padding:1em; } </style>\n</head>\n<body>\n<strong>Privacy Policy</strong> <p>\n    Vladimir Jovanovic built the Lemniscate app as\n    an Open Source app. This SERVICE is provided by\n    Vladimir Jovanovic at no cost and is intended for use as\n    is.\n</p> <p>\n    This page is used to inform visitors regarding my\n    policies with the collection, use, and disclosure of Personal\n    Information if anyone decided to use my Service.\n</p> <p>\n    If you choose to use my Service, then you agree to\n    the collection and use of information in relation to this\n    policy. The Personal Information that I collect is\n    used for providing and improving the Service. I will not use or share your information with\n    anyone except as described in this Privacy Policy.\n</p> <p>\n    The terms used in this Privacy Policy have the same meanings\n    as in our Terms and Conditions, which are accessible at\n    Lemniscate unless otherwise defined in this Privacy Policy.\n</p> <p><strong>Information Collection and Use</strong></p> <p>\n    For a better experience, while using our Service, I\n    may require you to provide us with certain personally\n    identifiable information. The information that\n    I request will be retained on your device and is not collected by me in any way.\n</p> <!----> <p><strong>Log Data</strong></p> <p>\n    I want to inform you that whenever you\n    use my Service, in a case of an error in the app\n    I collect data and information (through third-party\n    products) on your phone called Log Data. This Log Data may\n    include information such as your device Internet Protocol\n    (“IP”) address, device name, operating system version, the\n    configuration of the app when utilizing my Service,\n    the time and date of your use of the Service, and other\n    statistics.\n</p> <p><strong>Cookies</strong></p> <p>\n    Cookies are files with a small amount of data that are\n    commonly used as anonymous unique identifiers. These are sent\n    to your browser from the websites that you visit and are\n    stored on your device's internal memory.\n</p> <p>\n    This Service does not use these “cookies” explicitly. However,\n    the app may use third-party code and libraries that use\n    “cookies” to collect information and improve their services.\n    You have the option to either accept or refuse these cookies\n    and know when a cookie is being sent to your device. If you\n    choose to refuse our cookies, you may not be able to use some\n    portions of this Service.\n</p> <p><strong>Service Providers</strong></p> <p>\n    I may employ third-party companies and\n    individuals due to the following reasons:\n</p> <ul><li>To facilitate our Service;</li> <li>To provide the Service on our behalf;</li> <li>To perform Service-related services; or</li> <li>To assist us in analyzing how our Service is used.</li></ul> <p>\n    I want to inform users of this Service\n    that these third parties have access to their Personal\n    Information. The reason is to perform the tasks assigned to\n    them on our behalf. However, they are obligated not to\n    disclose or use the information for any other purpose.\n</p> <p><strong>Security</strong></p> <p>\n    I value your trust in providing us your\n    Personal Information, thus we are striving to use commercially\n    acceptable means of protecting it. But remember that no method\n    of transmission over the internet, or method of electronic\n    storage is 100% secure and reliable, and I cannot\n    guarantee its absolute security.\n</p> <p><strong>Links to Other Sites</strong></p> <p>\n    This Service may contain links to other sites. If you click on\n    a third-party link, you will be directed to that site. Note\n    that these external sites are not operated by me.\n    Therefore, I strongly advise you to review the\n    Privacy Policy of these websites. I have\n    no control over and assume no responsibility for the content,\n    privacy policies, or practices of any third-party sites or\n    services.\n</p> <p><strong>Children’s Privacy</strong></p> <!----> <div><p>\n    I do not knowingly collect personally\n    identifiable information from children. I\n    encourage all children to never submit any personally\n    identifiable information through\n    the Application and/or Services.\n    I encourage parents and legal guardians to monitor\n    their children's Internet usage and to help enforce this Policy by instructing\n    their children never to provide personally identifiable information through the Application and/or Services without their permission. If you have reason to believe that a child\n    has provided personally identifiable information to us through the Application and/or Services,\n    please contact us. You must also be at least 16 years of age to consent to the processing\n    of your personally identifiable information in your country (in some countries we may allow your parent\n    or guardian to do so on your behalf).\n</p></div> <p><strong>Changes to This Privacy Policy</strong></p> <p>\n    I may update our Privacy Policy from\n    time to time. Thus, you are advised to review this page\n    periodically for any changes. I will\n    notify you of any changes by posting the new Privacy Policy on\n    this page.\n</p> <p>This policy is effective as of 2022-06-18</p> <p><strong>Contact Us</strong></p> <p>\n    If you have any questions or suggestions about my\n    Privacy Policy, do not hesitate to contact me at write@vladimirj.dev.\n</p> <p>This privacy policy page was created at <a href=\"https://privacypolicytemplate.net\" target=\"_blank\" rel=\"noopener noreferrer\">privacypolicytemplate.net </a>and modified/generated by <a href=\"https://app-privacy-policy-generator.nisrulz.com/\" target=\"_blank\" rel=\"noopener noreferrer\">App Privacy Policy Generator</a></p>\n</body>\n</html>\n"
  },
  {
    "path": "remote_data/legal/terms_and_conditions.html",
    "content": "<!DOCTYPE html>\n<html>\n<head>\n    <meta charset='utf-8'>\n    <meta name='viewport' content='width=device-width'>\n    <title>Terms &amp; Conditions</title>\n    <style> body { font-family: 'Helvetica Neue', Helvetica, Arial, sans-serif; padding:1em; } </style>\n</head>\n<body>\n<strong>Terms &amp; Conditions</strong> <p>\n    By downloading or using the app, these terms will\n    automatically apply to you – you should make sure therefore\n    that you read them carefully before using the app. You’re not\n    allowed to copy or modify the app, any part of the app, or\n    our trademarks in any way. You’re not allowed to attempt to\n    extract the source code of the app, and you also shouldn’t try\n    to translate the app into other languages or make derivative\n    versions. The app itself, and all the trademarks, copyright,\n    database rights, and other intellectual property rights related\n    to it, still belong to Vladimir Jovanovic.\n</p> <p>\n    Vladimir Jovanovic is committed to ensuring that the app is\n    as useful and efficient as possible. For that reason, we\n    reserve the right to make changes to the app or to charge for\n    its services, at any time and for any reason. We will never\n    charge you for the app or its services without making it very\n    clear to you exactly what you’re paying for.\n</p> <p>\n    The Lemniscate app stores and processes personal data that\n    you have provided to us, to provide my\n    Service. It’s your responsibility to keep your phone and\n    access to the app secure. We therefore recommend that you do\n    not jailbreak or root your phone, which is the process of\n    removing software restrictions and limitations imposed by the\n    official operating system of your device. It could make your\n    phone vulnerable to malware/viruses/malicious programs,\n    compromise your phone’s security features and it could mean\n    that the Lemniscate app won’t work properly or at all.\n</p> <!----> <p>\n    You should be aware that there are certain things that\n    Vladimir Jovanovic will not take responsibility for. Certain\n    functions of the app will require the app to have an active\n    internet connection. The connection can be Wi-Fi or provided\n    by your mobile network provider, but Vladimir Jovanovic\n    cannot take responsibility for the app not working at full\n    functionality if you don’t have access to Wi-Fi, and you don’t\n    have any of your data allowance left.\n</p> <p></p> <p>\n    If you’re using the app outside of an area with Wi-Fi, you\n    should remember that the terms of the agreement with your\n    mobile network provider will still apply. As a result, you may\n    be charged by your mobile provider for the cost of data for\n    the duration of the connection while accessing the app, or\n    other third-party charges. In using the app, you’re accepting\n    responsibility for any such charges, including roaming data\n    charges if you use the app outside of your home territory\n    (i.e. region or country) without turning off data roaming. If\n    you are not the bill payer for the device on which you’re\n    using the app, please be aware that we assume that you have\n    received permission from the bill payer for using the app.\n</p> <p>\n    Along the same lines, Vladimir Jovanovic cannot always take\n    responsibility for the way you use the app i.e. You need to\n    make sure that your device stays charged – if it runs out of\n    battery and you can’t turn it on to avail the Service,\n    Vladimir Jovanovic cannot accept responsibility.\n</p> <p>\n    With respect to Vladimir Jovanovic’s responsibility for your\n    use of the app, when you’re using the app, it’s important to\n    bear in mind that although we endeavor to ensure that it is\n    updated and correct at all times, we do rely on third parties\n    to provide information to us so that we can make it available\n    to you. Vladimir Jovanovic accepts no liability for any\n    loss, direct or indirect, you experience as a result of\n    relying wholly on this functionality of the app.\n</p> <p>\n    At some point, we may wish to update the app. The app is\n    currently available on Android – the requirements for the\n    system(and for any additional systems we\n    decide to extend the availability of the app to) may change,\n    and you’ll need to download the updates if you want to keep\n    using the app. Vladimir Jovanovic does not promise that it\n    will always update the app so that it is relevant to you\n    and/or works with the Android version that you have\n    installed on your device. However, you promise to always\n    accept updates to the application when offered to you, We may\n    also wish to stop providing the app, and may terminate use of\n    it at any time without giving notice of termination to you.\n    Unless we tell you otherwise, upon any termination, (a) the\n    rights and licenses granted to you in these terms will end;\n    (b) you must stop using the app, and (if needed) delete it\n    from your device.\n</p> <p><strong>Changes to This Terms and Conditions</strong></p> <p>\n    I may update our Terms and Conditions\n    from time to time. Thus, you are advised to review this page\n    periodically for any changes. I will\n    notify you of any changes by posting the new Terms and\n    Conditions on this page.\n</p> <p>\n    These terms and conditions are effective as of 2022-06-18\n</p> <p><strong>Contact Us</strong></p> <p>\n    If you have any questions or suggestions about my\n    Terms and Conditions, do not hesitate to contact me\n    at write@vladimirj.dev.\n</p> <p>This Terms and Conditions page was generated by <a href=\"https://app-privacy-policy-generator.nisrulz.com/\" target=\"_blank\" rel=\"noopener noreferrer\">App Privacy Policy Generator</a></p>\n</body>\n</html>\n"
  },
  {
    "path": "sample/.gitignore",
    "content": "/build\n"
  },
  {
    "path": "sample/build.gradle",
    "content": "apply plugin: 'com.android.application'\napply plugin: 'kotlin-android'\n\nandroid {\n    namespace \"com.vlad1m1r.lemniscate.sample\"\n\n    defaultConfig {\n        applicationId \"com.vlad1m1r.lemniscate.sample\"\n        minSdkVersion Versions.sample_min_sdk\n        targetSdkVersion Versions.target_sdk\n        compileSdk Versions.compile_sdk\n        versionCode Versions.sample_version_code\n        versionName Versions.sample_version_name\n    }\n    buildTypes {\n        release {\n            minifyEnabled false\n            proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-rules.pro'\n        }\n    }\n    compileOptions {\n        sourceCompatibility JavaVersion.VERSION_17\n        targetCompatibility JavaVersion.VERSION_17\n    }\n    kotlinOptions {\n        jvmTarget = JavaVersion.VERSION_17.toString()\n    }\n    buildFeatures {\n        viewBinding true\n    }\n}\n\ndependencies {\n    implementation Deps.appcompat\n    implementation Deps.circleindicator\n    implementation Deps.kotlin_stdlib\n\n    implementation project(':lemniscate')\n}\n"
  },
  {
    "path": "sample/proguard-rules.pro",
    "content": "# Add project specific ProGuard rules here.\n# By default, the flags in this file are appended to flags specified\n# in /Users/vladimirjovanovic/Library/Android/sdk/tools/proguard/proguard-android.txt\n# You can edit the include path and order by changing the proguardFiles\n# directive in build.gradle.\n#\n# For more details, see\n#   http://developer.android.com/guide/developing/tools/proguard.html\n\n# Add any project specific keep options here:\n\n# If your project uses WebView with JS, uncomment the following\n# and specify the fully qualified class name to the JavaScript interface\n# class:\n#-keepclassmembers class fqcn.of.javascript.interface.for.webview {\n#   public *;\n#}\n"
  },
  {
    "path": "sample/src/main/AndroidManifest.xml",
    "content": "<?xml version=\"1.0\" encoding=\"utf-8\"?>\n<manifest xmlns:android=\"http://schemas.android.com/apk/res/android\"\n          package=\"com.vlad1m1r.lemniscate.sample\">\n\n    <application\n        android:allowBackup=\"true\"\n        android:icon=\"@mipmap/ic_launcher\"\n        android:roundIcon=\"@mipmap/ic_launcher_round\"\n        android:label=\"@string/app_name\"\n        android:supportsRtl=\"true\"\n        android:theme=\"@style/AppTheme\">\n        <activity\n            android:name=\".MainActivity\"\n            android:exported=\"true\">\n            <intent-filter>\n                <action android:name=\"android.intent.action.MAIN\"/>\n                <category android:name=\"android.intent.category.LAUNCHER\"/>\n            </intent-filter>\n        </activity>\n        <activity\n            android:name=\".PresentationActivity\">\n            <meta-data\n                android:name=\"android.support.PARENT_ACTIVITY\"\n                android:value=\".MainActivity\" />\n        </activity>\n    </application>\n</manifest>"
  },
  {
    "path": "sample/src/main/java/com/vlad1m1r/lemniscate/sample/CurveData.kt",
    "content": "/*\n * Copyright 2016 Vladimir Jovanovic\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 */\n\npackage com.vlad1m1r.lemniscate.sample\n\nimport android.os.Parcel\nimport android.os.Parcelable\n\nclass CurveData(var precision: Int = 200,\n                var strokeWidth: Float = 10.0f,\n                var sizeMultiplier: Float = 1.0f,\n                var lineMinLength: Float = 0.4f,\n                var lineMaxLength: Float = 0.8f,\n                var color: Int = 0,\n                var duration: Int = 1000,\n                var hasHole: Boolean = false,\n                var radiusFixed: Float = 4.0f,\n                var radiusMoving: Float = 1.0f,\n                var distanceFromCenter: Float = 3.0f,\n                var numberOfCycles: Int = 1) : Parcelable {\n\n    constructor(parcel: Parcel) : this(\n            parcel.readInt(),\n            parcel.readFloat(),\n            parcel.readFloat(),\n            parcel.readFloat(),\n            parcel.readFloat(),\n            parcel.readInt(),\n            parcel.readInt(),\n            parcel.readByte() != 0.toByte(),\n            parcel.readFloat(),\n            parcel.readFloat(),\n            parcel.readFloat(),\n            parcel.readInt())\n\n    override fun writeToParcel(parcel: Parcel, flags: Int) {\n        parcel.writeInt(precision)\n        parcel.writeFloat(strokeWidth)\n        parcel.writeFloat(sizeMultiplier)\n        parcel.writeFloat(lineMinLength)\n        parcel.writeFloat(lineMaxLength)\n        parcel.writeInt(color)\n        parcel.writeInt(duration)\n        parcel.writeByte(if (hasHole) 1 else 0)\n        parcel.writeFloat(radiusFixed)\n        parcel.writeFloat(radiusMoving)\n        parcel.writeFloat(distanceFromCenter)\n        parcel.writeInt(numberOfCycles)\n    }\n\n    override fun describeContents(): Int {\n        return 0\n    }\n\n    companion object CREATOR : Parcelable.Creator<CurveData> {\n        override fun createFromParcel(parcel: Parcel): CurveData {\n            return CurveData(parcel)\n        }\n\n        override fun newArray(size: Int): Array<CurveData?> {\n            return arrayOfNulls(size)\n        }\n    }\n}\n"
  },
  {
    "path": "sample/src/main/java/com/vlad1m1r/lemniscate/sample/FragmentCurve.kt",
    "content": "/*\n * Copyright 2016 Vladimir Jovanovic\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 */\n\npackage com.vlad1m1r.lemniscate.sample\n\nimport android.content.Context\nimport android.os.Bundle\nimport androidx.fragment.app.Fragment\nimport android.view.LayoutInflater\nimport android.view.View\nimport android.view.ViewGroup\nimport android.widget.LinearLayout\nimport android.widget.TextView\n\nimport com.vlad1m1r.lemniscate.BernoullisBowProgressView\nimport com.vlad1m1r.lemniscate.BernoullisProgressView\nimport com.vlad1m1r.lemniscate.BernoullisSharpProgressView\nimport com.vlad1m1r.lemniscate.GeronosProgressView\nimport com.vlad1m1r.lemniscate.base.BaseCurveProgressView\nimport com.vlad1m1r.lemniscate.funny.CannabisProgressView\nimport com.vlad1m1r.lemniscate.funny.HeartProgressView\nimport com.vlad1m1r.lemniscate.other.XProgressView\nimport com.vlad1m1r.lemniscate.roulette.EpitrochoidProgressView\nimport com.vlad1m1r.lemniscate.roulette.HypotrochoidProgressView\nimport com.vlad1m1r.lemniscate.roulette.scribble.RoundScribbleProgressView\nimport com.vlad1m1r.lemniscate.roulette.scribble.ScribbleProgressView\n\nclass FragmentCurve : Fragment() {\n\n    private var listener: OnViewCreated? = null\n\n    private var baseCurveProgressView: BaseCurveProgressView? = null\n\n    private lateinit var curveName: TextView\n    private lateinit var layoutViewHolder: LinearLayout\n\n    private var position: Int = 0\n\n    interface OnViewCreated {\n        fun onViewShown(position: Int, baseCurveProgressView: BaseCurveProgressView?)\n    }\n\n    override fun onCreate(savedInstanceState: Bundle?) {\n        super.onCreate(savedInstanceState)\n\n        if (savedInstanceState != null && savedInstanceState.containsKey(KEY_POSITION))\n            position = savedInstanceState.getInt(KEY_POSITION)\n\n        if (baseCurveProgressView == null) {\n            baseCurveProgressView = getViewForPosition(position).apply {\n                id = position\n                layoutParams = LinearLayout.LayoutParams(\n                        LinearLayout.LayoutParams.WRAP_CONTENT,\n                        LinearLayout.LayoutParams.WRAP_CONTENT)\n            }\n        }\n    }\n\n    override fun onCreateView(inflater: LayoutInflater, container: ViewGroup?, savedInstanceState: Bundle?): View? {\n        val root = inflater.inflate(R.layout.fragment_curve, container, false) as ViewGroup\n\n        curveName = root.findViewById(R.id.textCurveName)\n        layoutViewHolder = root.findViewById(R.id.layoutViewHolder)\n\n        (baseCurveProgressView?.parent as ViewGroup?)?.removeView(baseCurveProgressView)\n\n        layoutViewHolder.addView(baseCurveProgressView)\n\n        curveName.text = baseCurveProgressView?.javaClass?.simpleName\n\n        return root\n    }\n\n    private fun getViewForPosition(position: Int): BaseCurveProgressView {\n        when (position) {\n            0 -> return BernoullisProgressView(context!!)\n            1 -> return GeronosProgressView(context!!)\n            2 -> return BernoullisBowProgressView(context!!)\n            3 -> return BernoullisSharpProgressView(context!!)\n\n            4 -> return EpitrochoidProgressView(context!!)\n            5 -> return HypotrochoidProgressView(context!!)\n\n            6 -> return XProgressView(context!!)\n\n            7 -> return RoundScribbleProgressView(context!!)\n            8 -> return ScribbleProgressView(context!!)\n\n            9 -> return CannabisProgressView(context!!)\n            10 -> return HeartProgressView(context!!)\n            else -> return BernoullisProgressView(context!!)\n        }\n    }\n\n    override fun onAttach(context: Context) {\n        super.onAttach(context)\n        listener = context as OnViewCreated\n    }\n\n    override fun onResume() {\n        super.onResume()\n        listener?.onViewShown(position, baseCurveProgressView)\n    }\n\n    override fun onDetach() {\n        listener = null\n        super.onDetach()\n    }\n\n    override fun onSaveInstanceState(outState: Bundle) {\n        outState.putInt(KEY_POSITION, position)\n        super.onSaveInstanceState(outState)\n    }\n\n    companion object {\n\n        private const val KEY_POSITION = \"position\"\n\n        fun getInstance(fragmentsPosition: Int) =\n                FragmentCurve().apply {\n                    position = fragmentsPosition\n                    retainInstance = true\n                }\n    }\n}\n"
  },
  {
    "path": "sample/src/main/java/com/vlad1m1r/lemniscate/sample/FragmentSettings.kt",
    "content": "/*\n * Copyright 2016 Vladimir Jovanovic\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 */\n\npackage com.vlad1m1r.lemniscate.sample\n\nimport android.content.res.Resources\nimport android.os.Bundle\nimport android.view.LayoutInflater\nimport androidx.fragment.app.Fragment\nimport androidx.core.content.ContextCompat\nimport android.view.View\nimport android.view.ViewGroup\nimport android.widget.CompoundButton\nimport android.widget.SeekBar\n\nimport com.vlad1m1r.lemniscate.BernoullisBowProgressView\nimport com.vlad1m1r.lemniscate.BernoullisProgressView\nimport com.vlad1m1r.lemniscate.BernoullisSharpProgressView\nimport com.vlad1m1r.lemniscate.GeronosProgressView\nimport com.vlad1m1r.lemniscate.base.BaseCurveProgressView\nimport com.vlad1m1r.lemniscate.roulette.BaseRouletteProgressView\nimport com.vlad1m1r.lemniscate.sample.databinding.FragmentSettingsBinding\nimport kotlin.math.round\n\nclass FragmentSettings : Fragment(), SeekBar.OnSeekBarChangeListener, CompoundButton.OnCheckedChangeListener, View.OnClickListener {\n\n    private lateinit var curveData: CurveData\n    private var baseCurveProgressView: BaseCurveProgressView? = null\n\n    private var _binding: FragmentSettingsBinding? = null\n    private val binding get() = _binding!!\n\n    override fun onCreateView(\n        inflater: LayoutInflater, container: ViewGroup?,\n        savedInstanceState: Bundle?\n    ): View {\n        _binding = FragmentSettingsBinding.inflate(layoutInflater)\n        return binding.root\n    }\n\n    override fun onDestroyView() {\n        super.onDestroyView()\n        _binding = null\n    }\n\n    override fun onViewCreated(view: View, savedInstanceState: Bundle?) {\n        super.onViewCreated(view, savedInstanceState)\n        curveData = if(savedInstanceState != null && savedInstanceState.containsKey(\"curve_data\")) {\n            savedInstanceState.getParcelable(\"curve_data\")!!\n        } else {\n            CurveData(color = ContextCompat.getColor(requireContext(), R.color.picker_color_1))\n        }\n\n        setupViews()\n    }\n\n    private fun setupViews() {\n\n        binding.seekBarStrokeWidth.max = 50\n        binding.seekBarStrokeWidth.progress = curveData.strokeWidth.toInt()\n        binding.seekBarStrokeWidth.setOnSeekBarChangeListener(this)\n\n        binding.seekBarMaxLineLength.max = 99\n        binding.seekBarMaxLineLength.progress = round(100 * curveData.lineMaxLength).toInt() - 1\n        binding.seekBarMaxLineLength.setOnSeekBarChangeListener(this)\n\n        binding.seekBarSizeMultiplier.max = 15\n        binding.seekBarSizeMultiplier.progress = 5\n        binding.seekBarSizeMultiplier.setOnSeekBarChangeListener(this)\n\n        binding.seekBarMinLineLength.max = 99\n        binding. seekBarMinLineLength.progress = round(100 * curveData.lineMinLength).toInt() - 1\n        binding.seekBarMinLineLength.setOnSeekBarChangeListener(this)\n\n        binding.seekBarAnimationDuration.max = 199\n        binding.seekBarAnimationDuration.progress = curveData.duration / 10 - 1\n        binding.seekBarAnimationDuration.setOnSeekBarChangeListener(this)\n\n        binding.checkBoxHasHole.setOnCheckedChangeListener(this)\n\n        binding.checkBoxHasHole.isChecked = curveData.hasHole\n\n        binding.seekBarPrecision.max = 990\n        binding.seekBarPrecision.progress = curveData.precision\n        binding.seekBarPrecision.setOnSeekBarChangeListener(this)\n\n        binding.seekBarA.max = 10\n        binding.seekBarA.progress = (curveData.radiusFixed - 1).toInt()\n        binding.seekBarA.setOnSeekBarChangeListener(this)\n\n        binding.seekBarB.max = 10\n        binding.seekBarB.progress = (curveData.radiusMoving - 1).toInt()\n        binding.seekBarB.setOnSeekBarChangeListener(this)\n\n        binding.seekBarD.max = 10\n        binding.seekBarD.progress = (curveData.distanceFromCenter - 1).toInt()\n        binding.seekBarD.setOnSeekBarChangeListener(this)\n\n        binding.seekBarNumberOfCycles.max = 5\n        binding.seekBarNumberOfCycles.progress = curveData.numberOfCycles - 1\n        binding.seekBarNumberOfCycles.setOnSeekBarChangeListener(this)\n\n        binding.viewColor1.setOnClickListener(this)\n        binding.viewColor2.setOnClickListener(this)\n        binding.viewColor3.setOnClickListener(this)\n        binding.viewColor4.setOnClickListener(this)\n        binding.viewColor5.setOnClickListener(this)\n        binding.viewColor6.setOnClickListener(this)\n    }\n\n    fun setBaseCurveProgressView(baseCurveProgressView: BaseCurveProgressView) {\n        this.baseCurveProgressView = baseCurveProgressView\n\n        //Checkbox\n        binding.checkBoxHasHole.isEnabled = this.baseCurveProgressView is BernoullisProgressView ||\n                this.baseCurveProgressView is GeronosProgressView ||\n                this.baseCurveProgressView is BernoullisBowProgressView ||\n                this.baseCurveProgressView is BernoullisSharpProgressView\n\n        //Roulette params\n        if (this.baseCurveProgressView is BaseRouletteProgressView) {\n            binding.seekBarA.isEnabled = true\n            binding.seekBarB.isEnabled = true\n            binding.seekBarD.isEnabled = true\n            binding.seekBarNumberOfCycles!!.isEnabled = true\n        } else {\n            binding.seekBarA.isEnabled = false\n            binding.seekBarB.isEnabled = false\n            binding.seekBarD.isEnabled = false\n            binding.seekBarNumberOfCycles.isEnabled = false\n        }\n\n        invalidateView(this.baseCurveProgressView)\n        updateValues()\n    }\n\n    override fun onProgressChanged(seekBar: SeekBar, i: Int, fromUser: Boolean) {\n        when (seekBar.id) {\n            R.id.seekBarStrokeWidth -> curveData.strokeWidth = resources.dpToPx(i / 3.0f)\n            R.id.seekBarMaxLineLength -> if (i <  binding.seekBarMinLineLength.progress) {\n                binding.seekBarMaxLineLength.progress =  binding.seekBarMinLineLength.progress\n            } else\n                curveData.lineMaxLength = (i + 1) / 100.0f\n            R.id.seekBarMinLineLength -> if (i >  binding.seekBarMaxLineLength.progress) {\n                binding.seekBarMinLineLength.progress =  binding.seekBarMaxLineLength.progress\n            } else\n                curveData.lineMinLength = (i + 1) / 100.0f\n            R.id.seekBarSizeMultiplier -> curveData.sizeMultiplier = (i + 5) / 10.0f\n            R.id.seekBarAnimationDuration -> curveData.duration = (i + 1) * 10\n            R.id.seekBarPrecision -> curveData.precision = i + 10\n            R.id.seekBarA -> curveData.radiusFixed = (i + 1).toFloat()\n            R.id.seekBarB -> curveData.radiusMoving = (i + 1).toFloat()\n            R.id.seekBarD -> curveData.distanceFromCenter = (i + 1).toFloat()\n            R.id.seekBarNumberOfCycles -> curveData.numberOfCycles = i + 1\n        }\n        invalidateView(baseCurveProgressView)\n        updateValues()\n    }\n\n    private fun updateValues() {\n        binding.textStrokeWidth.text = curveData.strokeWidth.toString()\n        binding.textMaxLineLength.text = String.format(resources.getString(R.string.format_percentage), (curveData.lineMaxLength * 100).toInt())\n        binding.textMinLineLength.text = String.format(resources.getString(R.string.format_percentage), (curveData.lineMinLength * 100).toInt())\n        binding.textSizeMultiplier.text = curveData.sizeMultiplier.toString()\n        binding.textAnimationDuration.text = String.format(resources.getString(R.string.format_ms), curveData.duration)\n        binding.textPrecision.text = String.format(resources.getString(R.string.format_points), curveData.precision)\n    }\n\n    private fun invalidateView(baseCurveProgressView: BaseCurveProgressView?) {\n        baseCurveProgressView?.apply {\n            precision = curveData.precision\n            strokeWidth = curveData.strokeWidth\n            lineMaxLength = curveData.lineMaxLength\n            lineMinLength = curveData.lineMinLength\n            duration = curveData.duration\n            hasHole = curveData.hasHole\n            color = curveData.color\n            sizeMultiplier = curveData.sizeMultiplier\n\n            if (this is BaseRouletteProgressView) {\n                radiusFixed = curveData.radiusFixed\n                radiusMoving = curveData.radiusMoving\n                distanceFromCenter = curveData.distanceFromCenter\n\n                numberOfCycles = curveData.numberOfCycles.toFloat()\n            }\n        }\n    }\n\n    override fun onStartTrackingTouch(seekBar: SeekBar) {}\n\n    override fun onStopTrackingTouch(seekBar: SeekBar) {}\n\n    override fun onCheckedChanged(buttonView: CompoundButton, isChecked: Boolean) {\n        when (buttonView.id) {\n            R.id.checkBoxHasHole -> curveData.hasHole = isChecked\n        }\n        invalidateView(baseCurveProgressView)\n    }\n\n    fun applySettings(baseCurveProgressView: BaseCurveProgressView) {\n        invalidateView(baseCurveProgressView)\n    }\n\n    override fun onClick(v: View) {\n        when (v.id) {\n            R.id.viewColor1 -> curveData.color = ContextCompat.getColor(requireContext(), R.color.picker_color_1)\n            R.id.viewColor2 -> curveData.color = ContextCompat.getColor(requireContext(), R.color.picker_color_2)\n            R.id.viewColor3 -> curveData.color = ContextCompat.getColor(requireContext(), R.color.picker_color_3)\n            R.id.viewColor4 -> curveData.color = ContextCompat.getColor(requireContext(), R.color.picker_color_4)\n            R.id.viewColor5 -> curveData.color = ContextCompat.getColor(requireContext(), R.color.picker_color_5)\n            R.id.viewColor6 -> curveData.color = ContextCompat.getColor(requireContext(), R.color.picker_color_6)\n        }\n        invalidateView(baseCurveProgressView)\n    }\n\n    override fun onSaveInstanceState(outState: Bundle) {\n        super.onSaveInstanceState(outState)\n        outState.putParcelable(\"curve_data\", curveData)\n    }\n}\n\nfun Resources.dpToPx(dp: Float): Float {\n    return dp * this.displayMetrics.density\n}\n"
  },
  {
    "path": "sample/src/main/java/com/vlad1m1r/lemniscate/sample/MainActivity.kt",
    "content": "/*\n * Copyright 2016 Vladimir Jovanovic\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 */\n\npackage com.vlad1m1r.lemniscate.sample\n\nimport android.content.Intent\nimport android.net.Uri\nimport android.os.Bundle\nimport androidx.fragment.app.Fragment\nimport androidx.fragment.app.FragmentManager\nimport androidx.fragment.app.FragmentStatePagerAdapter\nimport androidx.viewpager.widget.ViewPager\nimport androidx.appcompat.app.AppCompatActivity\nimport androidx.appcompat.widget.Toolbar\nimport android.view.Menu\nimport android.view.MenuItem\nimport android.view.View\nimport androidx.core.view.ViewCompat\nimport androidx.core.view.WindowInsetsCompat\n\nimport com.vlad1m1r.lemniscate.base.BaseCurveProgressView\nimport me.relex.circleindicator.CircleIndicator\n\nprivate const val NUM_PAGES = 11\n\nclass MainActivity : AppCompatActivity(), FragmentCurve.OnViewCreated {\n\n    private lateinit var fragmentSettings: FragmentSettings\n    private lateinit var pager: ViewPager\n\n    private lateinit var pagerAdapter: CurvesPagerAdapter\n    private lateinit var toolbar: Toolbar\n\n\n    override fun onCreate(savedInstanceState: Bundle?) {\n        super.onCreate(savedInstanceState)\n        setContentView(R.layout.activity_main)\n\n        toolbar = findViewById(R.id.toolbar)\n        setSupportActionBar(toolbar)\n        fragmentSettings = supportFragmentManager.findFragmentById(R.id.fragment_settings) as FragmentSettings\n        pager = findViewById(R.id.viewPager)\n        pagerAdapter = CurvesPagerAdapter(supportFragmentManager)\n        val indicator = findViewById<CircleIndicator>(R.id.indicator)\n        pager.adapter = pagerAdapter\n        indicator.setViewPager(pager)\n\n        val rootView = findViewById<View>(R.id.root_view)\n        ViewCompat.setOnApplyWindowInsetsListener(rootView) { view, insets ->\n            val systemInsets = insets.getInsets(WindowInsetsCompat.Type.systemBars())\n            view.setPadding(0, systemInsets.top, 0, systemInsets.bottom)\n            insets\n        }\n    }\n\n    override fun onViewShown(position: Int, baseCurveProgressView: BaseCurveProgressView?) {\n        if (pager.currentItem == position) {\n            fragmentSettings.setBaseCurveProgressView(baseCurveProgressView!!)\n        }\n    }\n\n    override fun onCreateOptionsMenu(menu: Menu): Boolean {\n        menuInflater.inflate(R.menu.menu_main_activity, menu)\n        return true\n    }\n\n    override fun onOptionsItemSelected(item: MenuItem): Boolean {\n\n        when (item.itemId) {\n            R.id.action_github -> {\n                val browserIntent = Intent(Intent.ACTION_VIEW, Uri.parse(getString(R.string.url_github)))\n                startActivity(browserIntent)\n                return true\n            }\n            R.id.action_presentation -> {\n                startActivity(Intent(this, PresentationActivity::class.java))\n                return true\n            }\n        }\n        return super.onOptionsItemSelected(item)\n    }\n\n    private inner class CurvesPagerAdapter(fm: FragmentManager) : FragmentStatePagerAdapter(fm,  BEHAVIOR_RESUME_ONLY_CURRENT_FRAGMENT) {\n\n        override fun getItem(position: Int): Fragment {\n            return FragmentCurve.getInstance(position)\n        }\n\n        override fun getCount(): Int {\n            return NUM_PAGES\n        }\n    }\n}\n"
  },
  {
    "path": "sample/src/main/java/com/vlad1m1r/lemniscate/sample/PresentationActivity.kt",
    "content": "/*\n * Copyright 2016 Vladimir Jovanovic\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 */\n\npackage com.vlad1m1r.lemniscate.sample\n\nimport android.os.Bundle\nimport android.view.View\nimport androidx.appcompat.app.AppCompatActivity\nimport androidx.appcompat.widget.Toolbar\nimport androidx.core.view.ViewCompat\nimport androidx.core.view.WindowInsetsCompat\n\nclass PresentationActivity : AppCompatActivity() {\n\n    private lateinit var toolbar: Toolbar\n\n    override fun onCreate(savedInstanceState: Bundle?) {\n        super.onCreate(savedInstanceState)\n        setContentView(R.layout.activity_presentation)\n        toolbar = findViewById(R.id.toolbar)\n        setSupportActionBar(toolbar)\n        supportActionBar?.apply {\n            setTitle(R.string.screen_presentation)\n            setDisplayHomeAsUpEnabled(true)\n            setDisplayShowHomeEnabled(true)\n        }\n\n        val rootView = findViewById<View>(R.id.root_view)\n        ViewCompat.setOnApplyWindowInsetsListener(rootView) { view, insets ->\n            val systemInsets = insets.getInsets(WindowInsetsCompat.Type.systemBars())\n            view.setPadding(0, systemInsets.top, 0, systemInsets.bottom)\n            insets\n        }\n    }\n}\n\n"
  },
  {
    "path": "sample/src/main/res/drawable/indicator.xml",
    "content": "<?xml version=\"1.0\" encoding=\"utf-8\"?>\n<shape xmlns:android=\"http://schemas.android.com/apk/res/android\"\n    android:shape=\"oval\">\n    <solid\n        android:color=\"@color/color_primary\"/>\n</shape>\n"
  },
  {
    "path": "sample/src/main/res/drawable/indicator_selected.xml",
    "content": "<?xml version=\"1.0\" encoding=\"utf-8\"?>\n<shape xmlns:android=\"http://schemas.android.com/apk/res/android\"\n    android:shape=\"oval\">\n    <solid\n        android:color=\"@color/color_primary_dark\"/>\n</shape>\n"
  },
  {
    "path": "sample/src/main/res/drawable/shadow.xml",
    "content": "<?xml version=\"1.0\" encoding=\"utf-8\"?>\n<shape xmlns:android=\"http://schemas.android.com/apk/res/android\"\n       android:shape=\"rectangle\" >\n\n    <gradient\n        android:angle=\"90\"\n        android:startColor=\"@color/shadow_start\"\n        android:endColor=\"@color/shadow_end\"\n        android:type=\"linear\" />\n\n</shape>"
  },
  {
    "path": "sample/src/main/res/drawable-v26/ic_launcher_background.xml",
    "content": "<?xml version=\"1.0\" encoding=\"utf-8\"?>\n<vector\n    android:height=\"108dp\"\n    android:width=\"108dp\"\n    android:viewportHeight=\"108\"\n    android:viewportWidth=\"108\"\n    xmlns:android=\"http://schemas.android.com/apk/res/android\">\n    <path android:fillColor=\"@color/color_primary\"\n          android:pathData=\"M0,0h108v108h-108z\"/>\n</vector>\n"
  },
  {
    "path": "sample/src/main/res/drawable-v26/ic_launcher_foreground.xml",
    "content": "<vector xmlns:android=\"http://schemas.android.com/apk/res/android\"\n        android:width=\"108dp\"\n        android:height=\"108dp\"\n        android:viewportWidth=\"108.0\"\n        android:viewportHeight=\"108.0\">\n    <path\n        android:pathData=\"m85.76,70.11c0.16,-0.08 0.62,-0.33 0.48,-0.23 -0.26,0.18 -1.06,0.67 -0.82,0.47 0.33,-0.28 0.73,-0.46 1.09,-0.7 0.48,-0.32 0.95,-0.64 1.42,-0.97 2.12,-1.46 1.64,-1.13 3.87,-2.73 3.19,-2.37 6.3,-4.91 8.86,-7.97 1.8,-2.15 1.95,-2.62 3.38,-4.99 1.25,-2.45 2.19,-5.04 2.71,-7.75 0.16,-0.84 0.24,-1.69 0.36,-2.54 0,0 1.49,-0.73 1.49,-0.73v0c-0.12,0.85 -0.2,1.71 -0.36,2.56 -0.52,2.72 -1.47,5.34 -2.72,7.81 -1.42,2.38 -1.59,2.87 -3.38,5.03 -2.54,3.06 -5.63,5.6 -8.8,7.98 -2.36,1.71 -1.56,1.15 -3.78,2.7 -1.71,1.19 -3.43,2.38 -5.32,3.28 0,0 1.51,-1.2 1.51,-1.2z\"\n        android:strokeLineCap=\"square\"\n        android:fillAlpha=\"0\"\n        android:strokeColor=\"#00000000\"\n        android:fillColor=\"#000000\"\n        android:strokeWidth=\"1.51181102\"\n        android:strokeLineJoin=\"miter\"\n        android:strokeAlpha=\"0.5\"/>\n    <path\n        android:pathData=\"m101.76,107.99 l-27.78,-0.09 -45.61,-45.61 11.63,3.12 11.09,-8.09 50.68,50.68v0\"\n        android:strokeLineCap=\"butt\"\n        android:fillAlpha=\"0.14117648\"\n        android:strokeColor=\"#00000000\"\n        android:fillColor=\"#000000\"\n        android:strokeWidth=\"1\"\n        android:strokeLineJoin=\"miter\"\n        android:strokeAlpha=\"1\"/>\n    <path\n        android:pathData=\"m51.09,57.31 l-13.77,-13.77 -7.66,2.05 -3.13,11.68 6.97,6.97h9.72z\"\n        android:strokeLineCap=\"butt\"\n        android:fillAlpha=\"0.08058824\"\n        android:strokeColor=\"#00000000\"\n        android:fillColor=\"#000000\"\n        android:strokeWidth=\"1\"\n        android:strokeLineJoin=\"miter\"\n        android:strokeAlpha=\"1\"/>\n    <path\n        android:pathData=\"m56.79,50.81 l13.61,13.57 7.3,-1.93 3.23,-12.07 -8.08,-8.08 -10.91,2.92z\"\n        android:strokeLineCap=\"butt\"\n        android:fillAlpha=\"0.08058824\"\n        android:strokeColor=\"#00000000\"\n        android:fillColor=\"#000000\"\n        android:strokeWidth=\"1\"\n        android:strokeLineJoin=\"miter\"\n        android:strokeAlpha=\"1\"/>\n    <path\n        android:pathData=\"m70.4,64.38 l37.67,37.67v6.07l-6.31,-0.14 -64.44,-64.44 7.15,2.11 17.52,17.52z\"\n        android:strokeLineCap=\"butt\"\n        android:fillAlpha=\"0.08058824\"\n        android:strokeColor=\"#00000000\"\n        android:fillColor=\"#000000\"\n        android:strokeWidth=\"1\"\n        android:strokeLineJoin=\"miter\"\n        android:strokeAlpha=\"1\"/>\n    <path\n        android:pathData=\"m80.01,46.12 l27.98,27.98 0.09,27.95 -37.67,-37.67 8.52,-3.09 2.67,-9.96z\"\n        android:strokeLineCap=\"butt\"\n        android:fillAlpha=\"0.14117647\"\n        android:strokeColor=\"#00000000\"\n        android:fillColor=\"#000000\"\n        android:strokeWidth=\"1\"\n        android:strokeLineJoin=\"miter\"\n        android:strokeAlpha=\"1\"/>\n\n    <path\n        android:pathData=\"m70.11,41.31c-5.48,0 -9.58,3.84 -12.87,6.93l-0.36,0.36c-0.64,0.6 -0.67,1.6 -0.06,2.23 0.6,0.63 1.61,0.66 2.25,0.06l0.36,-0.36c3.18,-2.98 6.47,-6.07 10.68,-6.07 4.56,0 9.28,3.57 9.28,9.54 0,5.97 -4.72,9.54 -9.28,9.54C63.64,63.54 55.96,53.83 55.06,52.8 54.24,51.88 46.11,41.31 37.89,41.31 31.77,41.31 25.44,46.05 25.44,54c0,7.95 6.33,12.69 12.46,12.69 5.48,0 9.58,-3.84 12.87,-6.93l0.28,-0.26c0.64,-0.6 0.67,-1.6 0.06,-2.23 -0.6,-0.63 -1.61,-0.66 -2.25,-0.06l-0.28,0.27c-3.18,2.98 -6.47,6.07 -10.68,6.07 -4.56,0 -9.28,-3.57 -9.28,-9.54 0,-5.97 4.72,-9.54 9.28,-9.54 6.57,0 13.91,9.44 14.74,10.38C53.53,55.87 62,66.69 70.11,66.69 76.23,66.69 82.56,61.95 82.56,54c0,-7.95 -6.33,-12.69 -12.46,-12.69z\"\n        android:fillColor=\"#ffffff\"/>\n\n</vector>\n"
  },
  {
    "path": "sample/src/main/res/layout/activity_main.xml",
    "content": "<?xml version=\"1.0\" encoding=\"utf-8\"?>\n<LinearLayout xmlns:android=\"http://schemas.android.com/apk/res/android\"\n    xmlns:app=\"http://schemas.android.com/apk/res-auto\"\n    xmlns:tools=\"http://schemas.android.com/tools\"\n    android:id=\"@+id/root_view\"\n    android:layout_width=\"match_parent\"\n    android:layout_height=\"wrap_content\"\n    android:orientation=\"vertical\"\n    tools:context=\"com.vlad1m1r.lemniscate.sample.MainActivity\">\n\n    <include layout=\"@layout/toolbar\" />\n\n    <FrameLayout\n        android:layout_width=\"match_parent\"\n        android:layout_height=\"wrap_content\">\n\n        <androidx.viewpager.widget.ViewPager\n            android:id=\"@+id/viewPager\"\n            android:layout_width=\"wrap_content\"\n            android:layout_height=\"200dp\" />\n\n        <me.relex.circleindicator.CircleIndicator\n            android:id=\"@+id/indicator\"\n            android:layout_width=\"match_parent\"\n            android:layout_height=\"48dp\"\n            android:layout_gravity=\"bottom\"\n            app:ci_drawable=\"@drawable/indicator_selected\"\n            app:ci_drawable_unselected=\"@drawable/indicator\" />\n    </FrameLayout>\n\n    <View\n        android:layout_width=\"match_parent\"\n        android:layout_height=\"1dp\"\n        android:background=\"@color/divider\" />\n\n    <FrameLayout\n        android:layout_width=\"match_parent\"\n        android:layout_height=\"wrap_content\">\n\n        <fragment\n            android:id=\"@+id/fragment_settings\"\n            android:name=\"com.vlad1m1r.lemniscate.sample.FragmentSettings\"\n            android:layout_width=\"match_parent\"\n            android:layout_height=\"wrap_content\" />\n\n        <View\n            android:layout_width=\"match_parent\"\n            android:layout_height=\"5dp\"\n            android:layout_gravity=\"top\"\n            android:background=\"@drawable/shadow\" />\n    </FrameLayout>\n\n</LinearLayout>\n"
  },
  {
    "path": "sample/src/main/res/layout/activity_presentation.xml",
    "content": "<?xml version=\"1.0\" encoding=\"utf-8\"?>\n<FrameLayout\n    xmlns:android=\"http://schemas.android.com/apk/res/android\"\n    xmlns:app=\"http://schemas.android.com/apk/res-auto\"\n    android:id=\"@+id/root_view\"\n    android:layout_width=\"match_parent\"\n    android:layout_height=\"match_parent\">\n\n    <LinearLayout\n        android:layout_width=\"match_parent\"\n        android:layout_height=\"match_parent\"\n        android:gravity=\"center\"\n        android:orientation=\"horizontal\">\n\n        <LinearLayout\n            android:layout_width=\"wrap_content\"\n            android:layout_height=\"match_parent\"\n            android:layout_gravity=\"center\"\n            android:gravity=\"center\"\n            android:orientation=\"vertical\">\n\n            <com.vlad1m1r.lemniscate.BernoullisProgressView\n                android:layout_width=\"wrap_content\"\n                android:layout_height=\"wrap_content\"\n                android:layout_margin=\"@dimen/margin_normal\"\n                app:duration=\"1250\"\n                app:hasHole=\"true\"\n                app:lineColor=\"@color/color_primary\"\n                app:maxLineLength=\"0.8\"\n                app:minLineLength=\"0.8\"\n                app:precision=\"80\"\n                app:strokeWidth=\"5dp\" />\n\n            <com.vlad1m1r.lemniscate.roulette.EpitrochoidProgressView\n                android:layout_width=\"wrap_content\"\n                android:layout_height=\"wrap_content\"\n                android:layout_margin=\"@dimen/margin_normal\"\n                app:distanceFromCenter=\"1\"\n                app:duration=\"1250\"\n                app:hasHole=\"true\"\n                app:lineColor=\"@color/color_primary\"\n                app:maxLineLength=\"0.8\"\n                app:minLineLength=\"0.8\"\n                app:numberOfCycles=\"1\"\n                app:precision=\"150\"\n                app:radiusFixed=\"3\"\n                app:radiusMoving=\"1\"\n                app:strokeWidth=\"5dp\" />\n\n            <com.vlad1m1r.lemniscate.funny.HeartProgressView\n                android:layout_width=\"wrap_content\"\n                android:layout_height=\"wrap_content\"\n                android:layout_margin=\"@dimen/margin_normal\"\n                app:duration=\"1250\"\n                app:lineColor=\"@color/color_primary\"\n                app:maxLineLength=\"0.8\"\n                app:minLineLength=\"0.8\"\n                app:precision=\"150\"\n                app:strokeWidth=\"5dp\" />\n\n            <com.vlad1m1r.lemniscate.roulette.HypotrochoidProgressView\n                android:layout_width=\"wrap_content\"\n                android:layout_height=\"wrap_content\"\n                android:layout_margin=\"@dimen/margin_normal\"\n                app:distanceFromCenter=\"2\"\n                app:duration=\"1250\"\n                app:lineColor=\"@color/color_primary\"\n                app:maxLineLength=\"0.8\"\n                app:minLineLength=\"0.8\"\n                app:numberOfCycles=\"2\"\n                app:precision=\"80\"\n                app:radiusFixed=\"5\"\n                app:radiusMoving=\"2\"\n                app:strokeWidth=\"5dp\" />\n\n        </LinearLayout>\n\n        <LinearLayout\n            android:layout_width=\"wrap_content\"\n            android:layout_height=\"match_parent\"\n            android:layout_gravity=\"center\"\n            android:gravity=\"center\"\n            android:orientation=\"vertical\">\n\n            <com.vlad1m1r.lemniscate.GeronosProgressView\n                android:layout_width=\"wrap_content\"\n                android:layout_height=\"wrap_content\"\n                android:layout_margin=\"@dimen/margin_normal\"\n                app:duration=\"1250\"\n                app:hasHole=\"true\"\n                app:lineColor=\"@color/color_primary\"\n                app:maxLineLength=\"0.8\"\n                app:minLineLength=\"0.8\"\n                app:precision=\"80\"\n                app:strokeWidth=\"5dp\" />\n\n            <com.vlad1m1r.lemniscate.roulette.HypotrochoidProgressView\n                android:id=\"@+id/test\"\n                android:layout_width=\"wrap_content\"\n                android:layout_height=\"wrap_content\"\n                android:layout_margin=\"@dimen/margin_normal\"\n                app:distanceFromCenter=\"5\"\n                app:duration=\"1250\"\n                app:lineColor=\"@color/color_primary\"\n                app:maxLineLength=\"0.8\"\n                app:minLineLength=\"0.8\"\n                app:numberOfCycles=\"3\"\n                app:precision=\"80\"\n                app:radiusFixed=\"5\"\n                app:radiusMoving=\"3\"\n                app:strokeWidth=\"5dp\" />\n\n            <com.vlad1m1r.lemniscate.roulette.HypotrochoidProgressView\n                android:layout_width=\"wrap_content\"\n                android:layout_height=\"wrap_content\"\n                android:layout_margin=\"@dimen/margin_normal\"\n                app:distanceFromCenter=\"8\"\n                app:duration=\"1250\"\n                app:lineColor=\"@color/color_primary\"\n                app:maxLineLength=\"0.8\"\n                app:minLineLength=\"0.8\"\n                app:numberOfCycles=\"4\"\n                app:precision=\"100\"\n                app:radiusFixed=\"7\"\n                app:radiusMoving=\"4\"\n                app:strokeWidth=\"5dp\" />\n\n            <com.vlad1m1r.lemniscate.roulette.HypotrochoidProgressView\n                android:layout_width=\"wrap_content\"\n                android:layout_height=\"wrap_content\"\n                android:layout_margin=\"@dimen/margin_normal\"\n                app:distanceFromCenter=\"5\"\n                app:duration=\"1250\"\n                app:lineColor=\"@color/color_primary\"\n                app:maxLineLength=\"0.8\"\n                app:minLineLength=\"0.8\"\n                app:numberOfCycles=\"4\"\n                app:precision=\"100\"\n                app:radiusFixed=\"7\"\n                app:radiusMoving=\"4\"\n                app:strokeWidth=\"5dp\" />\n\n        </LinearLayout>\n    </LinearLayout>\n\n    <include\n        layout=\"@layout/toolbar\"/>\n\n</FrameLayout>"
  },
  {
    "path": "sample/src/main/res/layout/fragment_curve.xml",
    "content": "<?xml version=\"1.0\" encoding=\"utf-8\"?>\n<FrameLayout\n    xmlns:android=\"http://schemas.android.com/apk/res/android\"\n    android:layout_width=\"match_parent\"\n    android:layout_height=\"match_parent\"\n    xmlns:tools=\"http://schemas.android.com/tools\">\n\n    <androidx.appcompat.widget.AppCompatTextView\n        android:id=\"@+id/textCurveName\"\n        android:layout_width=\"match_parent\"\n        android:layout_height=\"wrap_content\"\n        android:layout_gravity=\"top|center_horizontal\"\n        tools:text=\"Test Name\"\n        android:gravity=\"top|center_horizontal\"\n        android:layout_marginTop=\"@dimen/margin_normal\"\n        android:textAppearance=\"@style/Base.TextAppearance.AppCompat.Subhead\"/>\n\n    <LinearLayout\n        android:id=\"@+id/layoutViewHolder\"\n        android:layout_width=\"wrap_content\"\n        android:layout_height=\"wrap_content\"\n        android:gravity=\"center\"\n        android:layout_gravity=\"center\"\n        android:orientation=\"vertical\">\n\n\n    </LinearLayout>\n</FrameLayout>\n"
  },
  {
    "path": "sample/src/main/res/layout/fragment_settings.xml",
    "content": "<?xml version=\"1.0\" encoding=\"utf-8\"?>\n<ScrollView xmlns:android=\"http://schemas.android.com/apk/res/android\"\n    xmlns:tools=\"http://schemas.android.com/tools\"\n    android:layout_width=\"match_parent\"\n    android:layout_height=\"match_parent\"\n    android:clipToPadding=\"false\"\n    android:paddingTop=\"@dimen/activity_vertical_margin\">\n\n    <LinearLayout\n        android:layout_width=\"match_parent\"\n        android:layout_height=\"wrap_content\"\n        android:orientation=\"vertical\"\n        android:paddingBottom=\"@dimen/activity_vertical_margin\"\n        android:paddingLeft=\"@dimen/activity_horizontal_margin\"\n        android:paddingRight=\"@dimen/activity_horizontal_margin\">\n\n        <androidx.appcompat.widget.AppCompatTextView\n            android:layout_width=\"wrap_content\"\n            android:layout_height=\"wrap_content\"\n            android:text=\"@string/stroke_width\"\n            android:textAppearance=\"@style/Base.TextAppearance.AppCompat.Caption\"/>\n\n        <SeekBar\n            android:id=\"@+id/seekBarStrokeWidth\"\n            android:layout_width=\"match_parent\"\n            android:layout_height=\"wrap_content\"\n            android:layout_marginTop=\"@dimen/margin_small\"/>\n\n        <androidx.appcompat.widget.AppCompatTextView\n            android:id=\"@+id/textStrokeWidth\"\n            android:layout_width=\"match_parent\"\n            android:layout_height=\"wrap_content\"\n            android:gravity=\"center\"\n            android:text=\"@string/stroke_width\"\n            android:textAppearance=\"@style/Base.TextAppearance.AppCompat.Caption\"/>\n\n        <View\n            android:layout_width=\"match_parent\"\n            android:layout_height=\"1px\"\n            android:layout_marginBottom=\"@dimen/margin_normal\"\n            android:layout_marginTop=\"@dimen/margin_normal\"\n            android:background=\"@color/divider\"/>\n\n        <androidx.appcompat.widget.AppCompatTextView\n            android:layout_width=\"wrap_content\"\n            android:layout_height=\"wrap_content\"\n            android:text=\"@string/stroke_color\"\n            android:textAppearance=\"@style/Base.TextAppearance.AppCompat.Caption\"/>\n\n        <LinearLayout\n            android:layout_width=\"match_parent\"\n            android:layout_height=\"wrap_content\"\n            android:gravity=\"center\"\n            android:orientation=\"horizontal\">\n\n            <View\n                android:id=\"@+id/viewColor1\"\n                android:layout_width=\"@dimen/view_color_picker\"\n                android:layout_height=\"@dimen/view_color_picker\"\n                android:layout_margin=\"@dimen/margin_small\"\n                android:background=\"@color/picker_color_1\"/>\n\n            <View\n                android:id=\"@+id/viewColor2\"\n                android:layout_width=\"@dimen/view_color_picker\"\n                android:layout_height=\"@dimen/view_color_picker\"\n                android:layout_margin=\"@dimen/margin_small\"\n                android:background=\"@color/picker_color_2\"/>\n\n            <View\n                android:id=\"@+id/viewColor3\"\n                android:layout_width=\"@dimen/view_color_picker\"\n                android:layout_height=\"@dimen/view_color_picker\"\n                android:layout_margin=\"@dimen/margin_small\"\n                android:background=\"@color/picker_color_3\"/>\n\n            <View\n                android:id=\"@+id/viewColor4\"\n                android:layout_width=\"@dimen/view_color_picker\"\n                android:layout_height=\"@dimen/view_color_picker\"\n                android:layout_margin=\"@dimen/margin_small\"\n                android:background=\"@color/picker_color_4\"/>\n\n            <View\n                android:id=\"@+id/viewColor5\"\n                android:layout_width=\"@dimen/view_color_picker\"\n                android:layout_height=\"@dimen/view_color_picker\"\n                android:layout_margin=\"@dimen/margin_small\"\n                android:background=\"@color/picker_color_5\"/>\n\n            <View\n                android:id=\"@+id/viewColor6\"\n                android:layout_width=\"@dimen/view_color_picker\"\n                android:layout_height=\"@dimen/view_color_picker\"\n                android:layout_margin=\"@dimen/margin_small\"\n                android:background=\"@color/picker_color_6\"/>\n\n        </LinearLayout>\n\n\n        <View\n            android:layout_width=\"match_parent\"\n            android:layout_height=\"1px\"\n            android:layout_marginBottom=\"@dimen/margin_normal\"\n            android:layout_marginTop=\"@dimen/margin_normal\"\n            android:background=\"@color/divider\"/>\n\n        <androidx.appcompat.widget.AppCompatTextView\n            android:layout_width=\"wrap_content\"\n            android:layout_height=\"wrap_content\"\n            android:text=\"@string/line_min_length\"\n            android:textAppearance=\"@style/Base.TextAppearance.AppCompat.Caption\"/>\n\n        <SeekBar\n            android:id=\"@+id/seekBarMinLineLength\"\n            android:layout_width=\"match_parent\"\n            android:layout_height=\"wrap_content\"\n            android:layout_marginTop=\"@dimen/margin_small\"\n            />\n\n        <androidx.appcompat.widget.AppCompatTextView\n            android:id=\"@+id/textMinLineLength\"\n            android:layout_width=\"match_parent\"\n            android:layout_height=\"wrap_content\"\n            android:layout_marginBottom=\"@dimen/margin_normal\"\n            android:gravity=\"center\"\n            android:textAppearance=\"@style/Base.TextAppearance.AppCompat.Caption\"\n            tools:text=\"0.4\" />\n\n        <androidx.appcompat.widget.AppCompatTextView\n            android:layout_width=\"wrap_content\"\n            android:layout_height=\"wrap_content\"\n            android:text=\"@string/line_max_length\"\n            android:textAppearance=\"@style/Base.TextAppearance.AppCompat.Caption\"/>\n\n        <SeekBar\n            android:id=\"@+id/seekBarMaxLineLength\"\n            android:layout_width=\"match_parent\"\n            android:layout_height=\"wrap_content\"\n            android:layout_marginTop=\"@dimen/margin_small\"\n            />\n\n        <androidx.appcompat.widget.AppCompatTextView\n            android:id=\"@+id/textMaxLineLength\"\n            android:layout_width=\"match_parent\"\n            android:layout_height=\"wrap_content\"\n            android:layout_marginBottom=\"@dimen/margin_normal\"\n            android:gravity=\"center\"\n            android:textAppearance=\"@style/Base.TextAppearance.AppCompat.Caption\"\n            tools:text=\"0.8\" />\n\n        <View\n            android:layout_width=\"match_parent\"\n            android:layout_height=\"1px\"\n            android:layout_marginBottom=\"@dimen/margin_normal\"\n            android:layout_marginTop=\"@dimen/margin_normal\"\n            android:background=\"@color/divider\"/>\n\n        <CheckBox\n            android:id=\"@+id/checkBoxHasHole\"\n            android:layout_width=\"wrap_content\"\n            android:layout_height=\"wrap_content\"\n            android:text=\"@string/has_hole\"/>\n\n        <View\n            android:layout_width=\"match_parent\"\n            android:layout_height=\"1px\"\n            android:layout_marginBottom=\"@dimen/margin_normal\"\n            android:layout_marginTop=\"@dimen/margin_normal\"\n            android:background=\"@color/divider\"/>\n\n        <androidx.appcompat.widget.AppCompatTextView\n            android:layout_width=\"wrap_content\"\n            android:layout_height=\"wrap_content\"\n            android:layout_marginBottom=\"@dimen/margin_small\"\n            android:text=\"@string/size_multiplier\"\n            android:textAppearance=\"@style/Base.TextAppearance.AppCompat.Caption\"/>\n\n        <SeekBar\n            android:id=\"@+id/seekBarSizeMultiplier\"\n            style=\"@style/Widget.AppCompat.SeekBar.Discrete\"\n            android:layout_width=\"match_parent\"\n            android:layout_height=\"wrap_content\"\n            />\n\n        <androidx.appcompat.widget.AppCompatTextView\n            android:id=\"@+id/textSizeMultiplier\"\n            android:layout_width=\"match_parent\"\n            android:layout_height=\"wrap_content\"\n            android:layout_marginBottom=\"@dimen/margin_normal\"\n            android:gravity=\"center\"\n            android:textAppearance=\"@style/Base.TextAppearance.AppCompat.Caption\"\n            tools:text=\"1.0\" />\n\n        <View\n            android:layout_width=\"match_parent\"\n            android:layout_height=\"1px\"\n            android:layout_marginBottom=\"@dimen/margin_normal\"\n            android:layout_marginTop=\"@dimen/margin_normal\"\n            android:background=\"@color/divider\"/>\n\n        <androidx.appcompat.widget.AppCompatTextView\n            android:layout_width=\"wrap_content\"\n            android:layout_height=\"wrap_content\"\n            android:text=\"@string/duration\"\n            android:textAppearance=\"@style/Base.TextAppearance.AppCompat.Caption\"/>\n\n        <SeekBar\n            android:id=\"@+id/seekBarAnimationDuration\"\n            android:layout_width=\"match_parent\"\n            android:layout_height=\"wrap_content\"\n            android:layout_marginTop=\"@dimen/margin_small\"\n            />\n\n        <androidx.appcompat.widget.AppCompatTextView\n            android:id=\"@+id/textAnimationDuration\"\n            android:layout_width=\"match_parent\"\n            android:layout_height=\"wrap_content\"\n            android:layout_marginBottom=\"@dimen/margin_normal\"\n            android:gravity=\"center\"\n            android:textAppearance=\"@style/Base.TextAppearance.AppCompat.Caption\"\n            tools:text=\"1000ms\" />\n\n        <View\n            android:layout_width=\"match_parent\"\n            android:layout_height=\"1px\"\n            android:layout_marginBottom=\"@dimen/margin_normal\"\n            android:layout_marginTop=\"@dimen/margin_normal\"\n            android:background=\"@color/divider\"/>\n\n        <androidx.appcompat.widget.AppCompatTextView\n            android:layout_width=\"wrap_content\"\n            android:layout_height=\"wrap_content\"\n            android:text=\"@string/precision\"\n            android:textAppearance=\"@style/Base.TextAppearance.AppCompat.Caption\"/>\n\n        <SeekBar\n            android:id=\"@+id/seekBarPrecision\"\n            android:layout_width=\"match_parent\"\n            android:layout_height=\"wrap_content\"\n            android:layout_marginTop=\"@dimen/margin_small\"\n            />\n\n        <androidx.appcompat.widget.AppCompatTextView\n            android:id=\"@+id/textPrecision\"\n            android:layout_width=\"match_parent\"\n            android:layout_height=\"wrap_content\"\n            android:layout_marginBottom=\"@dimen/margin_normal\"\n            android:gravity=\"center\"\n            android:text=\"@string/stroke_width\"\n            android:textAppearance=\"@style/Base.TextAppearance.AppCompat.Caption\"/>\n\n        <View\n            android:layout_width=\"match_parent\"\n            android:layout_height=\"1px\"\n            android:layout_marginBottom=\"@dimen/margin_normal\"\n            android:layout_marginTop=\"@dimen/margin_normal\"\n            android:background=\"@color/divider\"/>\n\n        <androidx.appcompat.widget.AppCompatTextView\n            android:layout_width=\"wrap_content\"\n            android:layout_height=\"wrap_content\"\n            android:text=\"@string/param_a\"\n            android:textAppearance=\"@style/Base.TextAppearance.AppCompat.Caption\"/>\n\n        <SeekBar\n            android:id=\"@+id/seekBarA\"\n            style=\"@style/Widget.AppCompat.SeekBar.Discrete\"\n            android:layout_width=\"match_parent\"\n            android:layout_height=\"wrap_content\"\n            android:layout_marginBottom=\"@dimen/margin_normal\"\n            android:layout_marginTop=\"@dimen/margin_small\"\n            />\n\n        <androidx.appcompat.widget.AppCompatTextView\n            android:layout_width=\"wrap_content\"\n            android:layout_height=\"wrap_content\"\n            android:text=\"@string/param_b\"\n            android:textAppearance=\"@style/Base.TextAppearance.AppCompat.Caption\"/>\n\n        <SeekBar\n            android:id=\"@+id/seekBarB\"\n            style=\"@style/Widget.AppCompat.SeekBar.Discrete\"\n            android:layout_width=\"match_parent\"\n            android:layout_height=\"wrap_content\"\n            android:layout_marginBottom=\"@dimen/margin_normal\"\n            android:layout_marginTop=\"@dimen/margin_small\"\n            />\n\n        <androidx.appcompat.widget.AppCompatTextView\n            android:layout_width=\"wrap_content\"\n            android:layout_height=\"wrap_content\"\n            android:text=\"@string/param_d\"\n            android:textAppearance=\"@style/Base.TextAppearance.AppCompat.Caption\"/>\n\n        <SeekBar\n            android:id=\"@+id/seekBarD\"\n            style=\"@style/Widget.AppCompat.SeekBar.Discrete\"\n            android:layout_width=\"match_parent\"\n            android:layout_height=\"wrap_content\"\n            android:layout_marginBottom=\"@dimen/margin_normal\"\n            android:layout_marginTop=\"@dimen/margin_small\"\n            />\n\n        <View\n            android:layout_width=\"match_parent\"\n            android:layout_height=\"1px\"\n            android:layout_marginBottom=\"@dimen/margin_normal\"\n            android:layout_marginTop=\"@dimen/margin_normal\"\n            android:background=\"@color/divider\"/>\n\n        <androidx.appcompat.widget.AppCompatTextView\n            android:layout_width=\"wrap_content\"\n            android:layout_height=\"wrap_content\"\n            android:text=\"@string/number_of_cycles\"\n            android:textAppearance=\"@style/Base.TextAppearance.AppCompat.Caption\"/>\n\n        <SeekBar\n            android:id=\"@+id/seekBarNumberOfCycles\"\n            style=\"@style/Widget.AppCompat.SeekBar.Discrete\"\n            android:layout_width=\"match_parent\"\n            android:layout_height=\"wrap_content\"\n            android:layout_marginBottom=\"@dimen/margin_normal\"\n            android:layout_marginTop=\"@dimen/margin_small\"\n            />\n\n    </LinearLayout>\n</ScrollView>\n"
  },
  {
    "path": "sample/src/main/res/layout/toolbar.xml",
    "content": "<?xml version=\"1.0\" encoding=\"utf-8\"?>\n<androidx.appcompat.widget.Toolbar\n    xmlns:android=\"http://schemas.android.com/apk/res/android\"\n    xmlns:app=\"http://schemas.android.com/apk/res-auto\"\n    android:id=\"@+id/toolbar\"\n    android:layout_width=\"match_parent\"\n    android:layout_height=\"wrap_content\"\n    android:minHeight=\"?attr/actionBarSize\"\n    android:background=\"?attr/colorPrimary\"\n    app:popupTheme=\"@style/ThemeOverlay.AppCompat.Light\"\n    android:theme=\"@style/ThemeOverlay.AppCompat.Dark.ActionBar\"/>\n"
  },
  {
    "path": "sample/src/main/res/layout-land/activity_main.xml",
    "content": "<?xml version=\"1.0\" encoding=\"utf-8\"?>\n<LinearLayout xmlns:android=\"http://schemas.android.com/apk/res/android\"\n    xmlns:app=\"http://schemas.android.com/apk/res-auto\"\n    xmlns:tools=\"http://schemas.android.com/tools\"\n    android:id=\"@+id/root_view\"\n    android:layout_width=\"match_parent\"\n    android:layout_height=\"wrap_content\"\n    android:orientation=\"vertical\"\n    tools:context=\"com.vlad1m1r.lemniscate.sample.MainActivity\">\n\n    <include layout=\"@layout/toolbar\" />\n\n    <LinearLayout\n        android:layout_width=\"match_parent\"\n        android:layout_height=\"wrap_content\"\n        android:orientation=\"horizontal\">\n\n        <FrameLayout\n            android:layout_width=\"0dp\"\n            android:layout_height=\"wrap_content\"\n            android:layout_weight=\"1\">\n\n            <androidx.viewpager.widget.ViewPager\n                android:id=\"@+id/viewPager\"\n                android:layout_width=\"match_parent\"\n                android:layout_height=\"match_parent\" />\n\n            <me.relex.circleindicator.CircleIndicator\n                android:id=\"@+id/indicator\"\n                android:layout_width=\"match_parent\"\n                android:layout_height=\"48dp\"\n                android:layout_gravity=\"bottom\"\n                app:ci_drawable=\"@drawable/indicator_selected\"\n                app:ci_drawable_unselected=\"@drawable/indicator\" />\n        </FrameLayout>\n\n        <View\n            android:layout_width=\"1dp\"\n            android:layout_height=\"match_parent\"\n            android:background=\"@color/divider\" />\n\n        <fragment\n            android:id=\"@+id/fragment_settings\"\n            android:name=\"com.vlad1m1r.lemniscate.sample.FragmentSettings\"\n            android:layout_width=\"0dp\"\n            android:layout_height=\"wrap_content\"\n            android:layout_weight=\"1\" />\n\n    </LinearLayout>\n\n</LinearLayout>\n"
  },
  {
    "path": "sample/src/main/res/layout-land/activity_presentation.xml",
    "content": "<?xml version=\"1.0\" encoding=\"utf-8\"?>\n<FrameLayout\n    xmlns:android=\"http://schemas.android.com/apk/res/android\"\n    xmlns:app=\"http://schemas.android.com/apk/res-auto\"\n    android:id=\"@+id/root_view\"\n    android:layout_width=\"match_parent\"\n    android:layout_height=\"match_parent\">\n\n    <LinearLayout\n        android:layout_width=\"match_parent\"\n        android:layout_height=\"match_parent\"\n        android:gravity=\"center\"\n        android:orientation=\"vertical\">\n\n        <LinearLayout\n            android:layout_width=\"match_parent\"\n            android:layout_height=\"wrap_content\"\n            android:layout_gravity=\"center\"\n            android:gravity=\"center\"\n            android:orientation=\"horizontal\">\n\n            <com.vlad1m1r.lemniscate.BernoullisProgressView\n                android:layout_width=\"wrap_content\"\n                android:layout_height=\"wrap_content\"\n                android:layout_margin=\"@dimen/margin_normal\"\n                app:duration=\"1250\"\n                app:hasHole=\"true\"\n                app:lineColor=\"@color/color_primary\"\n                app:maxLineLength=\"0.8\"\n                app:minLineLength=\"0.8\"\n                app:precision=\"80\"\n                app:strokeWidth=\"5dp\" />\n\n            <com.vlad1m1r.lemniscate.roulette.EpitrochoidProgressView\n                android:layout_width=\"wrap_content\"\n                android:layout_height=\"wrap_content\"\n                android:layout_margin=\"@dimen/margin_normal\"\n                app:distanceFromCenter=\"1\"\n                app:duration=\"1250\"\n                app:hasHole=\"true\"\n                app:lineColor=\"@color/color_primary\"\n                app:maxLineLength=\"0.8\"\n                app:minLineLength=\"0.8\"\n                app:numberOfCycles=\"1\"\n                app:precision=\"150\"\n                app:radiusFixed=\"3\"\n                app:radiusMoving=\"1\"\n                app:strokeWidth=\"5dp\" />\n\n            <com.vlad1m1r.lemniscate.funny.HeartProgressView\n                android:layout_width=\"wrap_content\"\n                android:layout_height=\"wrap_content\"\n                android:layout_margin=\"@dimen/margin_normal\"\n                app:duration=\"1250\"\n                app:lineColor=\"@color/color_primary\"\n                app:maxLineLength=\"0.8\"\n                app:minLineLength=\"0.8\"\n                app:precision=\"150\"\n                app:strokeWidth=\"5dp\" />\n\n            <com.vlad1m1r.lemniscate.roulette.HypotrochoidProgressView\n                android:layout_width=\"wrap_content\"\n                android:layout_height=\"wrap_content\"\n                android:layout_margin=\"@dimen/margin_normal\"\n                app:distanceFromCenter=\"2\"\n                app:duration=\"1250\"\n                app:lineColor=\"@color/color_primary\"\n                app:maxLineLength=\"0.8\"\n                app:minLineLength=\"0.8\"\n                app:numberOfCycles=\"2\"\n                app:precision=\"80\"\n                app:radiusFixed=\"5\"\n                app:radiusMoving=\"2\"\n                app:strokeWidth=\"5dp\" />\n\n        </LinearLayout>\n\n        <LinearLayout\n            android:layout_width=\"match_parent\"\n            android:layout_height=\"wrap_content\"\n            android:layout_gravity=\"center\"\n            android:gravity=\"center\"\n            android:orientation=\"horizontal\">\n\n            <com.vlad1m1r.lemniscate.GeronosProgressView\n                android:layout_width=\"wrap_content\"\n                android:layout_height=\"wrap_content\"\n                android:layout_margin=\"@dimen/margin_normal\"\n                app:duration=\"1250\"\n                app:hasHole=\"true\"\n                app:lineColor=\"@color/color_primary\"\n                app:maxLineLength=\"0.8\"\n                app:minLineLength=\"0.8\"\n                app:precision=\"80\"\n                app:strokeWidth=\"5dp\" />\n\n            <com.vlad1m1r.lemniscate.roulette.HypotrochoidProgressView\n                android:id=\"@+id/test\"\n                android:layout_width=\"wrap_content\"\n                android:layout_height=\"wrap_content\"\n                android:layout_margin=\"@dimen/margin_normal\"\n                app:distanceFromCenter=\"5\"\n                app:duration=\"1250\"\n                app:lineColor=\"@color/color_primary\"\n                app:maxLineLength=\"0.8\"\n                app:minLineLength=\"0.8\"\n                app:numberOfCycles=\"3\"\n                app:precision=\"80\"\n                app:radiusFixed=\"5\"\n                app:radiusMoving=\"3\"\n                app:strokeWidth=\"5dp\" />\n\n            <com.vlad1m1r.lemniscate.roulette.HypotrochoidProgressView\n                android:layout_width=\"wrap_content\"\n                android:layout_height=\"wrap_content\"\n                android:layout_margin=\"@dimen/margin_normal\"\n                app:distanceFromCenter=\"8\"\n                app:duration=\"1250\"\n                app:lineColor=\"@color/color_primary\"\n                app:maxLineLength=\"0.8\"\n                app:minLineLength=\"0.8\"\n                app:numberOfCycles=\"4\"\n                app:precision=\"100\"\n                app:radiusFixed=\"7\"\n                app:radiusMoving=\"4\"\n                app:strokeWidth=\"5dp\" />\n\n            <com.vlad1m1r.lemniscate.roulette.HypotrochoidProgressView\n                android:layout_width=\"wrap_content\"\n                android:layout_height=\"wrap_content\"\n                android:layout_margin=\"@dimen/margin_normal\"\n                app:distanceFromCenter=\"5\"\n                app:duration=\"1250\"\n                app:lineColor=\"@color/color_primary\"\n                app:maxLineLength=\"0.8\"\n                app:minLineLength=\"0.8\"\n                app:numberOfCycles=\"4\"\n                app:precision=\"100\"\n                app:radiusFixed=\"7\"\n                app:radiusMoving=\"4\"\n                app:strokeWidth=\"5dp\" />\n\n        </LinearLayout>\n    </LinearLayout>\n\n    <include\n        layout=\"@layout/toolbar\"/>\n\n</FrameLayout>"
  },
  {
    "path": "sample/src/main/res/menu/menu_main_activity.xml",
    "content": "<?xml version=\"1.0\" encoding=\"utf-8\"?>\n<menu\n    xmlns:android=\"http://schemas.android.com/apk/res/android\"\n    xmlns:app=\"http://schemas.android.com/apk/res-auto\"\n    xmlns:tools=\"http://schemas.android.com/tools\"\n    tools:context=\".MainActivity\">\n\n    <item\n        android:id=\"@+id/action_presentation\"\n        android:orderInCategory=\"200\"\n        android:title=\"@string/action_presentation\"\n        android:icon=\"@drawable/ic_action_presentation\"\n        app:showAsAction=\"always\" />\n\n    <item\n        android:id=\"@+id/action_github\"\n        android:orderInCategory=\"100\"\n        android:title=\"@string/action_github\"\n        android:icon=\"@drawable/ic_action_github\"\n        app:showAsAction=\"always\" />\n</menu>"
  },
  {
    "path": "sample/src/main/res/mipmap-anydpi-v26/ic_launcher.xml",
    "content": "<?xml version=\"1.0\" encoding=\"utf-8\"?>\n<adaptive-icon xmlns:android=\"http://schemas.android.com/apk/res/android\">\n    <background android:drawable=\"@drawable/ic_launcher_background\"/>\n    <foreground android:drawable=\"@drawable/ic_launcher_foreground\"/>\n</adaptive-icon>"
  },
  {
    "path": "sample/src/main/res/mipmap-anydpi-v26/ic_launcher_round.xml",
    "content": "<?xml version=\"1.0\" encoding=\"utf-8\"?>\n<adaptive-icon xmlns:android=\"http://schemas.android.com/apk/res/android\">\n    <background android:drawable=\"@drawable/ic_launcher_background\"/>\n    <foreground android:drawable=\"@drawable/ic_launcher_foreground\"/>\n</adaptive-icon>"
  },
  {
    "path": "sample/src/main/res/values/colors.xml",
    "content": "<?xml version=\"1.0\" encoding=\"utf-8\"?>\n<resources>\n    <color name=\"color_primary\">#3F51B5</color>\n    <color name=\"color_primary_dark\">#303F9F</color>\n    <color name=\"color_primary_light\">#C5CAE9</color>\n    <color name=\"color_accent\">#03A9F4</color>\n    <color name=\"primary_text\">#212121</color>\n    <color name=\"secondary_text\">#757575</color>\n    <color name=\"divider\">#BDBDBD</color>\n    <color name=\"shadow_end\">#33888888</color>\n    <color name=\"shadow_start\">#00FFFFFF</color>\n\n    <color name=\"picker_color_1\">#4A148C</color>\n    <color name=\"picker_color_2\">#E91E63</color>\n    <color name=\"picker_color_3\">#f44336</color>\n    <color name=\"picker_color_4\">#4CAF50</color>\n    <color name=\"picker_color_5\">#3F51B5</color>\n    <color name=\"picker_color_6\">#9C27B0</color>\n\n</resources>\n"
  },
  {
    "path": "sample/src/main/res/values/constants.xml",
    "content": "<?xml version=\"1.0\" encoding=\"utf-8\"?>\n<resources>\n    <string name=\"url_github\">https://github.com/vlad1m1r990/Lemniscate</string>\n</resources>"
  },
  {
    "path": "sample/src/main/res/values/dimens.xml",
    "content": "<resources>\n    <!-- Default screen margins, per the Android Design guidelines. -->\n    <dimen name=\"activity_horizontal_margin\">16dp</dimen>\n    <dimen name=\"activity_vertical_margin\">16dp</dimen>\n\n    <dimen name=\"margin_nano\">2dp</dimen>\n    <dimen name=\"margin_mini\">4dp</dimen>\n    <dimen name=\"margin_small\">8dp</dimen>\n    <dimen name=\"margin_normal\">16dp</dimen>\n    <dimen name=\"margin_large\">24dp</dimen>\n    <dimen name=\"margin_huge\">32dp</dimen>\n    <dimen name=\"view_color_picker\">36dp</dimen>\n</resources>\n"
  },
  {
    "path": "sample/src/main/res/values/strings.xml",
    "content": "<resources>\n    <string name=\"app_name\">Lemniscate Library</string>\n\n    <string name=\"stroke_width\">Stroke width</string>\n    <string name=\"has_hole\">Has a hole?</string>\n    <string name=\"line_length_changeable\">Is line length changeable?</string>\n    <string name=\"line_length\">Line length</string>\n    <string name=\"line_max_length\">Max length of line</string>\n    <string name=\"line_min_length\">Min length of line</string>\n    <string name=\"size_multiplier\">Size multiplier</string>\n    <string name=\"duration\">Duration</string>\n    <string name=\"precision\">Precision</string>\n    <string name=\"param_a\">Radius of fixed circle</string>\n    <string name=\"param_b\">Radius of moving circle</string>\n    <string name=\"param_d\">Distance from center of moving circle</string>\n    <string name=\"number_of_cycles\">Number of cycles</string>\n\n    <string name=\"action_github\">Github</string>\n    <string name=\"action_presentation\">Open presentation screen</string>\n\n    <string name=\"screen_presentation\">Presentation</string>\n\n    <string name=\"format_percentage\">%d%%</string>\n    <string name=\"format_ms\">%d ms</string>\n    <string name=\"format_points\">%d points</string>\n    <string name=\"stroke_color\">Stroke color</string>\n\n</resources>\n"
  },
  {
    "path": "sample/src/main/res/values/styles.xml",
    "content": "<resources>\n\n    <!-- Base application theme. -->\n    <style name=\"AppTheme\" parent=\"Theme.AppCompat.Light.NoActionBar\">\n        <!-- Customize your theme here. -->\n        <item name=\"colorPrimary\">@color/color_primary</item>\n        <item name=\"colorPrimaryDark\">@color/color_primary_dark</item>\n        <item name=\"colorAccent\">@color/color_accent</item>\n    </style>\n\n</resources>\n"
  },
  {
    "path": "sample/src/main/res/values-w820dp/dimens.xml",
    "content": "<resources>\n    <!-- Example customization of dimensions originally defined in res/values/dimens.xml\n         (such as screen margins) for screens with more than 820dp of available width. This\n         would include 7\" and 10\" devices in landscape (~960dp and ~1280dp respectively). -->\n    <dimen name=\"activity_horizontal_margin\">64dp</dimen>\n</resources>\n"
  },
  {
    "path": "settings.gradle",
    "content": "include ':sample', ':lemniscate'\n"
  }
]