[
  {
    "path": ".github/workflows/continous-build.yml",
    "content": "name: Android\n\non:\n  push:\n    branches: [ main ]\n  pull_request:\n    branches: [ main ]\n\n  workflow_dispatch:\n\njobs:\n  build:\n    runs-on: ubuntu-latest\n\n    steps:\n      - uses: actions/checkout@v3.3.0\n      - uses: actions/setup-java@v3\n        with:\n          distribution: 'temurin'\n          java-version: '17'\n      - name: Build library\n        run: ./gradlew assembleRelease\n"
  },
  {
    "path": ".gitignore",
    "content": ".DS_Store\n\n# Built application files\n*.apk\n*.aar\n*.ap_\n*.aab\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#  Uncomment the following line in case you need and you don't have the release build type files in your app\n# release/\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/tasks.xml\n.idea/gradle.xml\n.idea/assetWizardSettings.xml\n.idea/dictionaries\n.idea/libraries\n# Android Studio 3 in .gitignore file.\n.idea/caches\n.idea/modules.xml\n# Comment next line if keeping position of elements in Navigation Editor is relevant for you\n.idea/navEditor.xml\n\n# Keystore files\n# Uncomment the following lines if you do not want to check your keystore files in.\n#*.jks\n#*.keystore\n\n# External native build folder generated in Android Studio 2.2 and later\n.externalNativeBuild\n.cxx/\n\n# Google Services (e.g. APIs or Firebase)\n# google-services.json\n\n# Freeline\nfreeline.py\nfreeline/\nfreeline_project_description.json\n\n# fastlane\nfastlane/report.xml\nfastlane/Preview.html\nfastlane/screenshots\nfastlane/test_output\nfastlane/readme.md\n\n# Version control\nvcs.xml\n\n# lint\nlint/intermediates/\nlint/generated/\nlint/outputs/\nlint/tmp/\n# lint/reports/\n"
  },
  {
    "path": ".idea/.gitignore",
    "content": "# Default ignored files\n/shelf/\n/workspace.xml\n"
  },
  {
    "path": ".idea/.name",
    "content": "V9"
  },
  {
    "path": ".idea/compiler.xml",
    "content": "<?xml version=\"1.0\" encoding=\"UTF-8\"?>\n<project version=\"4\">\n  <component name=\"CompilerConfiguration\">\n    <bytecodeTargetLevel target=\"17\" />\n  </component>\n</project>"
  },
  {
    "path": ".idea/deploymentTargetDropDown.xml",
    "content": "<?xml version=\"1.0\" encoding=\"UTF-8\"?>\n<project version=\"4\">\n  <component name=\"deploymentTargetDropDown\">\n    <value>\n      <entry key=\"v9-demo\">\n        <State />\n      </entry>\n    </value>\n  </component>\n</project>"
  },
  {
    "path": ".idea/kotlinc.xml",
    "content": "<?xml version=\"1.0\" encoding=\"UTF-8\"?>\n<project version=\"4\">\n  <component name=\"KotlinJpsPluginSettings\">\n    <option name=\"version\" value=\"1.9.21\" />\n  </component>\n</project>"
  },
  {
    "path": ".idea/migrations.xml",
    "content": "<?xml version=\"1.0\" encoding=\"UTF-8\"?>\n<project version=\"4\">\n  <component name=\"ProjectMigrations\">\n    <option name=\"MigrateToGradleLocalJavaHome\">\n      <set>\n        <option value=\"$PROJECT_DIR$\" />\n      </set>\n    </option>\n  </component>\n</project>"
  },
  {
    "path": ".idea/misc.xml",
    "content": "<?xml version=\"1.0\" encoding=\"UTF-8\"?>\n<project version=\"4\">\n  <component name=\"DesignSurface\">\n    <option name=\"filePathToZoomLevelMap\">\n      <map>\n        <entry key=\"v9-demo/src/main/res/drawable-v24/ic_launcher_foreground.xml\" value=\"0.134\" />\n        <entry key=\"v9-demo/src/main/res/drawable/ic_launcher.xml\" value=\"0.159\" />\n        <entry key=\"v9-demo/src/main/res/drawable/ic_launcher_background.xml\" value=\"0.134\" />\n        <entry key=\"v9-demo/src/main/res/mipmap-anydpi-v26/ic_launcher.xml\" value=\"0.159\" />\n        <entry key=\"v9-demo/src/main/res/mipmap-anydpi-v26/ic_launcher_round.xml\" value=\"0.159\" />\n      </map>\n    </option>\n  </component>\n  <component name=\"ProjectRootManager\" version=\"2\" languageLevel=\"JDK_17\" default=\"true\" project-jdk-name=\"jbr-17\" project-jdk-type=\"JavaSDK\">\n    <output url=\"file://$PROJECT_DIR$/build/classes\" />\n  </component>\n  <component name=\"ProjectType\">\n    <option name=\"id\" value=\"Android\" />\n  </component>\n</project>"
  },
  {
    "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\n\n   APPENDIX: How to apply the Apache License to your work.\n\n      To apply the Apache License to your work, attach the following\n      boilerplate notice, with the fields enclosed by brackets \"[]\"\n      replaced with your own identifying information. (Don't include\n      the brackets!)  The text should be enclosed in the appropriate\n      comment syntax for the file format. We also recommend that a\n      file or class name and description of purpose be included on the\n      same \"printed page\" as the copyright notice for easier\n      identification within third-party archives.\n\n   Copyright [yyyy] [name of copyright owner]\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"
  },
  {
    "path": "README.md",
    "content": "# v9\n\n[![v9](https://maven-badges.herokuapp.com/maven-central/dev.romainguy/v9/badge.svg?subject=v9)](https://maven-badges.herokuapp.com/maven-central/dev.romainguy/v9)\n[![Android build status](https://github.com/romainguy/v9/workflows/Android/badge.svg)](https://github.com/romainguy/v9/actions?query=workflow%3AAndroid)\n\nv9 is an Android library that provides the ability to dynamically resize\n[Path](https://developer.android.com/reference/android/graphics/Path) objects as you would\n[9-patch bitmaps](https://developer.android.com/studio/write/draw9patch). In the example below,\nthe chat bubble is dynamically resized while preserving the corners:\n\nhttps://user-images.githubusercontent.com/869684/186994957-a25978ce-c980-45bd-9b84-452d6334a07e.mov\n\nEach slice of the original path (indicated by the shaded areas in the example above) defines\na horizontal or vertical region of the path that needs to be stretched. A path can be resized\nusing multiple slices:\n\nhttps://user-images.githubusercontent.com/869684/186995070-32021ebd-d085-406f-8905-f035ce4559f5.mov\n\nWhen multiple slices are used, the amount of stretch applied is proportional to the size of\neach slice. This behavior is used in the example above to keep the dark bars centered vertically\nand to spaced them equally horizontally, thus properly preserving details inside the path.\n\nv9 is compatible with API 21+.\n\n## Maven\n\n```gradle\nrepositories {\n    // ...\n    mavenCentral()\n}\n\ndependencies {\n    implementation 'dev.romainguy:v9:0.3.0'\n}\n```\n\n## How to use\n\nSlicing a `Path` gives you a `PathResizer`. The easiest way to slice is to use a single vertical\nand a single horizontal slice:\n\n```kotlin\nval pathResizer = path.slice(Slices(9.0f, 7.0f, 15.0f, 13.0f))\n```\n\nThis syntax follows the rectangle convention on Android of passing the top, left, right, and\nbottom coordinates: there's a vertical slice from 9.0 to 15.0 and a horizontal slice from 7.0\nto 13.0.\n\nYou can also explicitly declare a list of slices:\n\n```kotlin\nval pathResizer = path.slice(\n    Slices(\n        listOf(Slice(9.0f, 10.0f), Slice(14.0f, 15.0f)),\n        listOf(Slice(5.0f, 6.0f),  Slice(18.0f, 19.0f))\n    )\n)\n```\n\nOnce you have a `PathResizer`, you can call the `resize()` method to create a new path\nderived from the original, at the desired size:\n\n```kotlin\nval resizedPath = pathResizer.resize(width, height)\n```\n\nFor performance considerations, you can pass an existing path to `resize()`. This path\nwill be rewound and returned:\n\n```kotlin\nval resizedPath = pathResizer.resize(width, height, destinationpath)\n// resizedPath === destinationpath\n```\n\n## License\n\nPlease see LICENSE.\n"
  },
  {
    "path": "build.gradle",
    "content": "buildscript {\n    ext {\n        compose_version = '1.5.4'\n        compose_compiler_version = '1.5.6'\n        pathway_version = '0.17.0'\n    }\n    repositories {\n        google()\n        mavenCentral()\n    }\n\n    dependencies {\n        classpath 'com.android.tools.build:gradle:8.2.0'\n        classpath 'org.jetbrains.kotlin:kotlin-gradle-plugin:1.9.21'\n        classpath 'com.vanniktech:gradle-maven-publish-plugin:0.25.3'\n        classpath 'org.jetbrains.dokka:dokka-gradle-plugin:1.8.20'\n    }\n}\n"
  },
  {
    "path": "gradle/wrapper/gradle-wrapper.properties",
    "content": "#Tue Dec 12 17:36:28 PST 2023\ndistributionBase=GRADLE_USER_HOME\ndistributionPath=wrapper/dists\ndistributionUrl=https\\://services.gradle.org/distributions/gradle-8.2-bin.zip\nzipStoreBase=GRADLE_USER_HOME\nzipStorePath=wrapper/dists\n"
  },
  {
    "path": "gradle.properties",
    "content": "GROUP=dev.romainguy\nVERSION_NAME=0.3.0\n\nSONATYPE_HOST=S01\nRELEASE_SIGNING_ENABLED=true\n\nPOM_DESCRIPTION=Vector 9-patches for Android\n\nPOM_URL=https://github.com/romainguy/v9\nPOM_SCM_URL=https://github.com/romainguy/v9\nPOM_SCM_CONNECTION=scm:git:git://github.com/romainguy/v9.git\nPOM_SCM_DEV_CONNECTION=scm:git:ssh://git@github.com/romainguy/v9.git\n\nPOM_LICENCE_NAME=The Apache Software License, Version 2.0\nPOM_LICENCE_URL=http://www.apache.org/licenses/LICENSE-2.0.txt\nPOM_LICENCE_DIST=repo\n\nPOM_DEVELOPER_ID=romainguy\nPOM_DEVELOPER_NAME=Romain Guy\nPOM_DEVELOPER_URL=https://github.com/romainguy\n\nPOM_NAME=v9\nPOM_ARTIFACT_ID=v9\nPOM_PACKAGING=aar\n\norg.gradle.jvmargs=-Xmx2048M\n\nandroid.useAndroidX=true\nandroid.nonTransitiveRClass=false\nandroid.nonFinalResIds=false\n"
  },
  {
    "path": "gradlew",
    "content": "#!/usr/bin/env sh\n\n#\n# Copyright 2015 the original author or authors.\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#      https://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\n##############################################################################\n##\n##  Gradle start up script for UN*X\n##\n##############################################################################\n\n# Attempt to set APP_HOME\n# Resolve links: $0 may be a 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\nAPP_NAME=\"Gradle\"\nAPP_BASE_NAME=`basename \"$0\"`\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='\"-Xmx64m\" \"-Xms64m\"'\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\nnonstop=false\ncase \"`uname`\" in\n  CYGWIN* )\n    cygwin=true\n    ;;\n  Darwin* )\n    darwin=true\n    ;;\n  MINGW* )\n    msys=true\n    ;;\n  NONSTOP* )\n    nonstop=true\n    ;;\nesac\n\nCLASSPATH=$APP_HOME/gradle/wrapper/gradle-wrapper.jar\n\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\" -a \"$darwin\" = \"false\" -a \"$nonstop\" = \"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 or MSYS, switch paths to Windows format before running java\nif [ \"$cygwin\" = \"true\" -o \"$msys\" = \"true\" ] ; then\n    APP_HOME=`cygpath --path --mixed \"$APP_HOME\"`\n    CLASSPATH=`cygpath --path --mixed \"$CLASSPATH\"`\n\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 d 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 a 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 a condition\n            eval `echo args$i`=`cygpath --path --ignore --mixed \"$arg\"`\n        else\n            eval `echo args$i`=\"\\\"$arg\\\"\"\n        fi\n        i=`expr $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# Escape application args\nsave () {\n    for i do printf %s\\\\n \"$i\" | sed \"s/'/'\\\\\\\\''/g;1s/^/'/;\\$s/\\$/' \\\\\\\\/\" ; done\n    echo \" \"\n}\nAPP_ARGS=`save \"$@\"`\n\n# Collect all arguments for the java command, following the shell quoting and substitution rules\neval set -- $DEFAULT_JVM_OPTS $JAVA_OPTS $GRADLE_OPTS \"\\\"-Dorg.gradle.appname=$APP_BASE_NAME\\\"\" -classpath \"\\\"$CLASSPATH\\\"\" org.gradle.wrapper.GradleWrapperMain \"$APP_ARGS\"\n\nexec \"$JAVACMD\" \"$@\"\n"
  },
  {
    "path": "gradlew.bat",
    "content": "@rem\r\n@rem Copyright 2015 the original author or authors.\r\n@rem\r\n@rem Licensed under the Apache License, Version 2.0 (the \"License\");\r\n@rem you may not use this file except in compliance with the License.\r\n@rem You may obtain a copy of the License at\r\n@rem\r\n@rem      https://www.apache.org/licenses/LICENSE-2.0\r\n@rem\r\n@rem Unless required by applicable law or agreed to in writing, software\r\n@rem distributed under the License is distributed on an \"AS IS\" BASIS,\r\n@rem WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\r\n@rem See the License for the specific language governing permissions and\r\n@rem limitations under the License.\r\n@rem\r\n\r\n@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\nset DIRNAME=%~dp0\r\nif \"%DIRNAME%\" == \"\" set DIRNAME=.\r\nset APP_BASE_NAME=%~n0\r\nset APP_HOME=%DIRNAME%\r\n\r\n@rem Resolve any \".\" and \"..\" in APP_HOME to make it shorter.\r\nfor %%i in (\"%APP_HOME%\") do set APP_HOME=%%~fi\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=\"-Xmx64m\" \"-Xms64m\"\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 execute\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 execute\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:execute\r\n@rem Setup the command line\r\n\r\nset CLASSPATH=%APP_HOME%\\gradle\\wrapper\\gradle-wrapper.jar\r\n\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 %*\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 /b 1\r\n\r\n:mainEnd\r\nif \"%OS%\"==\"Windows_NT\" endlocal\r\n\r\n:omega\r\n"
  },
  {
    "path": "settings.gradle",
    "content": "dependencyResolutionManagement {\n    repositoriesMode.set(RepositoriesMode.FAIL_ON_PROJECT_REPOS)\n    repositories {\n        google()\n        mavenCentral()\n    }\n}\n\nrootProject.name = \"V9\"\ninclude ':v9'\ninclude ':v9-demo'\n"
  },
  {
    "path": "v9/.gitignore",
    "content": "/build"
  },
  {
    "path": "v9/build.gradle",
    "content": "plugins {\n    id 'com.android.library'\n    id 'kotlin-android'\n    id 'org.jetbrains.dokka'\n}\n\ngroup = GROUP\nversion = VERSION_NAME\n\nandroid {\n    compileSdkPreview 'UpsideDownCake'\n\n    defaultConfig {\n        minSdk 21\n        compileSdk 34\n        targetSdk 34\n\n        testInstrumentationRunner \"androidx.test.runner.AndroidJUnitRunner\"\n    }\n\n    compileOptions {\n        sourceCompatibility JavaVersion.VERSION_1_8\n        targetCompatibility JavaVersion.VERSION_1_8\n    }\n\n    kotlinOptions {\n        jvmTarget = '1.8'\n    }\n    namespace 'dev.romainguy.graphics.v9'\n}\n\ndependencies {\n    androidTestImplementation 'androidx.core:core-ktx:1.12.0'\n    androidTestImplementation 'androidx.test:runner:1.5.2'\n    androidTestImplementation 'androidx.test:rules:1.5.0'\n    androidTestImplementation 'androidx.test.ext:junit:1.1.5'\n\n    implementation \"dev.romainguy:pathway:$pathway_version\"\n}\n\napply plugin: 'com.vanniktech.maven.publish'\n"
  },
  {
    "path": "v9/src/androidTest/java/dev/romainguy/graphics/v9/PathResizerTest.kt",
    "content": "/*\n * Copyright (C) 2022 Romain Guy\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 dev.romainguy.graphics.v9\n\nimport android.graphics.Rect\nimport android.graphics.RectF\nimport androidx.test.ext.junit.runners.AndroidJUnit4\nimport org.junit.Assert.assertEquals\nimport org.junit.Test\nimport org.junit.runner.RunWith\n\n@RunWith(AndroidJUnit4::class)\nclass PathResizerTest {\n    @Test\n    fun emptySlice() {\n        val slice = Slice(0.0f, 0.0f)\n        assertEquals(0.0f, slice.size)\n    }\n\n    @Test(expected = IllegalArgumentException::class)\n    fun startMustBeLessThanEnd() {\n        val slice = Slice(2.0f, 1.0f)\n        assertEquals(1.0f, slice.size)\n    }\n\n    @Test\n    fun sliceFromIntRect() {\n        val slices = Slices(Rect(0, 0, 4, 4))\n        assertEquals(1, slices.verticalSlices.size)\n        assertEquals(Slice(0.0f, 4.0f), slices.verticalSlices[0])\n        assertEquals(1, slices.horizontalSlices.size)\n        assertEquals(Slice(0.0f, 4.0f), slices.horizontalSlices[0])\n    }\n\n    @Test\n    fun sliceFromInt() {\n        val slices = Slices(0, 0, 4, 4)\n        assertEquals(1, slices.verticalSlices.size)\n        assertEquals(Slice(0.0f, 4.0f), slices.verticalSlices[0])\n        assertEquals(1, slices.horizontalSlices.size)\n        assertEquals(Slice(0.0f, 4.0f), slices.horizontalSlices[0])\n    }\n\n    @Test\n    fun sliceFromFloatRect() {\n        val slices = Slices(RectF(0.0f, 0.0f, 4.0f, 4.0f))\n        assertEquals(1, slices.verticalSlices.size)\n        assertEquals(Slice(0.0f, 4.0f), slices.verticalSlices[0])\n        assertEquals(1, slices.horizontalSlices.size)\n        assertEquals(Slice(0.0f, 4.0f), slices.horizontalSlices[0])\n    }\n\n    @Test\n    fun sliceFromFloat() {\n        val slices = Slices(0.0f, 0.0f, 4.0f, 4.0f)\n        assertEquals(1, slices.verticalSlices.size)\n        assertEquals(Slice(0.0f, 4.0f), slices.verticalSlices[0])\n        assertEquals(1, slices.horizontalSlices.size)\n        assertEquals(Slice(0.0f, 4.0f), slices.horizontalSlices[0])\n    }\n\n    @Test(expected = IllegalArgumentException::class)\n    fun emptyVerticalSlices() {\n        Slices(listOf(), listOf(Slice(0.0f, 1.0f)))\n    }\n\n    @Test(expected = IllegalArgumentException::class)\n    fun emptyHorizontalSlices() {\n        Slices(listOf(Slice(0.0f, 1.0f)), listOf())\n    }\n\n    @Test\n    fun slices() {\n        val slices = Slices(\n            listOf(Slice(0.0f, 1.0f), Slice(2.0f, 3.0f)),\n            listOf(Slice(0.0f, 1.0f), Slice(2.0f, 3.0f))\n        )\n        assertEquals(2, slices.verticalSlices.size)\n        assertEquals(2, slices.horizontalSlices.size)\n    }\n\n    @Test\n    fun filterEmptySlices() {\n        val slices = Slices(\n            listOf(Slice(0.0f, 0.0f), Slice(2.0f, 3.0f)),\n            listOf(Slice(0.0f, 0.0f), Slice(2.0f, 3.0f))\n        )\n        assertEquals(1, slices.verticalSlices.size)\n        assertEquals(1, slices.horizontalSlices.size)\n    }\n\n    // TODO: test path resizing\n}\n"
  },
  {
    "path": "v9/src/main/AndroidManifest.xml",
    "content": "<manifest />\n"
  },
  {
    "path": "v9/src/main/java/dev/romainguy/graphics/v9/PathResizer.kt",
    "content": "/*\n * Copyright (C) 2022 Romain Guy\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 dev.romainguy.graphics.v9\n\nimport android.graphics.Path\nimport android.graphics.PointF\nimport android.graphics.Rect\nimport android.graphics.RectF\nimport dev.romainguy.graphics.path.PathSegment\nimport dev.romainguy.graphics.path.iterator\n\nclass Slice(val start: Float, val end: Float) {\n    val size = end - start\n\n    init {\n        require(start <= end) {\n            \"\"\"|Invalid slice, start must be <= end:\n               |    start = $start\n               |    end   = $end\n            \"\"\".trimMargin()\n        }\n    }\n\n    override fun toString(): String = \"Slice(start=$start, end=$end)\"\n\n    override fun equals(other: Any?): Boolean {\n        if (this === other) return true\n        if (javaClass != other?.javaClass) return false\n\n        other as Slice\n\n        if (start != other.start) return false\n        if (end != other.end) return false\n\n        return true\n    }\n\n    override fun hashCode(): Int {\n        var result = start.hashCode()\n        result = 31 * result + end.hashCode()\n        return result\n    }\n}\n\nfun Slices(slices: Rect) = Slices(\n    slices.left.toFloat(),\n    slices.top.toFloat(),\n    slices.right.toFloat(),\n    slices.bottom.toFloat()\n)\n\nfun Slices(left: Int, top: Int, right: Int, bottom: Int) = Slices(\n    left.toFloat(),\n    top.toFloat(),\n    right.toFloat(),\n    bottom.toFloat()\n)\n\nfun Slices(slices: RectF) = Slices(slices.left, slices.top, slices.right, slices.bottom)\n\nfun Slices(left: Float, top: Float, right: Float, bottom: Float) = Slices(\n    listOf(Slice(left, right)),\n    listOf(Slice(top, bottom))\n)\n\nclass Slices(verticalSlices: List<Slice>, horizontalSlices: List<Slice>) {\n    val verticalSlices: Array<Slice>\n    private val verticalTotal: Float\n\n    val horizontalSlices: Array<Slice>\n    private val horizontalTotal: Float\n\n    init {\n        require(verticalSlices.isNotEmpty()) { \"At least 1 vertical slice is required\" }\n        require(horizontalSlices.isNotEmpty()) { \"At least 1 horizontal slice is required\" }\n\n        // TODO: merge overlapping/connected slices\n        this.verticalSlices = verticalSlices\n            .filter { it.size > 0 }\n            .sortedBy { it.start }\n            .toTypedArray()\n        this.verticalTotal = this.verticalSlices.sumOf { it.size.toDouble() }.toFloat()\n\n        this.horizontalSlices = horizontalSlices\n            .filter { it.size > 0 }\n            .sortedBy { it.start }\n            .toTypedArray()\n        this.horizontalTotal = this.horizontalSlices.sumOf { it.size.toDouble() }.toFloat()\n    }\n\n    override fun toString(): String {\n        return \"Slices(\" +\n                \"verticalSlices=${verticalSlices.contentToString()}, \" +\n                \"horizontalSlices=${horizontalSlices.contentToString()})\"\n    }\n}\n\nfun Path.slice(slices: Slices) = PathResizer(this, slices)\n\nclass PathResizer(val path: Path, val slices: Slices) {\n    val bounds: RectF = RectF()\n\n    private val segments: ArrayList<PathSegment>\n\n    // We only need 3 points but it makes an algorithm easier later\n    private val points = Array(4) { PointF(0.0f, 0.0f) }\n\n    private var stretchableWidth = 0.0f\n    private var stretchableHeight = 0.0f\n\n    init {\n        path.computeBounds(bounds, true)\n\n        val iterator = path.iterator()\n\n        segments = ArrayList(iterator.rawSize())\n        // TODO: optimize using a large array and next(FloatArray, Int)\n        //       even if we waste 8 floats per segment, we should get better locality\n        //       compared to PathSegment instances with arrays of PointF\n        for (segment in iterator) {\n            if (segment.type != PathSegment.Type.Done) segments.add(segment)\n        }\n\n        for (slice in slices.verticalSlices) stretchableWidth += slice.size\n        for (slice in slices.horizontalSlices) stretchableHeight += slice.size\n    }\n\n    fun resize(width: Float, height: Float, dstPath: Path = Path()): Path {\n        require(width >= bounds.width()) {\n            \"\"\"|The destination width must be >= original path width:\n               |    destination width = $width\n               |    source path width = ${bounds.width()}\n            \"\"\".trimMargin()\n        }\n        require(height >= bounds.height()) {\n            \"\"\"|The destination height must be >= original path height:\n               |    destination height = $height\n               |    source path height = ${bounds.height()}\n            \"\"\".trimMargin()\n        }\n\n        dstPath.rewind()\n\n        val stretchX = (width - bounds.width()) / stretchableWidth\n        val stretchY = (height - bounds.height()) / stretchableHeight\n\n        for (i in 0 until segments.size) {\n            val segment = segments[i]\n            val offsetPositions = points\n            when (segment.type) {\n                PathSegment.Type.Move -> {\n                    offset(segment.points, 0, 0, offsetPositions, slices, stretchX, stretchY)\n                    dstPath.moveTo(offsetPositions[0].x, offsetPositions[0].y)\n                }\n                PathSegment.Type.Line -> {\n                    offset(segment.points, 1, 1, offsetPositions, slices, stretchX, stretchY)\n                    dstPath.lineTo(offsetPositions[1].x, offsetPositions[1].y)\n                }\n                PathSegment.Type.Quadratic -> {\n                    offset(segment.points, 1, 2, offsetPositions, slices, stretchX, stretchY)\n                    dstPath.quadTo(\n                        offsetPositions[1].x, offsetPositions[1].y,\n                        offsetPositions[2].x, offsetPositions[2].y\n                    )\n                }\n                PathSegment.Type.Conic -> {\n                    // Cannot happen since we convert conics to quadratics\n                }\n                PathSegment.Type.Cubic -> {\n                    offset(segment.points, 1, 3, offsetPositions, slices, stretchX, stretchY)\n                    dstPath.cubicTo(\n                        offsetPositions[1].x, offsetPositions[1].y,\n                        offsetPositions[2].x, offsetPositions[2].y,\n                        offsetPositions[3].x, offsetPositions[3].y\n                    )\n                }\n                PathSegment.Type.Close -> dstPath.close()\n                else -> { }\n            }\n        }\n\n        return dstPath\n    }\n}\n\nprivate fun offset(\n    positions: Array<PointF>,\n    startPosition: Int,\n    endPosition: Int,\n    offsetPositions: Array<PointF>,\n    slices: Slices,\n    stretchX: Float,\n    stretchY: Float\n) {\n    for (i in startPosition..endPosition) {\n        offsetPositions[i].x = positions[i].x\n        offsetPositions[i].y = positions[i].y\n    }\n\n    // NOTE: We could maybe optimize this a little bit using a precomputed sum table.\n    //       We would however only save a multiply and a few adds so probably not worth it?\n    var position = positions[endPosition].x\n    for (slice in slices.verticalSlices) {\n        if (position > slice.start) {\n            var offset = slice.size * stretchX\n            if (position <= slice.end) {\n                offset *= (position - slice.start) / slice.size\n            }\n            for (i in startPosition..endPosition) {\n                offsetPositions[i].x += offset\n            }\n        }\n    }\n\n    position = positions[endPosition].y\n    for (slice in slices.horizontalSlices) {\n        if (position > slice.start) {\n            var offset = slice.size * stretchY\n            if (position <= slice.end) {\n                offset *= (position - slice.start) / slice.size\n            }\n            for (i in startPosition..endPosition) {\n                offsetPositions[i].y += offset\n            }\n        }\n    }\n}\n"
  },
  {
    "path": "v9-demo/.gitignore",
    "content": "/build"
  },
  {
    "path": "v9-demo/build.gradle",
    "content": "plugins {\n    id 'com.android.application'\n    id 'org.jetbrains.kotlin.android'\n}\n\nandroid {\n    defaultConfig {\n        applicationId \"dev.romainguy.graphics.v9.demo\"\n        minSdk 28\n        targetSdk 34\n        compileSdk 34\n\n        versionCode 1\n        versionName \"1.0\"\n\n        vectorDrawables {\n            useSupportLibrary true\n        }\n    }\n\n    buildTypes {\n        release {\n            minifyEnabled true\n            proguardFiles getDefaultProguardFile('proguard-android-optimize.txt'), 'proguard-rules.pro'\n        }\n        debug {\n            minifyEnabled true\n            proguardFiles getDefaultProguardFile('proguard-android-optimize.txt'), 'proguard-rules.pro'\n        }\n    }\n\n    compileOptions {\n        sourceCompatibility JavaVersion.VERSION_1_8\n        targetCompatibility JavaVersion.VERSION_1_8\n    }\n\n    kotlinOptions {\n        jvmTarget = '1.8'\n    }\n\n    buildFeatures {\n        compose true\n    }\n\n    composeOptions {\n        kotlinCompilerExtensionVersion compose_compiler_version\n    }\n\n    packagingOptions {\n        resources {\n            excludes += '/META-INF/{AL2.0,LGPL2.1}'\n        }\n    }\n    namespace 'dev.romainguy.graphics.v9.demo'\n}\n\ndependencies {\n    implementation 'androidx.core:core-ktx:1.12.0'\n    implementation \"androidx.compose.ui:ui:$compose_version\"\n    implementation \"androidx.compose.material:material:$compose_version\"\n    implementation \"androidx.compose.ui:ui-tooling-preview:$compose_version\"\n    implementation 'androidx.lifecycle:lifecycle-runtime-ktx:2.6.2'\n    implementation 'androidx.activity:activity-compose:1.8.1'\n    implementation 'com.google.android.material:material:1.10.0'\n\n    implementation \"dev.romainguy:pathway:$pathway_version\"\n\n    implementation project(path: ':v9')\n\n    debugImplementation \"androidx.compose.ui:ui-tooling:$compose_version\"\n}\n"
  },
  {
    "path": "v9-demo/proguard-rules.pro",
    "content": "# Add project specific ProGuard rules here.\n# You can control the set of applied configuration files using the\n# proguardFiles setting in build.gradle.\n#\n# For more details, see\n#   http://developer.android.com/guide/developing/tools/proguard.html\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\n# Uncomment this to preserve the line number information for\n# debugging stack traces.\n#-keepattributes SourceFile,LineNumberTable\n\n# If you keep the line number information, uncomment this to\n# hide the original source file name.\n#-renamesourcefileattribute SourceFile"
  },
  {
    "path": "v9-demo/src/main/AndroidManifest.xml",
    "content": "<?xml version=\"1.0\" encoding=\"utf-8\"?>\n<manifest xmlns:android=\"http://schemas.android.com/apk/res/android\">\n\n    <application\n        android:allowBackup=\"true\"\n        android:icon=\"@mipmap/ic_launcher\"\n        android:label=\"@string/app_name\"\n        android:roundIcon=\"@mipmap/ic_launcher_round\"\n        android:supportsRtl=\"true\"\n        android:theme=\"@style/Theme.V9\">\n        <activity\n            android:name=\".V9Activity\"\n            android:exported=\"true\"\n            android:label=\"@string/app_name\"\n            android:theme=\"@style/Theme.V9\">\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    </application>\n\n</manifest>\n"
  },
  {
    "path": "v9-demo/src/main/java/dev/romainguy/graphics/v9/demo/V9Activity.kt",
    "content": "package dev.romainguy.graphics.v9.demo\n\nimport android.graphics.PointF\nimport android.os.Bundle\nimport androidx.activity.ComponentActivity\nimport androidx.activity.compose.setContent\nimport androidx.compose.foundation.Canvas\nimport androidx.compose.foundation.layout.*\nimport androidx.compose.material.MaterialTheme\nimport androidx.compose.material.Slider\nimport androidx.compose.material.Surface\nimport androidx.compose.material.Text\nimport androidx.compose.runtime.Composable\nimport androidx.compose.runtime.mutableStateOf\nimport androidx.compose.runtime.remember\nimport androidx.compose.ui.Alignment.Companion.CenterVertically\nimport androidx.compose.ui.Modifier\nimport androidx.compose.ui.geometry.Offset\nimport androidx.compose.ui.geometry.Size\nimport androidx.compose.ui.graphics.*\nimport androidx.compose.ui.graphics.drawscope.DrawScope\nimport androidx.compose.ui.graphics.drawscope.scale\nimport androidx.compose.ui.graphics.drawscope.translate\nimport androidx.compose.ui.unit.dp\nimport dev.romainguy.graphics.path.PathSegment\nimport dev.romainguy.graphics.path.iterator\nimport dev.romainguy.graphics.v9.Slices\nimport dev.romainguy.graphics.v9.demo.ui.theme.V9Theme\nimport dev.romainguy.graphics.v9.slice\n\nval Bubble = Path().apply {\n    moveTo(20.0f, 2.0f)\n    lineTo(4.0f, 2.0f)\n    relativeCubicTo(-1.1f, 0.0f, -2.0f, 0.9f, -2.0f, 2.0f)\n    relativeLineTo(0.0f, 18.0f)\n    relativeLineTo(4.0f, -4.0f)\n    relativeLineTo(14.0f, 0.0f)\n    relativeCubicTo(1.1f, 0.0f, 2.0f, -0.9f, 2.0f, -2.0f)\n    lineTo(22.0f, 4.0f)\n    relativeCubicTo(0.0f, -1.1f, -0.9f, -2.0f, -2.0f, -2.0f)\n    close()\n}\nval Assessment = Path().apply {\n    moveTo(19.0f, 3.0f)\n    lineTo(5.0f, 3.0f)\n    relativeCubicTo(-1.1f, 0.0f, -2.0f, 0.9f, -2.0f, 2.0f)\n    relativeLineTo(0.0f, 14.0f)\n    relativeCubicTo(0.0f, 1.1f, 0.9f, 2.0f, 2.0f, 2.0f)\n    relativeLineTo(14.0f, 0.0f)\n    relativeCubicTo(1.1f, 0.0f, 2.0f, -0.9f, 2.0f, -2.0f)\n    lineTo(21.0f, 5.0f)\n    relativeCubicTo(0.0f, -1.1f, -0.9f, -2.0f, -2.0f, -2.0f)\n    close()\n    moveTo(9.0f, 17.0f)\n    lineTo(7.0f, 17.0f)\n    relativeLineTo(0.0f, -7.0f)\n    relativeLineTo(2.0f, 0.0f)\n    relativeLineTo(0.0f, 7.0f)\n    close()\n    moveTo(13.0f, 17.0f)\n    relativeLineTo(-2.0f, 0.0f)\n    lineTo(11.0f, 7.0f)\n    relativeLineTo(2.0f, 0.0f)\n    relativeLineTo(0.0f, 10.0f)\n    close()\n    moveTo(17.0f, 17.0f)\n    relativeLineTo(-2.0f, 0.0f)\n    relativeLineTo(0.0f, -4.0f)\n    relativeLineTo(2.0f, 0.0f)\n    relativeLineTo(0.0f, 4.0f)\n    close()\n}\n\nclass V9Activity : ComponentActivity() {\n    override fun onCreate(savedInstanceState: Bundle?) {\n        super.onCreate(savedInstanceState)\n\n        setContent {\n            V9Theme {\n                Surface(\n                    modifier = Modifier.fillMaxSize(),\n                    color = MaterialTheme.colors.background\n                ) {\n                    Column {\n                        val pathWidth = remember { mutableStateOf(68.0f) }\n                        val pathHeight = remember { mutableStateOf(32.0f) }\n                        val path = remember { mutableStateOf(Bubble) }\n                        val slices = remember {\n                            Slices(9.0f, 7.0f, 15.0f, 13.0f)\n//                            Slices(\n//                                listOf(Slice(9.0f, 10.0f), Slice(14.0f, 15.0f)),\n//                                listOf(Slice(5.0f, 6.0f), Slice(18.0f, 19.0f))\n//                            )\n                        }\n                        val resizablePath = remember(path.value) {\n                            path.value.asAndroidPath().slice(slices)\n                        }\n                        val resizedPath = remember(resizablePath, pathWidth.value, pathHeight.value) {\n                            resizablePath.resize(pathWidth.value, pathHeight.value).asComposePath()\n                        }\n\n                        ResizablePathViewer(\n                            modifier = Modifier\n                                .fillMaxWidth()\n                                .fillMaxHeight(0.5f),\n                            path.value,\n                            resizedPath,\n                            slices\n                        )\n\n                        Row(\n                            modifier = Modifier.padding(start = 16.dp, end = 16.dp)\n                        ) {\n                            Text(\n                               modifier = Modifier.align(CenterVertically),\n                               text  = \"Width\"\n                            )\n                            Slider(\n                               modifier = Modifier\n                                   .weight(1.0f)\n                                   .align(CenterVertically),\n                               value = pathWidth.value,\n                               onValueChange = { pathWidth.value = it },\n                               valueRange = resizablePath.bounds.width()..68.0f\n                            )\n                        }\n\n                        Row(\n                            modifier = Modifier.padding(start = 16.dp, end = 16.dp)\n                        ) {\n                            Text(\n                                modifier = Modifier.align(CenterVertically),\n                                text  = \"Height\"\n                            )\n                            Slider(\n                                modifier = Modifier\n                                    .weight(1.0f)\n                                    .align(CenterVertically),\n                                value = pathHeight.value,\n                                onValueChange = { pathHeight.value = it },\n                                valueRange = resizablePath.bounds.height()..48.0f\n                            )\n                        }\n                    }\n                }\n            }\n        }\n    }\n}\n\n@Composable\nprivate fun ResizablePathViewer(\n    modifier: Modifier = Modifier,\n    path: Path,\n    resizedPath: Path,\n    slices: Slices\n) {\n    val pathColor = SolidColor(MaterialTheme.colors.surface)\n    val accent1Color = SolidColor(Color(0.925f, 0.251f, 0.478f, 1.0f))\n    val accent1FillColor = SolidColor(accent1Color.value.copy(alpha = 0.1f))\n    val accent2Color = SolidColor(Color(0.149f, 0.776f, 0.855f, 1.0f))\n    val accent2FillColor = SolidColor(accent2Color.value.copy(alpha = 0.1f))\n    val dashEffect = PathEffect.dashPathEffect(floatArrayOf(1.0f, 0.5f))\n\n    val pathSize = 24.0f\n    val strokeWidth = 0.25f\n\n    Canvas(\n        modifier = modifier\n    ) {\n        scale(14.0f, pivot = Offset.Zero) {\n            drawPath(\n                path,\n                brush = pathColor\n            )\n\n            translate(left = pathSize) {\n                drawPath(\n                    path,\n                    brush = pathColor\n                )\n\n                drawPathControls(path, accent1Color, strokeWidth)\n            }\n\n            translate(left = pathSize * 2.0f) {\n                drawPath(\n                    path,\n                    brush = pathColor\n                )\n\n                slices.horizontalSlices.forEach { slice ->\n                    if (slice.size > 0) {\n                        drawLine(\n                            brush = accent2Color,\n                            start = Offset(0.0f, slice.start),\n                            end = Offset(pathSize, slice.start),\n                            strokeWidth = strokeWidth,\n                            pathEffect = dashEffect\n                        )\n                        drawLine(\n                            brush = accent2Color,\n                            start = Offset(0.0f, slice.end),\n                            end = Offset(pathSize, slice.end),\n                            strokeWidth = strokeWidth,\n                            pathEffect = dashEffect\n                        )\n                        drawRect(\n                            brush = accent2FillColor,\n                            topLeft = Offset(0.0f, slice.start),\n                            size = Size(pathSize, slice.end - slice.start)\n                        )\n                    }\n                }\n\n                slices.verticalSlices.forEach { slice ->\n                    if (slice.size > 0) {\n                        drawLine(\n                            brush = accent1Color,\n                            start = Offset(slice.start, 0.0f),\n                            end = Offset(slice.start, pathSize),\n                            strokeWidth = strokeWidth,\n                            pathEffect = dashEffect\n                        )\n                        drawLine(\n                            brush = accent1Color,\n                            start = Offset(slice.end, 0.0f),\n                            end = Offset(slice.end, pathSize),\n                            strokeWidth = strokeWidth,\n                            pathEffect = dashEffect\n                        )\n                        drawRect(\n                            brush = accent1FillColor,\n                            topLeft = Offset(slice.start, 0.0f),\n                            size = Size(slice.end - slice.start, pathSize)\n                        )\n                    }\n                }\n            }\n\n            translate(top = pathSize + 4.0f) {\n                drawPath(\n                    resizedPath,\n                    brush = pathColor\n                )\n            }\n        }\n    }\n}\n\nprivate fun DrawScope.drawPathControls(\n    path: Path,\n    accentColor: SolidColor,\n    strokeWidth: Float\n) {\n    for (segment in path.asAndroidPath()) {\n        when (segment.type) {\n            PathSegment.Type.Quadratic -> {\n                drawLine(\n                    brush = accentColor,\n                    start = segment.points[0].toOffset(),\n                    end = segment.points[1].toOffset(),\n                    strokeWidth = strokeWidth\n                )\n                drawLine(\n                    brush = accentColor,\n                    start = segment.points[1].toOffset(),\n                    end = segment.points[2].toOffset(),\n                    strokeWidth = strokeWidth\n                )\n            }\n            PathSegment.Type.Conic,\n            PathSegment.Type.Cubic -> {\n                drawLine(\n                    brush = accentColor,\n                    start = segment.points[0].toOffset(),\n                    end = segment.points[1].toOffset(),\n                    strokeWidth = strokeWidth\n                )\n                drawLine(\n                    brush = accentColor,\n                    start = segment.points[2].toOffset(),\n                    end = segment.points[3].toOffset(),\n                    strokeWidth = strokeWidth\n                )\n            }\n            else -> {}\n        }\n        for (point in segment.points) {\n            drawCircle(\n                brush = accentColor,\n                radius = 0.4f,\n                center = point.toOffset()\n            )\n        }\n    }\n}\n\nprivate fun PointF.toOffset() = Offset(x, y)\n"
  },
  {
    "path": "v9-demo/src/main/java/dev/romainguy/graphics/v9/demo/ui/theme/Shape.kt",
    "content": "package dev.romainguy.graphics.v9.demo.ui.theme\n\nimport androidx.compose.foundation.shape.RoundedCornerShape\nimport androidx.compose.material.Shapes\nimport androidx.compose.ui.unit.dp\n\nval Shapes = Shapes(\n    small = RoundedCornerShape(4.dp),\n    medium = RoundedCornerShape(4.dp),\n    large = RoundedCornerShape(0.dp)\n)"
  },
  {
    "path": "v9-demo/src/main/java/dev/romainguy/graphics/v9/demo/ui/theme/Theme.kt",
    "content": "package dev.romainguy.graphics.v9.demo.ui.theme\n\nimport androidx.compose.material.MaterialTheme\nimport androidx.compose.material.lightColors\nimport androidx.compose.runtime.Composable\nimport androidx.compose.ui.graphics.Color\n\nprivate val LightColorPalette = lightColors(\n    primary = Color(0xFF9DECFC),\n    primaryVariant = Color(0xFFC4C4C4),\n    secondary = Color(0xFF9DECFC),\n    secondaryVariant = Color(0xFFC4C4C4),\n\n    background = Color(0xFF3E4757),\n    onBackground = Color(0xFFFFFFFF),\n    surface = Color(0xFFFFFFFF),\n    onSurface = Color(0xFF000000),\n    onPrimary = Color(0xFF1A1B1E),\n    onSecondary = Color(0xFF000000),\n)\n\n@Composable\nfun V9Theme(content: @Composable () -> Unit) {\n    MaterialTheme(\n        colors = LightColorPalette,\n        typography = Typography,\n        shapes = Shapes,\n        content = content\n    )\n}"
  },
  {
    "path": "v9-demo/src/main/java/dev/romainguy/graphics/v9/demo/ui/theme/Type.kt",
    "content": "package dev.romainguy.graphics.v9.demo.ui.theme\n\nimport androidx.compose.material.Typography\nimport androidx.compose.ui.text.TextStyle\nimport androidx.compose.ui.text.font.FontFamily\nimport androidx.compose.ui.text.font.FontWeight\nimport androidx.compose.ui.unit.em\nimport androidx.compose.ui.unit.sp\n\nval Typography= Typography(\n    h1 = TextStyle(\n        fontWeight = FontWeight.W100,\n        fontSize = 76.sp,\n    ),\n    h2 = TextStyle(\n        fontWeight = FontWeight.SemiBold,\n        fontSize = 44.sp,\n        letterSpacing = 1.5.sp\n    ),\n    h3 = TextStyle(\n        fontWeight = FontWeight.W400,\n        fontSize = 18.sp\n    ),\n    h4 = TextStyle(\n        fontWeight = FontWeight.W700,\n        fontSize = 18.sp\n    ),\n    h5 = TextStyle(\n        fontWeight = FontWeight.W400,\n        fontSize = 18.sp\n    ),\n    h6 = TextStyle(\n        fontWeight = FontWeight.W400,\n        fontSize = 15.sp\n    ),\n    subtitle1 = TextStyle(\n        fontWeight = FontWeight.Light,\n        fontSize = 14.sp,\n        lineHeight = 20.sp,\n        letterSpacing = 3.sp\n    ),\n    subtitle2 = TextStyle(\n        fontWeight = FontWeight.Normal,\n        fontSize = 14.sp,\n        letterSpacing = 0.02.em\n    ),\n    body1 = TextStyle(\n        fontWeight = FontWeight.Normal,\n        fontSize = 16.sp,\n        letterSpacing = 0.02.em\n    ),\n    body2 = TextStyle(\n        fontWeight = FontWeight.Normal,\n        fontSize = 14.sp,\n        lineHeight = 20.sp,\n        letterSpacing = 0.02.em\n    ),\n    button = TextStyle(\n        fontWeight = FontWeight.Bold,\n        fontSize = 14.sp,\n        lineHeight = 16.sp,\n        letterSpacing = 0.1.em\n    ),\n    caption = TextStyle(\n        fontWeight = FontWeight.W500,\n        fontSize = 12.sp\n    ),\n    overline = TextStyle(\n        fontWeight = FontWeight.W500,\n        fontSize = 10.sp\n    )\n)\n"
  },
  {
    "path": "v9-demo/src/main/res/drawable/ic_launcher_background.xml",
    "content": "<?xml version=\"1.0\" encoding=\"utf-8\"?>\n<vector xmlns:android=\"http://schemas.android.com/apk/res/android\"\n    android:width=\"108dp\"\n    android:height=\"108dp\"\n    android:viewportWidth=\"108\"\n    android:viewportHeight=\"108\">\n    <path\n        android:fillColor=\"#FF9DECFC\"\n        android:pathData=\"M0,0h108v108h-108z\" />\n    <path\n        android:fillColor=\"#00000000\"\n        android:pathData=\"M9,0L9,108\"\n        android:strokeWidth=\"0.8\"\n        android:strokeColor=\"#33FFFFFF\" />\n    <path\n        android:fillColor=\"#00000000\"\n        android:pathData=\"M19,0L19,108\"\n        android:strokeWidth=\"0.8\"\n        android:strokeColor=\"#33FFFFFF\" />\n    <path\n        android:fillColor=\"#00000000\"\n        android:pathData=\"M29,0L29,108\"\n        android:strokeWidth=\"0.8\"\n        android:strokeColor=\"#33FFFFFF\" />\n    <path\n        android:fillColor=\"#00000000\"\n        android:pathData=\"M39,0L39,108\"\n        android:strokeWidth=\"0.8\"\n        android:strokeColor=\"#33FFFFFF\" />\n    <path\n        android:fillColor=\"#00000000\"\n        android:pathData=\"M49,0L49,108\"\n        android:strokeWidth=\"0.8\"\n        android:strokeColor=\"#33FFFFFF\" />\n    <path\n        android:fillColor=\"#00000000\"\n        android:pathData=\"M59,0L59,108\"\n        android:strokeWidth=\"0.8\"\n        android:strokeColor=\"#33FFFFFF\" />\n    <path\n        android:fillColor=\"#00000000\"\n        android:pathData=\"M69,0L69,108\"\n        android:strokeWidth=\"0.8\"\n        android:strokeColor=\"#33FFFFFF\" />\n    <path\n        android:fillColor=\"#00000000\"\n        android:pathData=\"M79,0L79,108\"\n        android:strokeWidth=\"0.8\"\n        android:strokeColor=\"#33FFFFFF\" />\n    <path\n        android:fillColor=\"#00000000\"\n        android:pathData=\"M89,0L89,108\"\n        android:strokeWidth=\"0.8\"\n        android:strokeColor=\"#33FFFFFF\" />\n    <path\n        android:fillColor=\"#00000000\"\n        android:pathData=\"M99,0L99,108\"\n        android:strokeWidth=\"0.8\"\n        android:strokeColor=\"#33FFFFFF\" />\n    <path\n        android:fillColor=\"#00000000\"\n        android:pathData=\"M0,9L108,9\"\n        android:strokeWidth=\"0.8\"\n        android:strokeColor=\"#33FFFFFF\" />\n    <path\n        android:fillColor=\"#00000000\"\n        android:pathData=\"M0,19L108,19\"\n        android:strokeWidth=\"0.8\"\n        android:strokeColor=\"#33FFFFFF\" />\n    <path\n        android:fillColor=\"#00000000\"\n        android:pathData=\"M0,29L108,29\"\n        android:strokeWidth=\"0.8\"\n        android:strokeColor=\"#33FFFFFF\" />\n    <path\n        android:fillColor=\"#00000000\"\n        android:pathData=\"M0,39L108,39\"\n        android:strokeWidth=\"0.8\"\n        android:strokeColor=\"#33FFFFFF\" />\n    <path\n        android:fillColor=\"#00000000\"\n        android:pathData=\"M0,49L108,49\"\n        android:strokeWidth=\"0.8\"\n        android:strokeColor=\"#33FFFFFF\" />\n    <path\n        android:fillColor=\"#00000000\"\n        android:pathData=\"M0,59L108,59\"\n        android:strokeWidth=\"0.8\"\n        android:strokeColor=\"#33FFFFFF\" />\n    <path\n        android:fillColor=\"#00000000\"\n        android:pathData=\"M0,69L108,69\"\n        android:strokeWidth=\"0.8\"\n        android:strokeColor=\"#33FFFFFF\" />\n    <path\n        android:fillColor=\"#00000000\"\n        android:pathData=\"M0,79L108,79\"\n        android:strokeWidth=\"0.8\"\n        android:strokeColor=\"#33FFFFFF\" />\n    <path\n        android:fillColor=\"#00000000\"\n        android:pathData=\"M0,89L108,89\"\n        android:strokeWidth=\"0.8\"\n        android:strokeColor=\"#33FFFFFF\" />\n    <path\n        android:fillColor=\"#00000000\"\n        android:pathData=\"M0,99L108,99\"\n        android:strokeWidth=\"0.8\"\n        android:strokeColor=\"#33FFFFFF\" />\n    <path\n        android:fillColor=\"#00000000\"\n        android:pathData=\"M19,29L89,29\"\n        android:strokeWidth=\"0.8\"\n        android:strokeColor=\"#33FFFFFF\" />\n    <path\n        android:fillColor=\"#00000000\"\n        android:pathData=\"M19,39L89,39\"\n        android:strokeWidth=\"0.8\"\n        android:strokeColor=\"#33FFFFFF\" />\n    <path\n        android:fillColor=\"#00000000\"\n        android:pathData=\"M19,49L89,49\"\n        android:strokeWidth=\"0.8\"\n        android:strokeColor=\"#33FFFFFF\" />\n    <path\n        android:fillColor=\"#00000000\"\n        android:pathData=\"M19,59L89,59\"\n        android:strokeWidth=\"0.8\"\n        android:strokeColor=\"#33FFFFFF\" />\n    <path\n        android:fillColor=\"#00000000\"\n        android:pathData=\"M19,69L89,69\"\n        android:strokeWidth=\"0.8\"\n        android:strokeColor=\"#33FFFFFF\" />\n    <path\n        android:fillColor=\"#00000000\"\n        android:pathData=\"M19,79L89,79\"\n        android:strokeWidth=\"0.8\"\n        android:strokeColor=\"#33FFFFFF\" />\n    <path\n        android:fillColor=\"#00000000\"\n        android:pathData=\"M29,19L29,89\"\n        android:strokeWidth=\"0.8\"\n        android:strokeColor=\"#33FFFFFF\" />\n    <path\n        android:fillColor=\"#00000000\"\n        android:pathData=\"M39,19L39,89\"\n        android:strokeWidth=\"0.8\"\n        android:strokeColor=\"#33FFFFFF\" />\n    <path\n        android:fillColor=\"#00000000\"\n        android:pathData=\"M49,19L49,89\"\n        android:strokeWidth=\"0.8\"\n        android:strokeColor=\"#33FFFFFF\" />\n    <path\n        android:fillColor=\"#00000000\"\n        android:pathData=\"M59,19L59,89\"\n        android:strokeWidth=\"0.8\"\n        android:strokeColor=\"#33FFFFFF\" />\n    <path\n        android:fillColor=\"#00000000\"\n        android:pathData=\"M69,19L69,89\"\n        android:strokeWidth=\"0.8\"\n        android:strokeColor=\"#33FFFFFF\" />\n    <path\n        android:fillColor=\"#00000000\"\n        android:pathData=\"M79,19L79,89\"\n        android:strokeWidth=\"0.8\"\n        android:strokeColor=\"#33FFFFFF\" />\n</vector>\n"
  },
  {
    "path": "v9-demo/src/main/res/drawable-v24/ic_launcher_foreground.xml",
    "content": "<?xml version=\"1.0\" encoding=\"utf-8\"?>\n<vector xmlns:android=\"http://schemas.android.com/apk/res/android\"\n    android:width=\"24dp\"\n    android:height=\"24dp\"\n    android:viewportWidth=\"24\"\n    android:viewportHeight=\"24\"\n    android:tint=\"#3E4757\">\n    <path\n        android:fillColor=\"@android:color/white\"\n        android:pathData=\"M3,5v4h2L5,5h4L9,3L5,3c-1.1,0 -2,0.9 -2,2zM5,15L3,15v4c0,1.1 0.9,2 2,2h4v-2L5,19v-4zM19,19h-4v2h4c1.1,0 2,-0.9 2,-2v-4h-2v4zM19,3h-4v2h4v4h2L21,5c0,-1.1 -0.9,-2 -2,-2z\" />\n</vector>\n"
  },
  {
    "path": "v9-demo/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>\n        <inset\n            android:insetBottom=\"16dp\"\n            android:insetLeft=\"16dp\"\n            android:insetRight=\"16dp\"\n            android:insetTop=\"16dp\">\n            <vector\n                android:width=\"24dp\"\n                android:height=\"24dp\"\n                android:viewportWidth=\"24\"\n                android:viewportHeight=\"24\"\n                android:tint=\"#3E4757\">\n                <path\n                    android:fillColor=\"@android:color/white\"\n                    android:pathData=\"M3,5v4h2L5,5h4L9,3L5,3c-1.1,0 -2,0.9 -2,2zM5,15L3,15v4c0,1.1 0.9,2 2,2h4v-2L5,19v-4zM19,19h-4v2h4c1.1,0 2,-0.9 2,-2v-4h-2v4zM19,3h-4v2h4v4h2L21,5c0,-1.1 -0.9,-2 -2,-2z\" />\n            </vector>\n        </inset>\n    </foreground>\n</adaptive-icon>\n"
  },
  {
    "path": "v9-demo/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>\n        <inset\n            android:insetBottom=\"32dp\"\n            android:insetLeft=\"32dp\"\n            android:insetRight=\"32dp\"\n            android:insetTop=\"32dp\">\n            <vector\n                android:width=\"24dp\"\n                android:height=\"24dp\"\n                android:viewportWidth=\"24\"\n                android:viewportHeight=\"24\"\n                android:tint=\"#3E4757\">\n                <path\n                    android:fillColor=\"@android:color/white\"\n                    android:pathData=\"M3,5v4h2L5,5h4L9,3L5,3c-1.1,0 -2,0.9 -2,2zM5,15L3,15v4c0,1.1 0.9,2 2,2h4v-2L5,19v-4zM19,19h-4v2h4c1.1,0 2,-0.9 2,-2v-4h-2v4zM19,3h-4v2h4v4h2L21,5c0,-1.1 -0.9,-2 -2,-2z\" />\n            </vector>\n        </inset>\n    </foreground>\n</adaptive-icon>"
  },
  {
    "path": "v9-demo/src/main/res/values/colors.xml",
    "content": "<?xml version=\"1.0\" encoding=\"utf-8\"?>\n<resources>\n    <color name=\"black\">#FF000000</color>\n    <color name=\"white\">#FFFFFFFF</color>\n\n    <color name=\"colorBackground\">#FF3E4757</color>\n    <color name=\"colorPrimary\">#FF3E4757</color>\n    <color name=\"colorPrimaryVariant\">#FF1A1B1E</color>\n    <color name=\"colorOnPrimaryVariant\">#FFC4C4C4</color>\n    <color name=\"colorOnPrimary\">#FF9DECFC</color>\n    <color name=\"colorSecondary\">#FF9DECFC</color>\n    <color name=\"colorOnSecondary\">#FF000000</color>\n    <color name=\"colorAccent\">#FF9DECFC</color>\n</resources>\n"
  },
  {
    "path": "v9-demo/src/main/res/values/strings.xml",
    "content": "<resources>\n    <string name=\"app_name\">V9 Demo</string>\n</resources>"
  },
  {
    "path": "v9-demo/src/main/res/values/themes.xml",
    "content": "<?xml version=\"1.0\" encoding=\"utf-8\"?>\n<resources>\n    <style name=\"Theme.V9\" parent=\"Theme.MaterialComponents.DayNight.NoActionBar\">\n        <item name=\"colorSurface\">@color/colorAccent</item>\n        <item name=\"colorPrimary\">@color/colorPrimary</item>\n        <item name=\"colorPrimaryVariant\">@color/colorPrimary</item>\n        <item name=\"colorOnPrimary\">@color/colorOnPrimary</item>\n        <item name=\"colorSecondary\">@color/colorSecondary</item>\n        <item name=\"colorSecondaryVariant\">@color/colorSecondary</item>\n        <item name=\"colorAccent\">@color/colorAccent</item>\n        <item name=\"colorOnSecondary\">@color/colorOnSecondary</item>\n        <item name=\"colorControlHighlight\">@color/colorAccent</item>\n\n        <item name=\"android:textColorPrimary\">@color/colorOnPrimary</item>\n        <item name=\"android:textColorSecondary\">@color/colorOnSecondary</item>\n        <item name=\"android:textColorTertiary\">@color/colorOnSecondary</item>\n        <item name=\"android:textColorPrimaryInverse\">@color/colorPrimary</item>\n        <item name=\"android:textColorSecondaryInverse\">@color/colorOnPrimaryVariant</item>\n        <item name=\"android:textColorTertiaryInverse\">@color/white</item>\n\n        <item name=\"android:windowBackground\">@color/colorBackground</item>\n        <item name=\"android:windowLightStatusBar\">false</item>\n\n        <item name=\"android:statusBarColor\">@android:color/transparent</item>\n        <item name=\"android:navigationBarColor\">@android:color/transparent</item>\n    </style>\n\n\n    <style name=\"ShapeAppearance.WakeMeUp.MediumComponent\" parent=\"ShapeAppearance.MaterialComponents.MediumComponent\">\n        <item name=\"cornerFamily\">rounded</item>\n        <item name=\"cornerSize\">36dp</item>\n    </style>\n\n    <style name=\"TextAppearance.WakeMeUp.Display1\" parent=\"TextAppearance.AppCompat.Display1\">\n        <item name=\"android:textSize\">56sp</item>\n        <item name=\"android:textColor\">?android:attr/textColorPrimary</item>\n    </style>\n\n    <style name=\"TextAppearance.WakeMeUp.Display2\" parent=\"TextAppearance.AppCompat.Display2\">\n        <item name=\"android:textSize\">44sp</item>\n        <item name=\"android:textColor\">?android:attr/textColorPrimary</item>\n    </style>\n\n    <style name=\"TextAppearance.WakeMeUp.Display3\" parent=\"TextAppearance.AppCompat.Display3\">\n        <item name=\"android:textSize\">16sp</item>\n        <item name=\"android:textFontWeight\">700</item>\n        <item name=\"android:textStyle\">bold</item>\n        <item name=\"android:textColor\">?android:attr/textColorTertiaryInverse</item>\n    </style>\n\n    <style name=\"TextAppearance.WakeMeUp.Display4\" parent=\"TextAppearance.AppCompat.Display4\">\n        <item name=\"android:textSize\">14sp</item>\n        <item name=\"android:textFontWeight\">500</item>\n        <item name=\"android:textAllCaps\">true</item>\n        <item name=\"android:textColor\">?android:attr/textColorSecondary</item>\n    </style>\n\n    <style name=\"TextAppearance.WakeMeUp.Display5\" parent=\"TextAppearance.AppCompat.Display4\">\n        <item name=\"android:textSize\">14sp</item>\n        <item name=\"android:textFontWeight\">400</item>\n        <item name=\"android:textAllCaps\">true</item>\n        <item name=\"android:textColor\">?android:attr/textColorSecondaryInverse</item>\n    </style>\n</resources>\n"
  }
]