├── .github └── workflows │ └── swift.yml ├── .gitignore ├── .gitmodules ├── .swiftpm └── xcode │ └── package.xcworkspace │ └── contents.xcworkspacedata ├── LICENSE ├── Package.swift ├── README.md ├── Roundrect.h ├── Roundrect.xcodeproj ├── RoundrectTests_Info.plist ├── Roundrect_Info.plist ├── project.pbxproj ├── project.xcworkspace │ ├── contents.xcworkspacedata │ └── xcshareddata │ │ ├── IDEWorkspaceChecks.plist │ │ ├── WorkspaceSettings.xcsettings │ │ └── swiftpm │ │ └── Package.resolved └── xcshareddata │ └── xcschemes │ └── Roundrect.xcscheme ├── Sources └── Roundrect │ ├── ButtonStyle.swift │ ├── ButtonTheme.swift │ ├── ImageGeneration.swift │ ├── Roundrect.swift │ └── Util.swift ├── Tests └── RoundrectTests │ ├── AdaptiveColorTests.swift │ ├── Assets.xcassets │ ├── Contents.json │ ├── bluered.colorset │ │ └── Contents.json │ └── cyanmagenta.colorset │ │ └── Contents.json │ ├── ButtonStyleTests.swift │ ├── ImageGenerationTests.swift │ ├── SampleSheet.swift │ ├── SampleSheetTests.swift │ ├── SnapshotUtility.swift │ ├── TestUtility.swift │ └── __Snapshots__ │ ├── AdaptiveColorTests │ ├── testGradientFillDark.1.png │ ├── testGradientFillLight.1.png │ ├── testSingleFillLight.1.png │ └── testSingleFillLightDark.1.png │ ├── ButtonStyleTests │ ├── verifyStyle-button-identifier-file-line.bordered-all-10-0-1-0-big-dark-disabled.png │ ├── verifyStyle-button-identifier-file-line.bordered-all-10-0-1-0-big-dark-highlighted.png │ ├── verifyStyle-button-identifier-file-line.bordered-all-10-0-1-0-big-dark-normal.png │ ├── verifyStyle-button-identifier-file-line.bordered-all-10-0-1-0-big-disabled-dark.png │ ├── verifyStyle-button-identifier-file-line.bordered-all-10-0-1-0-big-disabled-light.png │ ├── verifyStyle-button-identifier-file-line.bordered-all-10-0-1-0-big-extraLight-disabled.png │ ├── verifyStyle-button-identifier-file-line.bordered-all-10-0-1-0-big-extraLight-highlighted.png │ ├── verifyStyle-button-identifier-file-line.bordered-all-10-0-1-0-big-extraLight-normal.png │ ├── verifyStyle-button-identifier-file-line.bordered-all-10-0-1-0-big-highlighted-dark.png │ ├── verifyStyle-button-identifier-file-line.bordered-all-10-0-1-0-big-highlighted-light.png │ ├── verifyStyle-button-identifier-file-line.bordered-all-10-0-1-0-big-light-disabled.png │ ├── verifyStyle-button-identifier-file-line.bordered-all-10-0-1-0-big-light-highlighted.png │ ├── verifyStyle-button-identifier-file-line.bordered-all-10-0-1-0-big-light-normal.png │ ├── verifyStyle-button-identifier-file-line.bordered-all-10-0-1-0-big-normal-dark.png │ ├── verifyStyle-button-identifier-file-line.bordered-all-10-0-1-0-big-normal-light.png │ ├── verifyStyle-button-identifier-file-line.bordered-all-10-0-1-0-small-dark-disabled.png │ ├── verifyStyle-button-identifier-file-line.bordered-all-10-0-1-0-small-dark-highlighted.png │ ├── verifyStyle-button-identifier-file-line.bordered-all-10-0-1-0-small-dark-normal.png │ ├── verifyStyle-button-identifier-file-line.bordered-all-10-0-1-0-small-disabled-dark.png │ ├── verifyStyle-button-identifier-file-line.bordered-all-10-0-1-0-small-disabled-light.png │ ├── verifyStyle-button-identifier-file-line.bordered-all-10-0-1-0-small-extraLight-disabled.png │ ├── verifyStyle-button-identifier-file-line.bordered-all-10-0-1-0-small-extraLight-highlighted.png │ ├── verifyStyle-button-identifier-file-line.bordered-all-10-0-1-0-small-extraLight-normal.png │ ├── verifyStyle-button-identifier-file-line.bordered-all-10-0-1-0-small-highlighted-dark.png │ ├── verifyStyle-button-identifier-file-line.bordered-all-10-0-1-0-small-highlighted-light.png │ ├── verifyStyle-button-identifier-file-line.bordered-all-10-0-1-0-small-light-disabled.png │ ├── verifyStyle-button-identifier-file-line.bordered-all-10-0-1-0-small-light-highlighted.png │ ├── verifyStyle-button-identifier-file-line.bordered-all-10-0-1-0-small-light-normal.png │ ├── verifyStyle-button-identifier-file-line.bordered-all-10-0-1-0-small-normal-dark.png │ ├── verifyStyle-button-identifier-file-line.bordered-all-10-0-1-0-small-normal-light.png │ ├── verifyStyle-button-identifier-file-line.filled-all-10-0-1-0-big-dark-disabled.png │ ├── verifyStyle-button-identifier-file-line.filled-all-10-0-1-0-big-dark-highlighted.png │ ├── verifyStyle-button-identifier-file-line.filled-all-10-0-1-0-big-dark-normal.png │ ├── verifyStyle-button-identifier-file-line.filled-all-10-0-1-0-big-disabled-dark.png │ ├── verifyStyle-button-identifier-file-line.filled-all-10-0-1-0-big-disabled-light.png │ ├── verifyStyle-button-identifier-file-line.filled-all-10-0-1-0-big-extraLight-disabled.png │ ├── verifyStyle-button-identifier-file-line.filled-all-10-0-1-0-big-extraLight-highlighted.png │ ├── verifyStyle-button-identifier-file-line.filled-all-10-0-1-0-big-extraLight-normal.png │ ├── verifyStyle-button-identifier-file-line.filled-all-10-0-1-0-big-highlighted-dark.png │ ├── verifyStyle-button-identifier-file-line.filled-all-10-0-1-0-big-highlighted-light.png │ ├── verifyStyle-button-identifier-file-line.filled-all-10-0-1-0-big-light-disabled.png │ ├── verifyStyle-button-identifier-file-line.filled-all-10-0-1-0-big-light-highlighted.png │ ├── verifyStyle-button-identifier-file-line.filled-all-10-0-1-0-big-light-normal.png │ ├── verifyStyle-button-identifier-file-line.filled-all-10-0-1-0-big-normal-dark.png │ ├── verifyStyle-button-identifier-file-line.filled-all-10-0-1-0-big-normal-light.png │ ├── verifyStyle-button-identifier-file-line.filled-all-10-0-1-0-small-dark-disabled.png │ ├── verifyStyle-button-identifier-file-line.filled-all-10-0-1-0-small-dark-highlighted.png │ ├── verifyStyle-button-identifier-file-line.filled-all-10-0-1-0-small-dark-normal.png │ ├── verifyStyle-button-identifier-file-line.filled-all-10-0-1-0-small-disabled-dark.png │ ├── verifyStyle-button-identifier-file-line.filled-all-10-0-1-0-small-disabled-light.png │ ├── verifyStyle-button-identifier-file-line.filled-all-10-0-1-0-small-extraLight-disabled.png │ ├── verifyStyle-button-identifier-file-line.filled-all-10-0-1-0-small-extraLight-highlighted.png │ ├── verifyStyle-button-identifier-file-line.filled-all-10-0-1-0-small-extraLight-normal.png │ ├── verifyStyle-button-identifier-file-line.filled-all-10-0-1-0-small-highlighted-dark.png │ ├── verifyStyle-button-identifier-file-line.filled-all-10-0-1-0-small-highlighted-light.png │ ├── verifyStyle-button-identifier-file-line.filled-all-10-0-1-0-small-light-disabled.png │ ├── verifyStyle-button-identifier-file-line.filled-all-10-0-1-0-small-light-highlighted.png │ ├── verifyStyle-button-identifier-file-line.filled-all-10-0-1-0-small-light-normal.png │ ├── verifyStyle-button-identifier-file-line.filled-all-10-0-1-0-small-normal-dark.png │ ├── verifyStyle-button-identifier-file-line.filled-all-10-0-1-0-small-normal-light.png │ ├── verifyStyle-button-identifier-file-line.gradient-all-10-0-UIExtendedSRGBColorSpace-1-0-0-1-UIExtendedSRGBColorSpace-0-0-1-1-big-dark-disabled.png │ ├── verifyStyle-button-identifier-file-line.gradient-all-10-0-UIExtendedSRGBColorSpace-1-0-0-1-UIExtendedSRGBColorSpace-0-0-1-1-big-dark-highlighted.png │ ├── verifyStyle-button-identifier-file-line.gradient-all-10-0-UIExtendedSRGBColorSpace-1-0-0-1-UIExtendedSRGBColorSpace-0-0-1-1-big-dark-normal.png │ ├── verifyStyle-button-identifier-file-line.gradient-all-10-0-UIExtendedSRGBColorSpace-1-0-0-1-UIExtendedSRGBColorSpace-0-0-1-1-big-disabled-dark.png │ ├── verifyStyle-button-identifier-file-line.gradient-all-10-0-UIExtendedSRGBColorSpace-1-0-0-1-UIExtendedSRGBColorSpace-0-0-1-1-big-disabled-light.png │ ├── verifyStyle-button-identifier-file-line.gradient-all-10-0-UIExtendedSRGBColorSpace-1-0-0-1-UIExtendedSRGBColorSpace-0-0-1-1-big-extraLight-disabled.png │ ├── verifyStyle-button-identifier-file-line.gradient-all-10-0-UIExtendedSRGBColorSpace-1-0-0-1-UIExtendedSRGBColorSpace-0-0-1-1-big-extraLight-highlighted.png │ ├── verifyStyle-button-identifier-file-line.gradient-all-10-0-UIExtendedSRGBColorSpace-1-0-0-1-UIExtendedSRGBColorSpace-0-0-1-1-big-extraLight-normal.png │ ├── verifyStyle-button-identifier-file-line.gradient-all-10-0-UIExtendedSRGBColorSpace-1-0-0-1-UIExtendedSRGBColorSpace-0-0-1-1-big-highlighted-dark.png │ ├── verifyStyle-button-identifier-file-line.gradient-all-10-0-UIExtendedSRGBColorSpace-1-0-0-1-UIExtendedSRGBColorSpace-0-0-1-1-big-highlighted-light.png │ ├── verifyStyle-button-identifier-file-line.gradient-all-10-0-UIExtendedSRGBColorSpace-1-0-0-1-UIExtendedSRGBColorSpace-0-0-1-1-big-light-disabled.png │ ├── verifyStyle-button-identifier-file-line.gradient-all-10-0-UIExtendedSRGBColorSpace-1-0-0-1-UIExtendedSRGBColorSpace-0-0-1-1-big-light-highlighted.png │ ├── verifyStyle-button-identifier-file-line.gradient-all-10-0-UIExtendedSRGBColorSpace-1-0-0-1-UIExtendedSRGBColorSpace-0-0-1-1-big-light-normal.png │ ├── verifyStyle-button-identifier-file-line.gradient-all-10-0-UIExtendedSRGBColorSpace-1-0-0-1-UIExtendedSRGBColorSpace-0-0-1-1-big-normal-dark.png │ ├── verifyStyle-button-identifier-file-line.gradient-all-10-0-UIExtendedSRGBColorSpace-1-0-0-1-UIExtendedSRGBColorSpace-0-0-1-1-big-normal-light.png │ ├── verifyStyle-button-identifier-file-line.gradient-all-10-0-UIExtendedSRGBColorSpace-1-0-0-1-UIExtendedSRGBColorSpace-0-0-1-1-small-dark-disabled.png │ ├── verifyStyle-button-identifier-file-line.gradient-all-10-0-UIExtendedSRGBColorSpace-1-0-0-1-UIExtendedSRGBColorSpace-0-0-1-1-small-dark-highlighted.png │ ├── verifyStyle-button-identifier-file-line.gradient-all-10-0-UIExtendedSRGBColorSpace-1-0-0-1-UIExtendedSRGBColorSpace-0-0-1-1-small-dark-normal.png │ ├── verifyStyle-button-identifier-file-line.gradient-all-10-0-UIExtendedSRGBColorSpace-1-0-0-1-UIExtendedSRGBColorSpace-0-0-1-1-small-disabled-dark.png │ ├── verifyStyle-button-identifier-file-line.gradient-all-10-0-UIExtendedSRGBColorSpace-1-0-0-1-UIExtendedSRGBColorSpace-0-0-1-1-small-disabled-light.png │ ├── verifyStyle-button-identifier-file-line.gradient-all-10-0-UIExtendedSRGBColorSpace-1-0-0-1-UIExtendedSRGBColorSpace-0-0-1-1-small-extraLight-disabled.png │ ├── verifyStyle-button-identifier-file-line.gradient-all-10-0-UIExtendedSRGBColorSpace-1-0-0-1-UIExtendedSRGBColorSpace-0-0-1-1-small-extraLight-highlighted.png │ ├── verifyStyle-button-identifier-file-line.gradient-all-10-0-UIExtendedSRGBColorSpace-1-0-0-1-UIExtendedSRGBColorSpace-0-0-1-1-small-extraLight-normal.png │ ├── verifyStyle-button-identifier-file-line.gradient-all-10-0-UIExtendedSRGBColorSpace-1-0-0-1-UIExtendedSRGBColorSpace-0-0-1-1-small-highlighted-dark.png │ ├── verifyStyle-button-identifier-file-line.gradient-all-10-0-UIExtendedSRGBColorSpace-1-0-0-1-UIExtendedSRGBColorSpace-0-0-1-1-small-highlighted-light.png │ ├── verifyStyle-button-identifier-file-line.gradient-all-10-0-UIExtendedSRGBColorSpace-1-0-0-1-UIExtendedSRGBColorSpace-0-0-1-1-small-light-disabled.png │ ├── verifyStyle-button-identifier-file-line.gradient-all-10-0-UIExtendedSRGBColorSpace-1-0-0-1-UIExtendedSRGBColorSpace-0-0-1-1-small-light-highlighted.png │ ├── verifyStyle-button-identifier-file-line.gradient-all-10-0-UIExtendedSRGBColorSpace-1-0-0-1-UIExtendedSRGBColorSpace-0-0-1-1-small-light-normal.png │ ├── verifyStyle-button-identifier-file-line.gradient-all-10-0-UIExtendedSRGBColorSpace-1-0-0-1-UIExtendedSRGBColorSpace-0-0-1-1-small-normal-dark.png │ ├── verifyStyle-button-identifier-file-line.gradient-all-10-0-UIExtendedSRGBColorSpace-1-0-0-1-UIExtendedSRGBColorSpace-0-0-1-1-small-normal-light.png │ ├── verifyStyle-button-identifier-file-line.titled-big-dark-disabled.png │ ├── verifyStyle-button-identifier-file-line.titled-big-dark-highlighted.png │ ├── verifyStyle-button-identifier-file-line.titled-big-dark-normal.png │ ├── verifyStyle-button-identifier-file-line.titled-big-disabled-dark.png │ ├── verifyStyle-button-identifier-file-line.titled-big-disabled-light.png │ ├── verifyStyle-button-identifier-file-line.titled-big-extraLight-disabled.png │ ├── verifyStyle-button-identifier-file-line.titled-big-extraLight-highlighted.png │ ├── verifyStyle-button-identifier-file-line.titled-big-extraLight-normal.png │ ├── verifyStyle-button-identifier-file-line.titled-big-highlighted-dark.png │ ├── verifyStyle-button-identifier-file-line.titled-big-highlighted-light.png │ ├── verifyStyle-button-identifier-file-line.titled-big-light-disabled.png │ ├── verifyStyle-button-identifier-file-line.titled-big-light-highlighted.png │ ├── verifyStyle-button-identifier-file-line.titled-big-light-normal.png │ ├── verifyStyle-button-identifier-file-line.titled-big-normal-dark.png │ ├── verifyStyle-button-identifier-file-line.titled-big-normal-light.png │ ├── verifyStyle-button-identifier-file-line.titled-small-dark-disabled.png │ ├── verifyStyle-button-identifier-file-line.titled-small-dark-highlighted.png │ ├── verifyStyle-button-identifier-file-line.titled-small-dark-normal.png │ ├── verifyStyle-button-identifier-file-line.titled-small-disabled-dark.png │ ├── verifyStyle-button-identifier-file-line.titled-small-disabled-light.png │ ├── verifyStyle-button-identifier-file-line.titled-small-extraLight-disabled.png │ ├── verifyStyle-button-identifier-file-line.titled-small-extraLight-highlighted.png │ ├── verifyStyle-button-identifier-file-line.titled-small-extraLight-normal.png │ ├── verifyStyle-button-identifier-file-line.titled-small-highlighted-dark.png │ ├── verifyStyle-button-identifier-file-line.titled-small-highlighted-light.png │ ├── verifyStyle-button-identifier-file-line.titled-small-light-disabled.png │ ├── verifyStyle-button-identifier-file-line.titled-small-light-highlighted.png │ ├── verifyStyle-button-identifier-file-line.titled-small-light-normal.png │ ├── verifyStyle-button-identifier-file-line.titled-small-normal-dark.png │ └── verifyStyle-button-identifier-file-line.titled-small-normal-light.png │ ├── ImageGenerationTests │ ├── testConditionalStrokesOnRoundEdge.1.png │ ├── testConditionallyRoundedGradientImage.1.png │ ├── testConditionallyRoundedStrokedImage.1.png │ ├── testFilledAndStrokedImage.1.png │ ├── testFilledImage.1.png │ ├── testGradientImage.1.png │ ├── testMultipleConditionalStrokesNoRounding.1.png │ ├── testMultipleConditionalStrokesOnFlatEdge.1.png │ ├── testRoundedGradientImage.1.png │ ├── testRoundedImage.1.png │ ├── testRoundedStrokedImage.1.png │ ├── testRoundedThickStrokedImage.1.png │ ├── testSingleConditionalStrokeOnFlatEdge.1.png │ ├── testStrokedImage.1.png │ ├── testStrokedImageNoLineWidth.1.png │ └── testViewRasterization.1.png │ └── SampleSheetTests │ ├── testGenerateSampleSheet.1.png │ ├── testGenerateSampleSheetLightDark-dark.1.png │ └── testGenerateSampleSheetLightDark-light.1.png ├── sample-dark.png ├── sample-light.png └── sample.png /.github/workflows/swift.yml: -------------------------------------------------------------------------------- 1 | name: Swift 2 | 3 | on: [push] 4 | 5 | jobs: 6 | build: 7 | 8 | runs-on: macOS-latest 9 | 10 | steps: 11 | - uses: actions/checkout@v2 12 | - name: Run tests 13 | run: xcodebuild test -scheme "Roundrect" -destination "platform=iOS Simulator,OS=14.4,name=iPhone 12" 14 | 15 | 16 | -------------------------------------------------------------------------------- /.gitignore: -------------------------------------------------------------------------------- 1 | # Xcode 2 | # 3 | # gitignore contributors: remember to update Global/Xcode.gitignore, Objective-C.gitignore & Swift.gitignore 4 | 5 | ## Build generated 6 | build/ 7 | DerivedData/ 8 | 9 | ## Various settings 10 | *.pbxuser 11 | !default.pbxuser 12 | *.mode1v3 13 | !default.mode1v3 14 | *.mode2v3 15 | !default.mode2v3 16 | *.perspectivev3 17 | !default.perspectivev3 18 | xcuserdata/ 19 | 20 | ## Other 21 | *.moved-aside 22 | *.xccheckout 23 | *.xcscmblueprint 24 | 25 | ## Obj-C/Swift specific 26 | *.hmap 27 | *.ipa 28 | *.dSYM.zip 29 | *.dSYM 30 | 31 | ## Playgrounds 32 | timeline.xctimeline 33 | playground.xcworkspace 34 | 35 | # Swift Package Manager 36 | # 37 | # Add this line if you want to avoid checking in source code from Swift Package Manager dependencies. 38 | # Packages/ 39 | # Package.pins 40 | # Package.resolved 41 | .build/ 42 | 43 | # CocoaPods 44 | # 45 | # We recommend against adding the Pods directory to your .gitignore. However 46 | # you should judge for yourself, the pros and cons are mentioned at: 47 | # https://guides.cocoapods.org/using/using-cocoapods.html#should-i-check-the-pods-directory-into-source-control 48 | # 49 | # Pods/ 50 | 51 | # Carthage 52 | # 53 | # Add this line if you want to avoid checking in source code from Carthage dependencies. 54 | # Carthage/Checkouts 55 | 56 | Carthage/ 57 | 58 | # fastlane 59 | # 60 | # It is recommended to not store the screenshots in the git repo. Instead, use fastlane to re-generate the 61 | # screenshots whenever they are needed. 62 | # For more information about the recommended setup visit: 63 | # https://docs.fastlane.tools/best-practices/source-control/#source-control 64 | 65 | fastlane/report.xml 66 | fastlane/Preview.html 67 | fastlane/screenshots/**/*.png 68 | fastlane/test_output 69 | 70 | roundrectTests/recorded/FailureDiffs/ -------------------------------------------------------------------------------- /.gitmodules: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/gabrieloc/roundrect/43c967fde94290bc371f46a0ba8e24a40d2eda5d/.gitmodules -------------------------------------------------------------------------------- /.swiftpm/xcode/package.xcworkspace/contents.xcworkspacedata: -------------------------------------------------------------------------------- 1 | 2 | 4 | 6 | 7 | 8 | -------------------------------------------------------------------------------- /LICENSE: -------------------------------------------------------------------------------- 1 | Copyright 2019 Gabriel O'Flaherty-Chan 2 | 3 | Licensed under the Apache License, Version 2.0 (the "License"); 4 | you may not use this work except in compliance with the License. 5 | You may obtain a copy of the License below, or at: 6 | 7 | http://www.apache.org/licenses/LICENSE-2.0 8 | 9 | Unless required by applicable law or agreed to in writing, software 10 | distributed under the License is distributed on an "AS IS" BASIS, 11 | WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 12 | See the License for the specific language governing permissions and 13 | limitations under the License. 14 | 15 | Apache License 16 | Version 2.0, January 2004 17 | http://www.apache.org/licenses/ 18 | 19 | TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION 20 | 21 | 1. Definitions. 22 | 23 | "License" shall mean the terms and conditions for use, reproduction, 24 | and distribution as defined by Sections 1 through 9 of this document. 25 | 26 | "Licensor" shall mean the copyright owner or entity authorized by 27 | the copyright owner that is granting the License. 28 | 29 | "Legal Entity" shall mean the union of the acting entity and all 30 | other entities that control, are controlled by, or are under common 31 | control with that entity. For the purposes of this definition, 32 | "control" means (i) the power, direct or indirect, to cause the 33 | direction or management of such entity, whether by contract or 34 | otherwise, or (ii) ownership of fifty percent (50%) or more of the 35 | outstanding shares, or (iii) beneficial ownership of such entity. 36 | 37 | "You" (or "Your") shall mean an individual or Legal Entity 38 | exercising permissions granted by this License. 39 | 40 | "Source" form shall mean the preferred form for making modifications, 41 | including but not limited to software source code, documentation 42 | source, and configuration files. 43 | 44 | "Object" form shall mean any form resulting from mechanical 45 | transformation or translation of a Source form, including but 46 | not limited to compiled object code, generated documentation, 47 | and conversions to other media types. 48 | 49 | "Work" shall mean the work of authorship, whether in Source or 50 | Object form, made available under the License, as indicated by a 51 | copyright notice that is included in or attached to the work 52 | (an example is provided in the Appendix below). 53 | 54 | "Derivative Works" shall mean any work, whether in Source or Object 55 | form, that is based on (or derived from) the Work and for which the 56 | editorial revisions, annotations, elaborations, or other modifications 57 | represent, as a whole, an original work of authorship. For the purposes 58 | of this License, Derivative Works shall not include works that remain 59 | separable from, or merely link (or bind by name) to the interfaces of, 60 | the Work and Derivative Works thereof. 61 | 62 | "Contribution" shall mean any work of authorship, including 63 | the original version of the Work and any modifications or additions 64 | to that Work or Derivative Works thereof, that is intentionally 65 | submitted to Licensor for inclusion in the Work by the copyright owner 66 | or by an individual or Legal Entity authorized to submit on behalf of 67 | the copyright owner. For the purposes of this definition, "submitted" 68 | means any form of electronic, verbal, or written communication sent 69 | to the Licensor or its representatives, including but not limited to 70 | communication on electronic mailing lists, source code control systems, 71 | and issue tracking systems that are managed by, or on behalf of, the 72 | Licensor for the purpose of discussing and improving the Work, but 73 | excluding communication that is conspicuously marked or otherwise 74 | designated in writing by the copyright owner as "Not a Contribution." 75 | 76 | "Contributor" shall mean Licensor and any individual or Legal Entity 77 | on behalf of whom a Contribution has been received by Licensor and 78 | subsequently incorporated within the Work. 79 | 80 | 2. Grant of Copyright License. Subject to the terms and conditions of 81 | this License, each Contributor hereby grants to You a perpetual, 82 | worldwide, non-exclusive, no-charge, royalty-free, irrevocable 83 | copyright license to reproduce, prepare Derivative Works of, 84 | publicly display, publicly perform, sublicense, and distribute the 85 | Work and such Derivative Works in Source or Object form. 86 | 87 | 3. Grant of Patent License. Subject to the terms and conditions of 88 | this License, each Contributor hereby grants to You a perpetual, 89 | worldwide, non-exclusive, no-charge, royalty-free, irrevocable 90 | (except as stated in this section) patent license to make, have made, 91 | use, offer to sell, sell, import, and otherwise transfer the Work, 92 | where such license applies only to those patent claims licensable 93 | by such Contributor that are necessarily infringed by their 94 | Contribution(s) alone or by combination of their Contribution(s) 95 | with the Work to which such Contribution(s) was submitted. If You 96 | institute patent litigation against any entity (including a 97 | cross-claim or counterclaim in a lawsuit) alleging that the Work 98 | or a Contribution incorporated within the Work constitutes direct 99 | or contributory patent infringement, then any patent licenses 100 | granted to You under this License for that Work shall terminate 101 | as of the date such litigation is filed. 102 | 103 | 4. Redistribution. You may reproduce and distribute copies of the 104 | Work or Derivative Works thereof in any medium, with or without 105 | modifications, and in Source or Object form, provided that You 106 | meet the following conditions: 107 | 108 | (a) You must give any other recipients of the Work or 109 | Derivative Works a copy of this License; and 110 | 111 | (b) You must cause any modified files to carry prominent notices 112 | stating that You changed the files; and 113 | 114 | (c) You must retain, in the Source form of any Derivative Works 115 | that You distribute, all copyright, patent, trademark, and 116 | attribution notices from the Source form of the Work, 117 | excluding those notices that do not pertain to any part of 118 | the Derivative Works; and 119 | 120 | (d) If the Work includes a "NOTICE" text file as part of its 121 | distribution, then any Derivative Works that You distribute must 122 | include a readable copy of the attribution notices contained 123 | within such NOTICE file, excluding those notices that do not 124 | pertain to any part of the Derivative Works, in at least one 125 | of the following places: within a NOTICE text file distributed 126 | as part of the Derivative Works; within the Source form or 127 | documentation, if provided along with the Derivative Works; or, 128 | within a display generated by the Derivative Works, if and 129 | wherever such third-party notices normally appear. The contents 130 | of the NOTICE file are for informational purposes only and 131 | do not modify the License. You may add Your own attribution 132 | notices within Derivative Works that You distribute, alongside 133 | or as an addendum to the NOTICE text from the Work, provided 134 | that such additional attribution notices cannot be construed 135 | as modifying the License. 136 | 137 | You may add Your own copyright statement to Your modifications and 138 | may provide additional or different license terms and conditions 139 | for use, reproduction, or distribution of Your modifications, or 140 | for any such Derivative Works as a whole, provided Your use, 141 | reproduction, and distribution of the Work otherwise complies with 142 | the conditions stated in this License. 143 | 144 | 5. Submission of Contributions. Unless You explicitly state otherwise, 145 | any Contribution intentionally submitted for inclusion in the Work 146 | by You to the Licensor shall be under the terms and conditions of 147 | this License, without any additional terms or conditions. 148 | Notwithstanding the above, nothing herein shall supersede or modify 149 | the terms of any separate license agreement you may have executed 150 | with Licensor regarding such Contributions. 151 | 152 | 6. Trademarks. This License does not grant permission to use the trade 153 | names, trademarks, service marks, or product names of the Licensor, 154 | except as required for reasonable and customary use in describing the 155 | origin of the Work and reproducing the content of the NOTICE file. 156 | 157 | 7. Disclaimer of Warranty. Unless required by applicable law or 158 | agreed to in writing, Licensor provides the Work (and each 159 | Contributor provides its Contributions) on an "AS IS" BASIS, 160 | WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or 161 | implied, including, without limitation, any warranties or conditions 162 | of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A 163 | PARTICULAR PURPOSE. You are solely responsible for determining the 164 | appropriateness of using or redistributing the Work and assume any 165 | risks associated with Your exercise of permissions under this License. 166 | 167 | 8. Limitation of Liability. In no event and under no legal theory, 168 | whether in tort (including negligence), contract, or otherwise, 169 | unless required by applicable law (such as deliberate and grossly 170 | negligent acts) or agreed to in writing, shall any Contributor be 171 | liable to You for damages, including any direct, indirect, special, 172 | incidental, or consequential damages of any character arising as a 173 | result of this License or out of the use or inability to use the 174 | Work (including but not limited to damages for loss of goodwill, 175 | work stoppage, computer failure or malfunction, or any and all 176 | other commercial damages or losses), even if such Contributor 177 | has been advised of the possibility of such damages. 178 | 179 | 9. Accepting Warranty or Additional Liability. While redistributing 180 | the Work or Derivative Works thereof, You may choose to offer, 181 | and charge a fee for, acceptance of support, warranty, indemnity, 182 | or other liability obligations and/or rights consistent with this 183 | License. However, in accepting such obligations, You may act only 184 | on Your own behalf and on Your sole responsibility, not on behalf 185 | of any other Contributor, and only if You agree to indemnify, 186 | defend, and hold each Contributor harmless for any liability 187 | incurred by, or claims asserted against, such Contributor by reason 188 | of your accepting any such warranty or additional liability. 189 | 190 | END OF TERMS AND CONDITIONS 191 | 192 | APPENDIX: How to apply the Apache License to your work. 193 | 194 | To apply the Apache License to your work, attach the following 195 | boilerplate notice, with the fields enclosed by brackets "[]" 196 | replaced with your own identifying information. (Don't include 197 | the brackets!) The text should be enclosed in the appropriate 198 | comment syntax for the file format. We also recommend that a 199 | file or class name and description of purpose be included on the 200 | same "printed page" as the copyright notice for easier 201 | identification within third-party archives. 202 | 203 | Copyright [yyyy] [name of copyright owner] 204 | 205 | Licensed under the Apache License, Version 2.0 (the "License"); 206 | you may not use this file except in compliance with the License. 207 | You may obtain a copy of the License at 208 | 209 | http://www.apache.org/licenses/LICENSE-2.0 210 | 211 | Unless required by applicable law or agreed to in writing, software 212 | distributed under the License is distributed on an "AS IS" BASIS, 213 | WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 214 | See the License for the specific language governing permissions and 215 | limitations under the License. 216 | -------------------------------------------------------------------------------- /Package.swift: -------------------------------------------------------------------------------- 1 | // swift-tools-version:5.3 2 | // The swift-tools-version declares the minimum version of Swift required to build this package. 3 | 4 | import PackageDescription 5 | 6 | let package = Package( 7 | name: "Roundrect", 8 | platforms: [ 9 | .iOS(.v11), 10 | ], 11 | products: [ 12 | .library( 13 | name: "Roundrect", 14 | targets: ["Roundrect"] 15 | ), 16 | ], 17 | dependencies: [ 18 | .package( 19 | name: "SnapshotTesting", 20 | url: "https://github.com/pointfreeco/swift-snapshot-testing.git", 21 | from: "1.8.0" 22 | ), 23 | ], 24 | targets: [ 25 | .target( 26 | name: "Roundrect", 27 | dependencies: [] 28 | ), 29 | .testTarget( 30 | name: "RoundrectTests", 31 | dependencies: ["Roundrect", "SnapshotTesting"], 32 | resources: [ 33 | .copy("Assets"), 34 | .copy("__Snapshots__"), 35 | ] 36 | ), 37 | ] 38 | ) 39 | -------------------------------------------------------------------------------- /README.md: -------------------------------------------------------------------------------- 1 | # roundrect 2 | 3 | Conveniences for programmatically generating image assets and styling UIButton. 4 | 5 | ## Creating Images 6 | The conveniences in `ImageGeneration.swift` allow images to be generated from a view, or given various style properties like fill, stroke, corner radius, etc. For example, to create a 3px/3px image with a 1px blue stroke and a single red fill: 7 | ```swift 8 | let image = UIImage( 9 | fill: .red, 10 | stroke: ( 11 | color: .blue, 12 | width: 1 13 | ) 14 | ) 15 | ``` 16 | This image can be made resizable and applied to a `UIButton`, but since there is a lot of busywork associated with handling all the different states a button can have, the conveniences in `ButtonStyle` can be used instead. A combination of a button `Style` (eg. filled vs bordered) and `Theme` (eg. light or dark) can be provided when creating or modifying an existing `UIButton`: 17 | ```swift 18 | let button = UIButton( 19 | style: .filled( 20 | cornerRadius: 8 21 | ) 22 | ) 23 | ``` 24 | This will yield a button with a tintable fill and a corner radius of 8. 25 | 26 | API exists for an explicit `theme` to be provided, but it's marked as obsolete as of iOS13 in favour of light/dark mode provided by `UIInterfaceStyle`. 27 | 28 | ## Contributing 29 | 30 | Snapshot tests are recorded with the **iOS 14.4 iPhone 12** simulator using the [Swift Snapshot Testing](https://github.com/pointfreeco/swift-snapshot-testing) library. 31 | 32 | ## Examples 33 | 34 | 2 | 3 | 4 | CFBundleDevelopmentRegion 5 | en 6 | CFBundleExecutable 7 | $(EXECUTABLE_NAME) 8 | CFBundleIdentifier 9 | $(PRODUCT_BUNDLE_IDENTIFIER) 10 | CFBundleInfoDictionaryVersion 11 | 6.0 12 | CFBundleName 13 | $(PRODUCT_NAME) 14 | CFBundlePackageType 15 | BNDL 16 | CFBundleShortVersionString 17 | 1.0 18 | CFBundleSignature 19 | ???? 20 | CFBundleVersion 21 | $(CURRENT_PROJECT_VERSION) 22 | NSPrincipalClass 23 | 24 | 25 | 26 | -------------------------------------------------------------------------------- /Roundrect.xcodeproj/Roundrect_Info.plist: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | CFBundleDevelopmentRegion 6 | $(DEVELOPMENT_LANGUAGE) 7 | CFBundleExecutable 8 | $(EXECUTABLE_NAME) 9 | CFBundleIdentifier 10 | $(PRODUCT_BUNDLE_IDENTIFIER) 11 | CFBundleInfoDictionaryVersion 12 | 6.0 13 | CFBundleName 14 | $(PRODUCT_NAME) 15 | CFBundlePackageType 16 | FMWK 17 | CFBundleShortVersionString 18 | $(MARKETING_VERSION) 19 | CFBundleVersion 20 | $(CURRENT_PROJECT_VERSION) 21 | 22 | 23 | -------------------------------------------------------------------------------- /Roundrect.xcodeproj/project.pbxproj: -------------------------------------------------------------------------------- 1 | // !$*UTF8*$! 2 | { 3 | archiveVersion = 1; 4 | classes = { 5 | }; 6 | objectVersion = 52; 7 | objects = { 8 | 9 | /* Begin PBXBuildFile section */ 10 | B25DF2BD27332DDF00ECD553 /* SnapshotTesting in Frameworks */ = {isa = PBXBuildFile; productRef = B25DF2BC27332DDF00ECD553 /* SnapshotTesting */; }; 11 | B25DF2BF2733309000ECD553 /* SnapshotUtility.swift in Sources */ = {isa = PBXBuildFile; fileRef = B25DF2BE2733309000ECD553 /* SnapshotUtility.swift */; }; 12 | OBJ_66 /* ButtonStyle.swift in Sources */ = {isa = PBXBuildFile; fileRef = OBJ_9 /* ButtonStyle.swift */; }; 13 | OBJ_67 /* ButtonTheme.swift in Sources */ = {isa = PBXBuildFile; fileRef = OBJ_10 /* ButtonTheme.swift */; }; 14 | OBJ_68 /* ImageGeneration.swift in Sources */ = {isa = PBXBuildFile; fileRef = OBJ_11 /* ImageGeneration.swift */; }; 15 | OBJ_69 /* Roundrect.swift in Sources */ = {isa = PBXBuildFile; fileRef = OBJ_12 /* Roundrect.swift */; }; 16 | OBJ_70 /* Util.swift in Sources */ = {isa = PBXBuildFile; fileRef = OBJ_13 /* Util.swift */; }; 17 | OBJ_88 /* ButtonStyleTests.swift in Sources */ = {isa = PBXBuildFile; fileRef = OBJ_16 /* ButtonStyleTests.swift */; }; 18 | OBJ_89 /* ImageGenerationTests.swift in Sources */ = {isa = PBXBuildFile; fileRef = OBJ_17 /* ImageGenerationTests.swift */; }; 19 | OBJ_90 /* SampleSheet.swift in Sources */ = {isa = PBXBuildFile; fileRef = OBJ_18 /* SampleSheet.swift */; }; 20 | OBJ_91 /* SampleSheetTests.swift in Sources */ = {isa = PBXBuildFile; fileRef = OBJ_19 /* SampleSheetTests.swift */; }; 21 | OBJ_94 /* Roundrect.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = "Roundrect::Roundrect::Product" /* Roundrect.framework */; }; 22 | /* End PBXBuildFile section */ 23 | 24 | /* Begin PBXContainerItemProxy section */ 25 | B266546623ECC4C500B1FE3E /* PBXContainerItemProxy */ = { 26 | isa = PBXContainerItemProxy; 27 | containerPortal = OBJ_1 /* Project object */; 28 | proxyType = 1; 29 | remoteGlobalIDString = "Roundrect::Roundrect"; 30 | remoteInfo = Roundrect; 31 | }; 32 | /* End PBXContainerItemProxy section */ 33 | 34 | /* Begin PBXFileReference section */ 35 | B25DF2BE2733309000ECD553 /* SnapshotUtility.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = SnapshotUtility.swift; sourceTree = ""; }; 36 | B2DEA16623ECC69D00978959 /* Roundrect.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = Roundrect.h; sourceTree = ""; }; 37 | OBJ_10 /* ButtonTheme.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = ButtonTheme.swift; sourceTree = ""; }; 38 | OBJ_11 /* ImageGeneration.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = ImageGeneration.swift; sourceTree = ""; }; 39 | OBJ_12 /* Roundrect.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = Roundrect.swift; sourceTree = ""; }; 40 | OBJ_13 /* Util.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = Util.swift; sourceTree = ""; }; 41 | OBJ_16 /* ButtonStyleTests.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = ButtonStyleTests.swift; sourceTree = ""; }; 42 | OBJ_17 /* ImageGenerationTests.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = ImageGenerationTests.swift; sourceTree = ""; }; 43 | OBJ_18 /* SampleSheet.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = SampleSheet.swift; sourceTree = ""; }; 44 | OBJ_19 /* SampleSheetTests.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = SampleSheetTests.swift; sourceTree = ""; }; 45 | OBJ_23 /* AssertInlineSnapshot.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = AssertInlineSnapshot.swift; sourceTree = ""; }; 46 | OBJ_24 /* AssertSnapshot.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = AssertSnapshot.swift; sourceTree = ""; }; 47 | OBJ_25 /* Async.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = Async.swift; sourceTree = ""; }; 48 | OBJ_27 /* Internal.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = Internal.swift; sourceTree = ""; }; 49 | OBJ_28 /* PlistEncoder.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = PlistEncoder.swift; sourceTree = ""; }; 50 | OBJ_29 /* String+SpecialCharacters.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = "String+SpecialCharacters.swift"; sourceTree = ""; }; 51 | OBJ_30 /* View.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = View.swift; sourceTree = ""; }; 52 | OBJ_31 /* XCTAttachment.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = XCTAttachment.swift; sourceTree = ""; }; 53 | OBJ_32 /* Diff.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = Diff.swift; sourceTree = ""; }; 54 | OBJ_33 /* Diffing.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = Diffing.swift; sourceTree = ""; }; 55 | OBJ_35 /* Wait.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = Wait.swift; sourceTree = ""; }; 56 | OBJ_36 /* SnapshotTestCase.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = SnapshotTestCase.swift; sourceTree = ""; }; 57 | OBJ_37 /* Snapshotting.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = Snapshotting.swift; sourceTree = ""; }; 58 | OBJ_39 /* Any.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = Any.swift; sourceTree = ""; }; 59 | OBJ_40 /* CALayer.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = CALayer.swift; sourceTree = ""; }; 60 | OBJ_41 /* CaseIterable.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = CaseIterable.swift; sourceTree = ""; }; 61 | OBJ_42 /* Codable.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = Codable.swift; sourceTree = ""; }; 62 | OBJ_43 /* Data.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = Data.swift; sourceTree = ""; }; 63 | OBJ_44 /* Description.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = Description.swift; sourceTree = ""; }; 64 | OBJ_45 /* NSImage.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = NSImage.swift; sourceTree = ""; }; 65 | OBJ_46 /* NSView.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = NSView.swift; sourceTree = ""; }; 66 | OBJ_47 /* NSViewController.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = NSViewController.swift; sourceTree = ""; }; 67 | OBJ_48 /* SceneKit.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = SceneKit.swift; sourceTree = ""; }; 68 | OBJ_49 /* SpriteKit.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = SpriteKit.swift; sourceTree = ""; }; 69 | OBJ_50 /* String.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = String.swift; sourceTree = ""; }; 70 | OBJ_51 /* UIImage.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = UIImage.swift; sourceTree = ""; }; 71 | OBJ_52 /* UIView.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = UIView.swift; sourceTree = ""; }; 72 | OBJ_53 /* UIViewController.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = UIViewController.swift; sourceTree = ""; }; 73 | OBJ_54 /* URLRequest.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = URLRequest.swift; sourceTree = ""; }; 74 | OBJ_55 /* Package.swift */ = {isa = PBXFileReference; explicitFileType = sourcecode.swift; name = Package.swift; path = "/Users/gabrieloc/src/Roundrect/.build/checkouts/swift-snapshot-testing/Package.swift"; sourceTree = ""; }; 75 | OBJ_6 /* Package.swift */ = {isa = PBXFileReference; explicitFileType = sourcecode.swift; path = Package.swift; sourceTree = ""; }; 76 | OBJ_60 /* README.md */ = {isa = PBXFileReference; lastKnownFileType = net.daringfireball.markdown; path = README.md; sourceTree = ""; }; 77 | OBJ_9 /* ButtonStyle.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = ButtonStyle.swift; sourceTree = ""; }; 78 | "Roundrect::Roundrect::Product" /* Roundrect.framework */ = {isa = PBXFileReference; explicitFileType = wrapper.framework; path = Roundrect.framework; sourceTree = BUILT_PRODUCTS_DIR; }; 79 | "Roundrect::RoundrectTests::Product" /* RoundrectTests.xctest */ = {isa = PBXFileReference; explicitFileType = wrapper.cfbundle; path = RoundrectTests.xctest; sourceTree = BUILT_PRODUCTS_DIR; }; 80 | /* End PBXFileReference section */ 81 | 82 | /* Begin PBXFrameworksBuildPhase section */ 83 | OBJ_71 /* Frameworks */ = { 84 | isa = PBXFrameworksBuildPhase; 85 | buildActionMask = 0; 86 | files = ( 87 | ); 88 | runOnlyForDeploymentPostprocessing = 0; 89 | }; 90 | OBJ_92 /* Frameworks */ = { 91 | isa = PBXFrameworksBuildPhase; 92 | buildActionMask = 0; 93 | files = ( 94 | OBJ_94 /* Roundrect.framework in Frameworks */, 95 | B25DF2BD27332DDF00ECD553 /* SnapshotTesting in Frameworks */, 96 | ); 97 | runOnlyForDeploymentPostprocessing = 0; 98 | }; 99 | /* End PBXFrameworksBuildPhase section */ 100 | 101 | /* Begin PBXGroup section */ 102 | B25DF2BB27332DDF00ECD553 /* Frameworks */ = { 103 | isa = PBXGroup; 104 | children = ( 105 | ); 106 | name = Frameworks; 107 | sourceTree = ""; 108 | }; 109 | OBJ_14 /* Tests */ = { 110 | isa = PBXGroup; 111 | children = ( 112 | OBJ_15 /* RoundrectTests */, 113 | ); 114 | name = Tests; 115 | sourceTree = SOURCE_ROOT; 116 | }; 117 | OBJ_15 /* RoundrectTests */ = { 118 | isa = PBXGroup; 119 | children = ( 120 | OBJ_16 /* ButtonStyleTests.swift */, 121 | OBJ_17 /* ImageGenerationTests.swift */, 122 | OBJ_18 /* SampleSheet.swift */, 123 | OBJ_19 /* SampleSheetTests.swift */, 124 | B25DF2BE2733309000ECD553 /* SnapshotUtility.swift */, 125 | ); 126 | name = RoundrectTests; 127 | path = Tests/RoundrectTests; 128 | sourceTree = SOURCE_ROOT; 129 | }; 130 | OBJ_20 /* Dependencies */ = { 131 | isa = PBXGroup; 132 | children = ( 133 | OBJ_21 /* SnapshotTesting 1.7.1 */, 134 | ); 135 | name = Dependencies; 136 | sourceTree = ""; 137 | }; 138 | OBJ_21 /* SnapshotTesting 1.7.1 */ = { 139 | isa = PBXGroup; 140 | children = ( 141 | OBJ_22 /* SnapshotTesting */, 142 | OBJ_55 /* Package.swift */, 143 | ); 144 | name = "SnapshotTesting 1.7.1"; 145 | sourceTree = SOURCE_ROOT; 146 | }; 147 | OBJ_22 /* SnapshotTesting */ = { 148 | isa = PBXGroup; 149 | children = ( 150 | OBJ_23 /* AssertInlineSnapshot.swift */, 151 | OBJ_24 /* AssertSnapshot.swift */, 152 | OBJ_25 /* Async.swift */, 153 | OBJ_26 /* Common */, 154 | OBJ_32 /* Diff.swift */, 155 | OBJ_33 /* Diffing.swift */, 156 | OBJ_34 /* Extensions */, 157 | OBJ_36 /* SnapshotTestCase.swift */, 158 | OBJ_37 /* Snapshotting.swift */, 159 | OBJ_38 /* Snapshotting */, 160 | ); 161 | name = SnapshotTesting; 162 | path = ".build/checkouts/swift-snapshot-testing/Sources/SnapshotTesting"; 163 | sourceTree = SOURCE_ROOT; 164 | }; 165 | OBJ_26 /* Common */ = { 166 | isa = PBXGroup; 167 | children = ( 168 | OBJ_27 /* Internal.swift */, 169 | OBJ_28 /* PlistEncoder.swift */, 170 | OBJ_29 /* String+SpecialCharacters.swift */, 171 | OBJ_30 /* View.swift */, 172 | OBJ_31 /* XCTAttachment.swift */, 173 | ); 174 | path = Common; 175 | sourceTree = ""; 176 | }; 177 | OBJ_34 /* Extensions */ = { 178 | isa = PBXGroup; 179 | children = ( 180 | OBJ_35 /* Wait.swift */, 181 | ); 182 | path = Extensions; 183 | sourceTree = ""; 184 | }; 185 | OBJ_38 /* Snapshotting */ = { 186 | isa = PBXGroup; 187 | children = ( 188 | OBJ_39 /* Any.swift */, 189 | OBJ_40 /* CALayer.swift */, 190 | OBJ_41 /* CaseIterable.swift */, 191 | OBJ_42 /* Codable.swift */, 192 | OBJ_43 /* Data.swift */, 193 | OBJ_44 /* Description.swift */, 194 | OBJ_45 /* NSImage.swift */, 195 | OBJ_46 /* NSView.swift */, 196 | OBJ_47 /* NSViewController.swift */, 197 | OBJ_48 /* SceneKit.swift */, 198 | OBJ_49 /* SpriteKit.swift */, 199 | OBJ_50 /* String.swift */, 200 | OBJ_51 /* UIImage.swift */, 201 | OBJ_52 /* UIView.swift */, 202 | OBJ_53 /* UIViewController.swift */, 203 | OBJ_54 /* URLRequest.swift */, 204 | ); 205 | path = Snapshotting; 206 | sourceTree = ""; 207 | }; 208 | OBJ_5 = { 209 | isa = PBXGroup; 210 | children = ( 211 | OBJ_6 /* Package.swift */, 212 | B2DEA16623ECC69D00978959 /* Roundrect.h */, 213 | OBJ_7 /* Sources */, 214 | OBJ_14 /* Tests */, 215 | OBJ_20 /* Dependencies */, 216 | OBJ_56 /* Products */, 217 | OBJ_60 /* README.md */, 218 | B25DF2BB27332DDF00ECD553 /* Frameworks */, 219 | ); 220 | sourceTree = ""; 221 | }; 222 | OBJ_56 /* Products */ = { 223 | isa = PBXGroup; 224 | children = ( 225 | "Roundrect::Roundrect::Product" /* Roundrect.framework */, 226 | "Roundrect::RoundrectTests::Product" /* RoundrectTests.xctest */, 227 | ); 228 | name = Products; 229 | sourceTree = BUILT_PRODUCTS_DIR; 230 | }; 231 | OBJ_7 /* Sources */ = { 232 | isa = PBXGroup; 233 | children = ( 234 | OBJ_8 /* Roundrect */, 235 | ); 236 | name = Sources; 237 | sourceTree = SOURCE_ROOT; 238 | }; 239 | OBJ_8 /* Roundrect */ = { 240 | isa = PBXGroup; 241 | children = ( 242 | OBJ_9 /* ButtonStyle.swift */, 243 | OBJ_10 /* ButtonTheme.swift */, 244 | OBJ_11 /* ImageGeneration.swift */, 245 | OBJ_12 /* Roundrect.swift */, 246 | OBJ_13 /* Util.swift */, 247 | ); 248 | name = Roundrect; 249 | path = Sources/Roundrect; 250 | sourceTree = SOURCE_ROOT; 251 | }; 252 | /* End PBXGroup section */ 253 | 254 | /* Begin PBXNativeTarget section */ 255 | "Roundrect::Roundrect" /* Roundrect */ = { 256 | isa = PBXNativeTarget; 257 | buildConfigurationList = OBJ_62 /* Build configuration list for PBXNativeTarget "Roundrect" */; 258 | buildPhases = ( 259 | OBJ_65 /* Sources */, 260 | OBJ_71 /* Frameworks */, 261 | ); 262 | buildRules = ( 263 | ); 264 | dependencies = ( 265 | ); 266 | name = Roundrect; 267 | packageProductDependencies = ( 268 | ); 269 | productName = Roundrect; 270 | productReference = "Roundrect::Roundrect::Product" /* Roundrect.framework */; 271 | productType = "com.apple.product-type.framework"; 272 | }; 273 | "Roundrect::RoundrectTests" /* RoundrectTests */ = { 274 | isa = PBXNativeTarget; 275 | buildConfigurationList = OBJ_84 /* Build configuration list for PBXNativeTarget "RoundrectTests" */; 276 | buildPhases = ( 277 | OBJ_87 /* Sources */, 278 | OBJ_92 /* Frameworks */, 279 | ); 280 | buildRules = ( 281 | ); 282 | dependencies = ( 283 | B25DF2B82733298E00ECD553 /* PBXTargetDependency */, 284 | OBJ_97 /* PBXTargetDependency */, 285 | ); 286 | name = RoundrectTests; 287 | packageProductDependencies = ( 288 | B25DF2BC27332DDF00ECD553 /* SnapshotTesting */, 289 | ); 290 | productName = RoundrectTests; 291 | productReference = "Roundrect::RoundrectTests::Product" /* RoundrectTests.xctest */; 292 | productType = "com.apple.product-type.bundle.unit-test"; 293 | }; 294 | /* End PBXNativeTarget section */ 295 | 296 | /* Begin PBXProject section */ 297 | OBJ_1 /* Project object */ = { 298 | isa = PBXProject; 299 | attributes = { 300 | LastSwiftMigration = 9999; 301 | LastUpgradeCheck = 9999; 302 | }; 303 | buildConfigurationList = OBJ_2 /* Build configuration list for PBXProject "Roundrect" */; 304 | compatibilityVersion = "Xcode 3.2"; 305 | developmentRegion = en; 306 | hasScannedForEncodings = 0; 307 | knownRegions = ( 308 | en, 309 | ); 310 | mainGroup = OBJ_5; 311 | packageReferences = ( 312 | B266546823ECC5D500B1FE3E /* XCRemoteSwiftPackageReference "swift-snapshot-testing" */, 313 | ); 314 | productRefGroup = OBJ_56 /* Products */; 315 | projectDirPath = ""; 316 | projectRoot = ""; 317 | targets = ( 318 | "Roundrect::Roundrect" /* Roundrect */, 319 | "Roundrect::RoundrectTests" /* RoundrectTests */, 320 | ); 321 | }; 322 | /* End PBXProject section */ 323 | 324 | /* Begin PBXSourcesBuildPhase section */ 325 | OBJ_65 /* Sources */ = { 326 | isa = PBXSourcesBuildPhase; 327 | buildActionMask = 0; 328 | files = ( 329 | OBJ_66 /* ButtonStyle.swift in Sources */, 330 | OBJ_67 /* ButtonTheme.swift in Sources */, 331 | OBJ_68 /* ImageGeneration.swift in Sources */, 332 | OBJ_69 /* Roundrect.swift in Sources */, 333 | OBJ_70 /* Util.swift in Sources */, 334 | ); 335 | runOnlyForDeploymentPostprocessing = 0; 336 | }; 337 | OBJ_87 /* Sources */ = { 338 | isa = PBXSourcesBuildPhase; 339 | buildActionMask = 0; 340 | files = ( 341 | OBJ_88 /* ButtonStyleTests.swift in Sources */, 342 | OBJ_89 /* ImageGenerationTests.swift in Sources */, 343 | OBJ_90 /* SampleSheet.swift in Sources */, 344 | OBJ_91 /* SampleSheetTests.swift in Sources */, 345 | B25DF2BF2733309000ECD553 /* SnapshotUtility.swift in Sources */, 346 | ); 347 | runOnlyForDeploymentPostprocessing = 0; 348 | }; 349 | /* End PBXSourcesBuildPhase section */ 350 | 351 | /* Begin PBXTargetDependency section */ 352 | B25DF2B82733298E00ECD553 /* PBXTargetDependency */ = { 353 | isa = PBXTargetDependency; 354 | productRef = B25DF2B72733298E00ECD553 /* SnapshotTesting */; 355 | }; 356 | OBJ_97 /* PBXTargetDependency */ = { 357 | isa = PBXTargetDependency; 358 | target = "Roundrect::Roundrect" /* Roundrect */; 359 | targetProxy = B266546623ECC4C500B1FE3E /* PBXContainerItemProxy */; 360 | }; 361 | /* End PBXTargetDependency section */ 362 | 363 | /* Begin XCBuildConfiguration section */ 364 | OBJ_3 /* Debug */ = { 365 | isa = XCBuildConfiguration; 366 | buildSettings = { 367 | CLANG_ENABLE_OBJC_ARC = YES; 368 | COMBINE_HIDPI_IMAGES = YES; 369 | COPY_PHASE_STRIP = NO; 370 | DEBUG_INFORMATION_FORMAT = dwarf; 371 | DYLIB_INSTALL_NAME_BASE = "@rpath"; 372 | ENABLE_NS_ASSERTIONS = YES; 373 | GCC_OPTIMIZATION_LEVEL = 0; 374 | GCC_PREPROCESSOR_DEFINITIONS = ( 375 | "$(inherited)", 376 | "SWIFT_PACKAGE=1", 377 | "DEBUG=1", 378 | ); 379 | IPHONEOS_DEPLOYMENT_TARGET = 11.0; 380 | ONLY_ACTIVE_ARCH = YES; 381 | OTHER_SWIFT_FLAGS = "$(inherited) -DXcode"; 382 | PRODUCT_NAME = "$(TARGET_NAME)"; 383 | SDKROOT = iphoneos; 384 | SWIFT_ACTIVE_COMPILATION_CONDITIONS = "$(inherited) SWIFT_PACKAGE DEBUG"; 385 | SWIFT_OPTIMIZATION_LEVEL = "-Onone"; 386 | USE_HEADERMAP = NO; 387 | }; 388 | name = Debug; 389 | }; 390 | OBJ_4 /* Release */ = { 391 | isa = XCBuildConfiguration; 392 | buildSettings = { 393 | CLANG_ENABLE_OBJC_ARC = YES; 394 | COMBINE_HIDPI_IMAGES = YES; 395 | COPY_PHASE_STRIP = YES; 396 | DEBUG_INFORMATION_FORMAT = "dwarf-with-dsym"; 397 | DYLIB_INSTALL_NAME_BASE = "@rpath"; 398 | GCC_OPTIMIZATION_LEVEL = s; 399 | GCC_PREPROCESSOR_DEFINITIONS = ( 400 | "$(inherited)", 401 | "SWIFT_PACKAGE=1", 402 | ); 403 | IPHONEOS_DEPLOYMENT_TARGET = 11.0; 404 | OTHER_SWIFT_FLAGS = "$(inherited) -DXcode"; 405 | PRODUCT_NAME = "$(TARGET_NAME)"; 406 | SDKROOT = iphoneos; 407 | SWIFT_ACTIVE_COMPILATION_CONDITIONS = "$(inherited) SWIFT_PACKAGE"; 408 | SWIFT_COMPILATION_MODE = wholemodule; 409 | SWIFT_OPTIMIZATION_LEVEL = "-O"; 410 | USE_HEADERMAP = NO; 411 | }; 412 | name = Release; 413 | }; 414 | OBJ_63 /* Debug */ = { 415 | isa = XCBuildConfiguration; 416 | buildSettings = { 417 | ENABLE_TESTABILITY = YES; 418 | FRAMEWORK_SEARCH_PATHS = ( 419 | "$(inherited)", 420 | "$(PLATFORM_DIR)/Developer/Library/Frameworks", 421 | ); 422 | HEADER_SEARCH_PATHS = "$(inherited)"; 423 | INFOPLIST_FILE = Roundrect.xcodeproj/Roundrect_Info.plist; 424 | LD_RUNPATH_SEARCH_PATHS = ( 425 | "$(inherited)", 426 | "$(TOOLCHAIN_DIR)/usr/lib/swift/macosx", 427 | ); 428 | MARKETING_VERSION = 1.2; 429 | OTHER_CFLAGS = "$(inherited)"; 430 | OTHER_LDFLAGS = "$(inherited)"; 431 | OTHER_SWIFT_FLAGS = "$(inherited)"; 432 | PRODUCT_BUNDLE_IDENTIFIER = Roundrect; 433 | PRODUCT_MODULE_NAME = "$(TARGET_NAME:c99extidentifier)"; 434 | PRODUCT_NAME = "$(TARGET_NAME:c99extidentifier)"; 435 | SKIP_INSTALL = YES; 436 | SWIFT_ACTIVE_COMPILATION_CONDITIONS = "$(inherited)"; 437 | SWIFT_VERSION = 5.0; 438 | TARGET_NAME = Roundrect; 439 | }; 440 | name = Debug; 441 | }; 442 | OBJ_64 /* Release */ = { 443 | isa = XCBuildConfiguration; 444 | buildSettings = { 445 | ENABLE_TESTABILITY = YES; 446 | FRAMEWORK_SEARCH_PATHS = ( 447 | "$(inherited)", 448 | "$(PLATFORM_DIR)/Developer/Library/Frameworks", 449 | ); 450 | HEADER_SEARCH_PATHS = "$(inherited)"; 451 | INFOPLIST_FILE = Roundrect.xcodeproj/Roundrect_Info.plist; 452 | LD_RUNPATH_SEARCH_PATHS = ( 453 | "$(inherited)", 454 | "$(TOOLCHAIN_DIR)/usr/lib/swift/macosx", 455 | ); 456 | MARKETING_VERSION = 1.2; 457 | OTHER_CFLAGS = "$(inherited)"; 458 | OTHER_LDFLAGS = "$(inherited)"; 459 | OTHER_SWIFT_FLAGS = "$(inherited)"; 460 | PRODUCT_BUNDLE_IDENTIFIER = Roundrect; 461 | PRODUCT_MODULE_NAME = "$(TARGET_NAME:c99extidentifier)"; 462 | PRODUCT_NAME = "$(TARGET_NAME:c99extidentifier)"; 463 | SKIP_INSTALL = YES; 464 | SWIFT_ACTIVE_COMPILATION_CONDITIONS = "$(inherited)"; 465 | SWIFT_VERSION = 5.0; 466 | TARGET_NAME = Roundrect; 467 | }; 468 | name = Release; 469 | }; 470 | OBJ_85 /* Debug */ = { 471 | isa = XCBuildConfiguration; 472 | buildSettings = { 473 | CLANG_ENABLE_MODULES = YES; 474 | EMBEDDED_CONTENT_CONTAINS_SWIFT = YES; 475 | FRAMEWORK_SEARCH_PATHS = ( 476 | "$(inherited)", 477 | "$(PLATFORM_DIR)/Developer/Library/Frameworks", 478 | ); 479 | HEADER_SEARCH_PATHS = "$(inherited)"; 480 | INFOPLIST_FILE = Roundrect.xcodeproj/RoundrectTests_Info.plist; 481 | LD_RUNPATH_SEARCH_PATHS = ( 482 | "$(inherited)", 483 | "@loader_path/../Frameworks", 484 | "@loader_path/Frameworks", 485 | ); 486 | OTHER_CFLAGS = "$(inherited)"; 487 | OTHER_LDFLAGS = "$(inherited)"; 488 | OTHER_SWIFT_FLAGS = "$(inherited)"; 489 | SWIFT_ACTIVE_COMPILATION_CONDITIONS = "$(inherited)"; 490 | SWIFT_VERSION = 5.0; 491 | TARGET_NAME = RoundrectTests; 492 | }; 493 | name = Debug; 494 | }; 495 | OBJ_86 /* Release */ = { 496 | isa = XCBuildConfiguration; 497 | buildSettings = { 498 | CLANG_ENABLE_MODULES = YES; 499 | EMBEDDED_CONTENT_CONTAINS_SWIFT = YES; 500 | FRAMEWORK_SEARCH_PATHS = ( 501 | "$(inherited)", 502 | "$(PLATFORM_DIR)/Developer/Library/Frameworks", 503 | ); 504 | HEADER_SEARCH_PATHS = "$(inherited)"; 505 | INFOPLIST_FILE = Roundrect.xcodeproj/RoundrectTests_Info.plist; 506 | LD_RUNPATH_SEARCH_PATHS = ( 507 | "$(inherited)", 508 | "@loader_path/../Frameworks", 509 | "@loader_path/Frameworks", 510 | ); 511 | OTHER_CFLAGS = "$(inherited)"; 512 | OTHER_LDFLAGS = "$(inherited)"; 513 | OTHER_SWIFT_FLAGS = "$(inherited)"; 514 | SWIFT_ACTIVE_COMPILATION_CONDITIONS = "$(inherited)"; 515 | SWIFT_VERSION = 5.0; 516 | TARGET_NAME = RoundrectTests; 517 | }; 518 | name = Release; 519 | }; 520 | /* End XCBuildConfiguration section */ 521 | 522 | /* Begin XCConfigurationList section */ 523 | OBJ_2 /* Build configuration list for PBXProject "Roundrect" */ = { 524 | isa = XCConfigurationList; 525 | buildConfigurations = ( 526 | OBJ_3 /* Debug */, 527 | OBJ_4 /* Release */, 528 | ); 529 | defaultConfigurationIsVisible = 0; 530 | defaultConfigurationName = Release; 531 | }; 532 | OBJ_62 /* Build configuration list for PBXNativeTarget "Roundrect" */ = { 533 | isa = XCConfigurationList; 534 | buildConfigurations = ( 535 | OBJ_63 /* Debug */, 536 | OBJ_64 /* Release */, 537 | ); 538 | defaultConfigurationIsVisible = 0; 539 | defaultConfigurationName = Release; 540 | }; 541 | OBJ_84 /* Build configuration list for PBXNativeTarget "RoundrectTests" */ = { 542 | isa = XCConfigurationList; 543 | buildConfigurations = ( 544 | OBJ_85 /* Debug */, 545 | OBJ_86 /* Release */, 546 | ); 547 | defaultConfigurationIsVisible = 0; 548 | defaultConfigurationName = Release; 549 | }; 550 | /* End XCConfigurationList section */ 551 | 552 | /* Begin XCRemoteSwiftPackageReference section */ 553 | B266546823ECC5D500B1FE3E /* XCRemoteSwiftPackageReference "swift-snapshot-testing" */ = { 554 | isa = XCRemoteSwiftPackageReference; 555 | repositoryURL = "https://github.com/pointfreeco/swift-snapshot-testing.git"; 556 | requirement = { 557 | kind = upToNextMajorVersion; 558 | minimumVersion = 1.7.1; 559 | }; 560 | }; 561 | /* End XCRemoteSwiftPackageReference section */ 562 | 563 | /* Begin XCSwiftPackageProductDependency section */ 564 | B25DF2B72733298E00ECD553 /* SnapshotTesting */ = { 565 | isa = XCSwiftPackageProductDependency; 566 | package = B266546823ECC5D500B1FE3E /* XCRemoteSwiftPackageReference "swift-snapshot-testing" */; 567 | productName = SnapshotTesting; 568 | }; 569 | B25DF2BC27332DDF00ECD553 /* SnapshotTesting */ = { 570 | isa = XCSwiftPackageProductDependency; 571 | package = B266546823ECC5D500B1FE3E /* XCRemoteSwiftPackageReference "swift-snapshot-testing" */; 572 | productName = SnapshotTesting; 573 | }; 574 | /* End XCSwiftPackageProductDependency section */ 575 | }; 576 | rootObject = OBJ_1 /* Project object */; 577 | } 578 | -------------------------------------------------------------------------------- /Roundrect.xcodeproj/project.xcworkspace/contents.xcworkspacedata: -------------------------------------------------------------------------------- 1 | 2 | 4 | 6 | 7 | 8 | -------------------------------------------------------------------------------- /Roundrect.xcodeproj/project.xcworkspace/xcshareddata/IDEWorkspaceChecks.plist: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | IDEDidComputeMac32BitWarning 6 | 7 | 8 | 9 | -------------------------------------------------------------------------------- /Roundrect.xcodeproj/project.xcworkspace/xcshareddata/WorkspaceSettings.xcsettings: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | IDEWorkspaceSharedSettings_AutocreateContextsIfNeeded 6 | 7 | 8 | -------------------------------------------------------------------------------- /Roundrect.xcodeproj/project.xcworkspace/xcshareddata/swiftpm/Package.resolved: -------------------------------------------------------------------------------- 1 | { 2 | "object": { 3 | "pins": [ 4 | { 5 | "package": "SnapshotTesting", 6 | "repositoryURL": "https://github.com/pointfreeco/swift-snapshot-testing.git", 7 | "state": { 8 | "branch": null, 9 | "revision": "f8a9c997c3c1dab4e216a8ec9014e23144cbab37", 10 | "version": "1.9.0" 11 | } 12 | } 13 | ] 14 | }, 15 | "version": 1 16 | } 17 | -------------------------------------------------------------------------------- /Roundrect.xcodeproj/xcshareddata/xcschemes/Roundrect.xcscheme: -------------------------------------------------------------------------------- 1 | 2 | 5 | 8 | 9 | 15 | 21 | 22 | 23 | 24 | 25 | 30 | 31 | 33 | 39 | 40 | 41 | 42 | 43 | 53 | 54 | 60 | 61 | 63 | 64 | 67 | 68 | 69 | -------------------------------------------------------------------------------- /Sources/Roundrect/ButtonStyle.swift: -------------------------------------------------------------------------------- 1 | // 2 | // ButtonStyle.swift 3 | // Roundrect 4 | // 5 | // Created by Gabriel O'Flaherty-Chan on 2019-01-11. 6 | // Copyright © 2019 gabrieloc. All rights reserved. 7 | // 8 | 9 | import UIKit 10 | 11 | public extension UIButton { 12 | enum Size: String, CaseIterable { 13 | case small, big 14 | } 15 | 16 | enum ActionType: String, CaseIterable { 17 | case primary, dismiss 18 | } 19 | 20 | enum Style: Equatable { 21 | static let highlightedAlpha: CGFloat = 0.2 22 | static let disabledAlpha: CGFloat = 0.5 23 | 24 | case gradient(from: UIColor, to: UIColor, rounding: Rounding, alpha: CGFloat) 25 | case bordered(rounding: Rounding, lineWidth: CGFloat = 1, color: UIColor? = nil, alpha: CGFloat = 1) 26 | case filled(rounding: Rounding, color: UIColor? = nil, alpha: CGFloat = 1) 27 | case titleOnly(color: UIColor? = nil, alpha: CGFloat = 1) 28 | 29 | var rounding: Rounding? { 30 | switch self { 31 | case let .bordered(rounding, _, _, _), 32 | let .filled(rounding, _, _), 33 | let .gradient(_, _, rounding, _): 34 | return rounding 35 | case .titleOnly: 36 | return nil 37 | } 38 | } 39 | 40 | var disabledColor: UIColor { 41 | if #available(iOS 13, *) { 42 | return UIColor.quaternarySystemFill 43 | } 44 | return UIColor(white: 0.5, alpha: 0.5) 45 | } 46 | 47 | var disabled: Style { 48 | switch self { 49 | case let .filled(rounding, _, _), 50 | let .bordered(rounding, _, _, _), 51 | let .gradient(_, _, rounding, _): 52 | return .filled(rounding: rounding, color: disabledColor, alpha: 1) 53 | case let .titleOnly(c, _): 54 | if let color = c { 55 | return .titleOnly(color: color.grayscale, alpha: 1) 56 | } else { 57 | return .titleOnly(color: nil, alpha: Self.disabledAlpha) 58 | } 59 | } 60 | } 61 | 62 | var highlighted: Style { 63 | switch self { 64 | case let .filled(rounding, c, _): 65 | return .filled(rounding: rounding, color: c, alpha: Self.highlightedAlpha) 66 | case let .bordered(rounding, lineWidth, c, _): 67 | return .bordered(rounding: rounding, lineWidth: lineWidth, color: c, alpha: Self.highlightedAlpha) 68 | case let .gradient(from, to, rounding, _): 69 | return .gradient( 70 | from: from.withAlphaComponent(Self.highlightedAlpha), 71 | to: to.withAlphaComponent(Self.highlightedAlpha), 72 | rounding: rounding, 73 | alpha: Self.highlightedAlpha 74 | ) 75 | case let .titleOnly(c, _): 76 | if let color = c { 77 | return .titleOnly(color: color, alpha: 1) 78 | } else { 79 | return .titleOnly(color: nil, alpha: Self.highlightedAlpha) 80 | } 81 | } 82 | } 83 | 84 | func backgroundImage(traitCollection: UITraitCollection) -> UIImage? { 85 | switch self { 86 | case let .gradient(from, to, rounding, alpha): 87 | return UIImage.gradientImage( 88 | colors: [from.withAlphaComponent(alpha), to.withAlphaComponent(alpha)], 89 | rounding: rounding, 90 | insets: rounding.insets, 91 | traitCollection: traitCollection 92 | ) 93 | case let .bordered(rounding, lineWidth, c, alpha): 94 | return UIImage.resizableImage( 95 | fill: .clear, 96 | stroke: ( 97 | color: c ?? .black, 98 | width: lineWidth 99 | ), 100 | rounding: rounding, 101 | insets: rounding.insets, 102 | alpha: alpha, 103 | traitCollection: traitCollection 104 | )?.withRenderingMode(c == nil ? .alwaysTemplate : .alwaysOriginal) 105 | case let .filled(rounding, c, alpha): 106 | return UIImage.resizableImage( 107 | fill: c ?? .black, 108 | stroke: nil, 109 | rounding: rounding, 110 | insets: rounding.insets, 111 | alpha: alpha, 112 | traitCollection: traitCollection 113 | )?.withRenderingMode(c == nil ? .alwaysTemplate : .alwaysOriginal) 114 | case .titleOnly: 115 | return nil 116 | } 117 | } 118 | 119 | @available(iOS, obsoleted: 13) 120 | func titleColor(state: UIControl.State, theme: Theme) -> UIColor? { 121 | let color: UIColor? = { 122 | guard state != .disabled else { 123 | return theme.foregroundColor 124 | } 125 | 126 | switch self { 127 | case .titleOnly: 128 | return theme == .dark ? .white : nil 129 | case .gradient, .filled: 130 | return theme == .extraLight ? .black : .white 131 | case .bordered: 132 | return nil 133 | } 134 | }() 135 | let dim = state == .disabled 136 | return color?.withAlphaComponent(dim ? 0.4 : 1) 137 | } 138 | 139 | @available(iOS 13, *) 140 | func titleColor(state: UIControl.State) -> UIColor? { 141 | if state == .disabled { 142 | return UIColor.tertiaryLabel 143 | } 144 | switch self { 145 | case .titleOnly, .bordered: 146 | return nil 147 | case .gradient, .filled: 148 | return .white 149 | } 150 | } 151 | } 152 | 153 | @available(iOS 13.0, *) 154 | convenience init(style: Style, size: Size = .big, type: UIButton.ButtonType = .system) { 155 | self.init(type: type) 156 | setStyle(style, size: size) 157 | } 158 | 159 | @available(iOS, obsoleted: 13) 160 | convenience init(style: Style, size: Size = .big, theme: Theme, type: UIButton.ButtonType = .system) { 161 | self.init(type: type) 162 | 163 | setStyle(style, size: size, theme: theme) 164 | } 165 | 166 | internal var configurableStates: [UIControl.State] { 167 | return [.normal, .selected, .highlighted, .disabled] 168 | } 169 | 170 | @available(iOS, obsoleted: 13) 171 | func setStyle(_ style: Style, size: Size = .big, theme: Theme) { 172 | configureCommonAttributes(style, size: size) 173 | if theme == .extraLight { 174 | setBackgroundImage(style.backgroundImage(traitCollection: traitCollection)?.withAlpha(0.4), for: .normal) 175 | } 176 | configurableStates.forEach { 177 | setTitleColor(style.titleColor(state: $0, theme: theme), for: $0) 178 | } 179 | } 180 | 181 | @available(iOS 13, *) 182 | func setStyle(_ style: Style, size: Size = .big) { 183 | configureCommonAttributes(style, size: size) 184 | configurableStates.forEach { 185 | setTitleColor(style.titleColor(state: $0), for: $0) 186 | } 187 | } 188 | 189 | private func configureCommonAttributes(_ style: Style, size: Size) { 190 | backgroundColor = .clear 191 | 192 | setBackgroundImage(style.backgroundImage(traitCollection: traitCollection), for: .normal) 193 | setBackgroundImage(style.highlighted.backgroundImage(traitCollection: traitCollection), for: .selected) 194 | setBackgroundImage(style.highlighted.backgroundImage(traitCollection: traitCollection), for: .highlighted) 195 | setBackgroundImage(style.disabled.backgroundImage(traitCollection: traitCollection)?.withRenderingMode(.alwaysOriginal), for: .disabled) 196 | 197 | if let rounding = style.rounding { 198 | contentEdgeInsets = UIEdgeInsets( 199 | x: rounding.radii, 200 | y: size == .small ? 10 : 16 201 | ) 202 | } 203 | contentHorizontalAlignment = .center 204 | titleLabel?.adjustsFontSizeToFitWidth = true 205 | contentVerticalAlignment = .center 206 | } 207 | } 208 | -------------------------------------------------------------------------------- /Sources/Roundrect/ButtonTheme.swift: -------------------------------------------------------------------------------- 1 | // 2 | // ButtonTheme.swift 3 | // Roundrect 4 | // 5 | // Created by Gabriel O'Flaherty-Chan on 2019-01-11. 6 | // Copyright © 2019 gabrieloc. All rights reserved. 7 | // 8 | 9 | import UIKit 10 | 11 | // dark theme is dark button with light text 12 | // light theme is light button with dark text 13 | public extension UIButton { 14 | @available(iOS, obsoleted: 13, message: "Rely on UIUserInterfaceStyle") 15 | enum Theme: String, CaseIterable { 16 | case extraLight, light, dark 17 | 18 | var foregroundColor: UIColor { 19 | switch self { 20 | case .light, .extraLight: 21 | return .black 22 | default: 23 | return .white 24 | } 25 | } 26 | 27 | var inverse: Self { 28 | switch self { 29 | case .dark: 30 | return .light 31 | default: 32 | return .dark 33 | } 34 | } 35 | } 36 | } 37 | -------------------------------------------------------------------------------- /Sources/Roundrect/ImageGeneration.swift: -------------------------------------------------------------------------------- 1 | // 2 | // ImageGeneration.swift 3 | // Roundrect 4 | // 5 | // Created by Gabriel O'Flaherty-Chan on 2019-01-11. 6 | // Copyright © 2019 gabrieloc. All rights reserved. 7 | // 8 | 9 | import UIKit 10 | 11 | public enum Rounding: Equatable { 12 | case all(CGFloat) 13 | case some(corners: UIRectCorner, radii: CGFloat) 14 | 15 | var corners: UIRectCorner { 16 | switch self { 17 | case .all: 18 | return .allCorners 19 | case let .some(corners, _): 20 | return corners 21 | } 22 | } 23 | 24 | var radii: CGFloat { 25 | switch self { 26 | case let .all(value): 27 | return value 28 | case let .some(_, radii): 29 | return radii 30 | } 31 | } 32 | 33 | var insets: UIEdgeInsets { 34 | UIEdgeInsets( 35 | x: radii, 36 | y: radii 37 | ) 38 | } 39 | 40 | func radius(for corner: UIRectCorner) -> CGFloat? { 41 | guard corners.contains(corner) else { 42 | return nil 43 | } 44 | return radii 45 | } 46 | } 47 | 48 | public extension UIImage { 49 | convenience init(view: UIView) { 50 | UIGraphicsBeginImageContextWithOptions(view.bounds.size, view.isOpaque, 0.0) 51 | view.layer.render(in: UIGraphicsGetCurrentContext()!) 52 | let image = UIGraphicsGetImageFromCurrentImageContext() 53 | UIGraphicsEndImageContext() 54 | self.init(cgImage: image!.cgImage!) 55 | } 56 | 57 | static func imageWithLayer(_ layer: CALayer) -> UIImage? { 58 | UIGraphicsBeginImageContextWithOptions(layer.bounds.size, layer.isOpaque, 0.0) 59 | guard let context = UIGraphicsGetCurrentContext() else { 60 | return nil 61 | } 62 | layer.render(in: context) 63 | let img = UIGraphicsGetImageFromCurrentImageContext() 64 | UIGraphicsEndImageContext() 65 | return img 66 | } 67 | 68 | convenience init?( 69 | fill: UIColor, 70 | stroke: (color: UIColor, width: CGFloat)? = nil, 71 | strokeEdges: UIRectEdge = .all, 72 | rounding: Rounding? = nil, 73 | traitCollection: UITraitCollection 74 | ) { 75 | let (resolvedFill, resolvedStroke) = { () -> (UIColor, (UIColor, CGFloat)?) in 76 | guard #available(iOS 13.0, *) else { 77 | return (fill, stroke) 78 | } 79 | return ( 80 | fill.resolvedColor(with: traitCollection.withUserInterfaceStyle(.light)), 81 | stroke.map { 82 | ($0.color.resolvedColor(with: traitCollection.withUserInterfaceStyle(.light)), $0.width) 83 | } 84 | ) 85 | }() 86 | 87 | guard let lightImage = UIImage.fromColor( 88 | fill: resolvedFill, 89 | stroke: resolvedStroke, 90 | strokeEdges: strokeEdges, 91 | rounding: rounding 92 | )?.cgImage else { 93 | return nil 94 | } 95 | 96 | self.init( 97 | cgImage: lightImage, 98 | scale: UIScreen.main.scale, 99 | orientation: .up 100 | ) 101 | 102 | guard #available(iOS 13.0, *) else { 103 | return 104 | } 105 | 106 | if let darkImage = UIImage.fromColor( 107 | fill: fill.resolvedColor(with: traitCollection.withUserInterfaceStyle(.dark)), 108 | stroke: stroke.map { ($0.color.resolvedColor(with: traitCollection.withUserInterfaceStyle(.dark)), $0.width) }, 109 | strokeEdges: strokeEdges, 110 | rounding: rounding 111 | )?.cgImage { 112 | imageAsset?.register( 113 | .init( 114 | cgImage: darkImage, 115 | scale: UIScreen.main.scale, 116 | orientation: .up 117 | ), 118 | with: traitCollection.withUserInterfaceStyle(.dark) 119 | ) 120 | } 121 | } 122 | 123 | static func resizableImage( 124 | fill: UIColor, 125 | stroke: (color: UIColor, width: CGFloat)? = nil, 126 | strokeEdges: UIRectEdge = .all, 127 | rounding: Rounding? = nil, 128 | insets: UIEdgeInsets? = nil, 129 | alpha: CGFloat = 1, 130 | traitCollection: UITraitCollection 131 | ) -> UIImage? { 132 | guard let image = UIImage( 133 | fill: fill, 134 | stroke: stroke, 135 | strokeEdges: strokeEdges, 136 | rounding: rounding, 137 | traitCollection: traitCollection 138 | ) else { 139 | return nil 140 | } 141 | return image.withAlpha(alpha).resizableImage( 142 | withCapInsets: insets ?? rounding?.insets ?? .zero, 143 | resizingMode: .stretch 144 | ) 145 | } 146 | 147 | func withAlpha(_ alpha: CGFloat) -> UIImage { 148 | defer { 149 | UIGraphicsEndImageContext() 150 | } 151 | UIGraphicsBeginImageContextWithOptions( 152 | size, 153 | false, 154 | scale 155 | ) 156 | draw( 157 | at: CGPoint.zero, 158 | blendMode: .normal, 159 | alpha: alpha 160 | ) 161 | let newImage = UIGraphicsGetImageFromCurrentImageContext()! 162 | return newImage 163 | .resizableImage(withCapInsets: capInsets, resizingMode: resizingMode) 164 | .withRenderingMode(renderingMode) 165 | } 166 | 167 | static func gradientImage( 168 | colors: [UIColor], 169 | rounding: Rounding? = nil, 170 | insets: UIEdgeInsets? = nil, 171 | stops: (start: CGPoint, end: CGPoint) = (CGPoint(x: 0, y: 0), CGPoint(x: 1, y: 0)), 172 | traitCollection: UITraitCollection 173 | ) -> UIImage? { 174 | let capInsets: UIEdgeInsets = insets ?? rounding?.insets ?? .zero 175 | guard let lightImage = UIImage.imageWithLayer( 176 | CALayer.gradient( 177 | colors: colors.map { 178 | guard #available(iOS 13.0, *) else { 179 | return $0 180 | } 181 | return $0.resolvedColor(with: traitCollection.withUserInterfaceStyle(.light)) 182 | }, 183 | rounding: rounding, 184 | insets: insets ?? .zero, 185 | stops: stops 186 | ) 187 | )?.resizableImage( 188 | withCapInsets: capInsets, 189 | resizingMode: .stretch 190 | ) else { 191 | return nil 192 | } 193 | guard 194 | #available(iOS 13.0, *), 195 | let darkImage = UIImage.imageWithLayer( 196 | .gradient( 197 | colors: colors.map { 198 | $0.resolvedColor(with: traitCollection.withUserInterfaceStyle(.dark)) 199 | }, 200 | rounding: rounding, 201 | insets: insets ?? .zero, 202 | stops: stops 203 | ) 204 | )?.resizableImage( 205 | withCapInsets: capInsets, 206 | resizingMode: .stretch 207 | ) 208 | else { 209 | return lightImage 210 | } 211 | lightImage.imageAsset?.register(darkImage, with: traitCollection.withUserInterfaceStyle(.dark)) 212 | return lightImage 213 | } 214 | } 215 | 216 | private extension CALayer { 217 | static func gradient( 218 | colors: [UIColor], 219 | rounding: Rounding?, 220 | insets: UIEdgeInsets, 221 | stops: (start: CGPoint, end: CGPoint) 222 | ) -> CALayer { 223 | let rect = CGRect( 224 | origin: .zero, 225 | size: CGSize( 226 | width: insets.left + insets.right + 50, 227 | height: insets.top + insets.bottom + 50 228 | ) 229 | ) 230 | 231 | let layer = CAGradientLayer() 232 | layer.frame = rect 233 | layer.startPoint = stops.start 234 | layer.endPoint = stops.end 235 | layer.colors = colors.map { $0.cgColor } 236 | 237 | if let rounding = rounding { 238 | let maskLayer = CAShapeLayer() 239 | maskLayer.path = UIBezierPath( 240 | roundedRect: rect, 241 | byRoundingCorners: rounding.corners, 242 | cornerRadii: CGSize(width: rounding.radii, height: rounding.radii) 243 | ).cgPath 244 | maskLayer.frame = rect 245 | layer.mask = maskLayer 246 | } 247 | 248 | return layer 249 | } 250 | } 251 | 252 | public extension UIBezierPath { 253 | static func fillPath( 254 | in rect: CGRect, 255 | rounding: Rounding? 256 | ) -> Self { 257 | guard let rounding = rounding else { 258 | return .init(rect: rect) 259 | } 260 | return .init( 261 | roundedRect: rect, 262 | byRoundingCorners: rounding.corners, 263 | cornerRadii: CGSize( 264 | width: rounding.radii, 265 | height: rounding.radii 266 | ) 267 | ) 268 | } 269 | 270 | func addArcSegment(for edge: UIRectEdge, rounding: Rounding?, rect: CGRect, center: CGPoint) { 271 | guard 272 | let corners = edge.anticlockwiseCorners, 273 | let origin = rect.point(at: corners.origin), 274 | let destination = rect.point(at: corners.destination) 275 | else { 276 | return 277 | } 278 | let direction = (destination - origin).normalized 279 | func rad(_ p: CGPoint) -> CGFloat { 280 | let rad = atan2(p.x, p.y) 281 | var angle = (rad - .pi * 0.5) * -1 282 | if angle > .pi { // TODO: learn trigonometry 283 | angle = (.pi * 2 - angle) * -1 284 | } 285 | return angle 286 | } 287 | 288 | func arc(radius: CGFloat, from: CGPoint, to: CGPoint) { 289 | addArc( 290 | withCenter: center, 291 | radius: radius, 292 | startAngle: rad(from - center), 293 | endAngle: rad(to - center), 294 | clockwise: false 295 | ) 296 | } 297 | 298 | if let originRadius = rounding?.radius(for: corners.origin) { 299 | let pivot = center + (origin - center).normalized * originRadius 300 | let insetOrigin = origin + direction * originRadius 301 | arc( 302 | radius: (insetOrigin - center).magnitude, 303 | from: pivot, 304 | to: insetOrigin 305 | ) 306 | addLine(to: insetOrigin) 307 | } else { 308 | move(to: origin) 309 | } 310 | 311 | if let destinationRadius = rounding?.radius(for: corners.destination) { 312 | let insetDestination = destination - direction * destinationRadius 313 | addLine(to: insetDestination) 314 | let pivot = center + (destination - center).normalized * destinationRadius 315 | arc( 316 | radius: (insetDestination - center).magnitude, 317 | from: insetDestination, 318 | to: pivot 319 | ) 320 | } else { 321 | addLine(to: destination) 322 | } 323 | } 324 | 325 | static func strokePath( 326 | in rect: CGRect, 327 | strokeEdges: UIRectEdge, 328 | rounding: Rounding?, 329 | strokeWidth: CGFloat 330 | ) -> UIBezierPath { 331 | let path = UIBezierPath() 332 | 333 | // recalculate the center to ensure segments align 334 | var center = rect.center 335 | center.y += strokeEdges.contains(.top) ? 0 : strokeWidth * 0.25 336 | center.y += strokeEdges.contains(.bottom) ? 0 : strokeWidth * -0.25 337 | center.x += strokeEdges.contains(.right) ? 0 : strokeWidth * 0.25 338 | center.x += strokeEdges.contains(.left) ? 0 : strokeWidth * -0.25 339 | 340 | if strokeEdges.contains(.top) { 341 | path.addArcSegment(for: .top, rounding: rounding, rect: rect, center: center) 342 | } 343 | if strokeEdges.contains(.left) { 344 | path.addArcSegment(for: .left, rounding: rounding, rect: rect, center: center) 345 | } 346 | if strokeEdges.contains(.bottom) { 347 | path.addArcSegment(for: .bottom, rounding: rounding, rect: rect, center: center) 348 | } 349 | if strokeEdges.contains(.right) { 350 | path.addArcSegment(for: .right, rounding: rounding, rect: rect, center: center) 351 | } 352 | return path 353 | } 354 | } 355 | 356 | private extension UIImage { 357 | static func fromColor( 358 | fill: UIColor, 359 | stroke: (color: UIColor, width: CGFloat)? = nil, 360 | strokeEdges: UIRectEdge = .all, 361 | rounding: Rounding? = nil 362 | ) -> UIImage? { 363 | let strokeWidth = stroke?.width ?? 0 364 | let rect = CGRect( 365 | origin: .zero, 366 | size: CGSize( 367 | width: 1 + (rounding?.radii ?? 0) * 2, 368 | height: 1 + (rounding?.radii ?? 0) * 2 369 | ) 370 | ).inset( 371 | by: UIEdgeInsets( 372 | value: strokeWidth * 0.5, 373 | edges: strokeEdges 374 | ) 375 | ) 376 | 377 | let assetSize = rect.inset( 378 | by: UIEdgeInsets( 379 | value: strokeWidth * -0.5, 380 | edges: strokeEdges 381 | ) 382 | ).size 383 | 384 | UIGraphicsBeginImageContextWithOptions(assetSize, false, UIScreen.main.scale) 385 | 386 | let fillPath = UIBezierPath.fillPath( 387 | in: rect, 388 | rounding: rounding 389 | ) 390 | fill.setFill() 391 | fillPath.fill() 392 | 393 | if let strokeColor = stroke?.color, strokeWidth > 0 { 394 | let strokePath = UIBezierPath.strokePath( 395 | in: rect, 396 | strokeEdges: strokeEdges, 397 | rounding: rounding, 398 | strokeWidth: strokeWidth 399 | ) 400 | strokePath.lineWidth = strokeWidth 401 | strokeColor.setStroke() 402 | strokePath.stroke() 403 | } 404 | let image = UIGraphicsGetImageFromCurrentImageContext() 405 | UIGraphicsEndImageContext() 406 | 407 | return image 408 | } 409 | } 410 | -------------------------------------------------------------------------------- /Sources/Roundrect/Roundrect.swift: -------------------------------------------------------------------------------- 1 | struct Roundrect { 2 | var text = "Hello, World!" 3 | } 4 | -------------------------------------------------------------------------------- /Sources/Roundrect/Util.swift: -------------------------------------------------------------------------------- 1 | // 2 | // ButtonUtil.swift 3 | // Roundrect 4 | // 5 | // Created by Gabriel O'Flaherty-Chan on 2019-01-11. 6 | // Copyright © 2019 gabrieloc. All rights reserved. 7 | // 8 | 9 | import UIKit 10 | 11 | public extension UIEdgeInsets { 12 | init(x: CGFloat, y: CGFloat) { 13 | self.init(top: y, left: x, bottom: y, right: x) 14 | } 15 | 16 | init(equalInsets: CGFloat) { 17 | self.init(top: equalInsets, left: equalInsets, bottom: equalInsets, right: equalInsets) 18 | } 19 | 20 | init(value: CGFloat, edges: UIRectEdge) { 21 | self.init( 22 | top: edges.contains(.top) ? value : 0, 23 | left: edges.contains(.left) ? value : 0, 24 | bottom: edges.contains(.bottom) ? value : 0, 25 | right: edges.contains(.right) ? value : 0 26 | ) 27 | } 28 | } 29 | 30 | extension UIColor { 31 | var grayscale: UIColor { 32 | var grayscale: CGFloat = 0 33 | var alpha: CGFloat = 0 34 | guard getWhite(&grayscale, alpha: &alpha) else { 35 | return self 36 | } 37 | return UIColor(white: grayscale, alpha: alpha) 38 | } 39 | } 40 | 41 | extension CGRect { 42 | var center: CGPoint { 43 | origin + CGPoint(x: size.width * 0.5, y: size.height * 0.5) 44 | } 45 | 46 | func point(at corner: UIRectCorner) -> CGPoint? { 47 | switch corner { 48 | case .topLeft: 49 | return CGPoint(x: minX, y: minY) 50 | case .bottomLeft: 51 | return CGPoint(x: minX, y: maxY) 52 | case .bottomRight: 53 | return CGPoint(x: maxX, y: maxY) 54 | case .topRight: 55 | return CGPoint(x: maxX, y: minY) 56 | default: 57 | return nil 58 | } 59 | } 60 | } 61 | 62 | extension UIRectEdge { 63 | var anticlockwiseCorners: (origin: UIRectCorner, destination: UIRectCorner)? { 64 | switch self { 65 | case .top: 66 | return (.topRight, .topLeft) 67 | case .left: 68 | return (.topLeft, .bottomLeft) 69 | case .bottom: 70 | return (.bottomLeft, .bottomRight) 71 | case .right: 72 | return (.bottomRight, .topRight) 73 | default: 74 | return nil 75 | } 76 | } 77 | } 78 | 79 | public struct OptionSetIterator: IteratorProtocol where Element.RawValue == Int { 80 | private let value: Element 81 | 82 | public init(element: Element) { 83 | value = element 84 | } 85 | 86 | private lazy var remainingBits = value.rawValue 87 | private var bitMask = 1 88 | 89 | public mutating func next() -> Element? { 90 | while remainingBits != 0 { 91 | defer { bitMask = bitMask &* 2 } 92 | if remainingBits & bitMask != 0 { 93 | remainingBits = remainingBits & ~bitMask 94 | return Element(rawValue: bitMask) 95 | } 96 | } 97 | return nil 98 | } 99 | } 100 | 101 | extension CGPoint { 102 | static func - (lhs: Self, rhs: Self) -> Self { 103 | Self(x: lhs.x - rhs.x, y: lhs.y - rhs.y) 104 | } 105 | 106 | static func + (lhs: Self, rhs: Self) -> Self { 107 | Self(x: lhs.x + rhs.x, y: lhs.y + rhs.y) 108 | } 109 | 110 | static func / (lhs: Self, rhs: CGFloat) -> Self { 111 | Self(x: lhs.x / rhs, y: lhs.y / rhs) 112 | } 113 | 114 | static func * (lhs: Self, rhs: CGFloat) -> Self { 115 | Self(x: lhs.x * rhs, y: lhs.y * rhs) 116 | } 117 | 118 | static func * (lhs: Self, rhs: Self) -> Self { 119 | Self(x: lhs.x * rhs.x, y: lhs.y * rhs.y) 120 | } 121 | 122 | var magnitude: CGFloat { 123 | sqrt(x * x + y * y) 124 | } 125 | 126 | var normalized: Self { 127 | self / magnitude 128 | } 129 | 130 | var flipped: Self { 131 | Self(x: y, y: x) 132 | } 133 | } 134 | 135 | func lerp(_ lhs: CGPoint, _ rhs: CGPoint, _ t: CGFloat) -> CGPoint { 136 | lhs + (rhs - lhs) * t 137 | } 138 | 139 | func rad2deg(_ number: T) -> T where T: FloatingPoint { 140 | number * 180 / .pi 141 | } 142 | 143 | extension CGFloat { 144 | static let tau = CGFloat.pi * 2 145 | } 146 | 147 | @available(iOS 13.0, *) 148 | public extension UITraitCollection { 149 | static var lightInterfaceStyle: UITraitCollection { 150 | UITraitCollection.current.withUserInterfaceStyle(.light) 151 | } 152 | 153 | static var darkInterfaceStyle: UITraitCollection { 154 | UITraitCollection.current.withUserInterfaceStyle(.dark) 155 | } 156 | 157 | func withUserInterfaceStyle(_ style: UIUserInterfaceStyle) -> UITraitCollection { 158 | UITraitCollection( 159 | traitsFrom: [ 160 | self, 161 | UITraitCollection(userInterfaceStyle: style), 162 | ] 163 | ) 164 | } 165 | } 166 | -------------------------------------------------------------------------------- /Tests/RoundrectTests/AdaptiveColorTests.swift: -------------------------------------------------------------------------------- 1 | // 2 | // AdaptiveColorTests.swift 3 | // 4 | // 5 | // Created by Gabriel O'Flaherty-Chan on 2021-05-03. 6 | // 7 | 8 | import Roundrect 9 | import SnapshotTesting 10 | import UIKit 11 | import XCTest 12 | 13 | @available(iOS 13.0, *) 14 | class AdaptiveColorTests: XCTestCase { 15 | func testSingleFillLight() throws { 16 | assertSnapshot( 17 | matching: try XCTUnwrap( 18 | UIImage( 19 | fill: .adaptive1, 20 | stroke: (.adaptive2, 1), 21 | rounding: .all(10), 22 | traitCollection: UITraitCollection.current.withUserInterfaceStyle(.light) 23 | ) 24 | ), 25 | as: .image(style: .light) 26 | ) 27 | } 28 | 29 | func testSingleFillLightDark() throws { 30 | assertSnapshot( 31 | matching: try XCTUnwrap( 32 | UIImage( 33 | fill: .adaptive1, 34 | stroke: (.adaptive2, 1), 35 | rounding: .all(10), 36 | traitCollection: UITraitCollection.current.withUserInterfaceStyle(.dark) 37 | ) 38 | ), 39 | as: .image(style: .dark) 40 | ) 41 | } 42 | 43 | func testGradientFillLight() throws { 44 | assertSnapshot( 45 | matching: try XCTUnwrap( 46 | UIImage.gradientImage( 47 | colors: [.adaptive1, .adaptive2], 48 | rounding: .all(10), 49 | traitCollection: UITraitCollection.current.withUserInterfaceStyle(.light) 50 | ) 51 | ), 52 | as: .image(style: .light) 53 | ) 54 | } 55 | 56 | func testGradientFillDark() throws { 57 | assertSnapshot( 58 | matching: try XCTUnwrap( 59 | UIImage.gradientImage( 60 | colors: [.adaptive1, .adaptive2], 61 | rounding: .all(10), 62 | traitCollection: UITraitCollection.current.withUserInterfaceStyle(.dark) 63 | ) 64 | ), 65 | as: .image(style: .dark) 66 | ) 67 | } 68 | } 69 | -------------------------------------------------------------------------------- /Tests/RoundrectTests/Assets.xcassets/Contents.json: -------------------------------------------------------------------------------- 1 | { 2 | "info" : { 3 | "author" : "xcode", 4 | "version" : 1 5 | } 6 | } 7 | -------------------------------------------------------------------------------- /Tests/RoundrectTests/Assets.xcassets/bluered.colorset/Contents.json: -------------------------------------------------------------------------------- 1 | { 2 | "colors" : [ 3 | { 4 | "color" : { 5 | "color-space" : "srgb", 6 | "components" : { 7 | "alpha" : "1.000", 8 | "blue" : "1.000", 9 | "green" : "0.000", 10 | "red" : "0.000" 11 | } 12 | }, 13 | "idiom" : "universal" 14 | }, 15 | { 16 | "appearances" : [ 17 | { 18 | "appearance" : "luminosity", 19 | "value" : "dark" 20 | } 21 | ], 22 | "color" : { 23 | "color-space" : "srgb", 24 | "components" : { 25 | "alpha" : "1.000", 26 | "blue" : "0.000", 27 | "green" : "0.000", 28 | "red" : "1.000" 29 | } 30 | }, 31 | "idiom" : "universal" 32 | } 33 | ], 34 | "info" : { 35 | "author" : "xcode", 36 | "version" : 1 37 | } 38 | } 39 | -------------------------------------------------------------------------------- /Tests/RoundrectTests/Assets.xcassets/cyanmagenta.colorset/Contents.json: -------------------------------------------------------------------------------- 1 | { 2 | "colors" : [ 3 | { 4 | "color" : { 5 | "color-space" : "srgb", 6 | "components" : { 7 | "alpha" : "1.000", 8 | "blue" : "1.000", 9 | "green" : "1.000", 10 | "red" : "0.000" 11 | } 12 | }, 13 | "idiom" : "universal" 14 | }, 15 | { 16 | "appearances" : [ 17 | { 18 | "appearance" : "luminosity", 19 | "value" : "dark" 20 | } 21 | ], 22 | "color" : { 23 | "color-space" : "srgb", 24 | "components" : { 25 | "alpha" : "1.000", 26 | "blue" : "1.000", 27 | "green" : "0.000", 28 | "red" : "1.000" 29 | } 30 | }, 31 | "idiom" : "universal" 32 | } 33 | ], 34 | "info" : { 35 | "author" : "xcode", 36 | "version" : 1 37 | } 38 | } 39 | -------------------------------------------------------------------------------- /Tests/RoundrectTests/ButtonStyleTests.swift: -------------------------------------------------------------------------------- 1 | // 2 | // ButtonStyleTests.swift 3 | // RoundrectTests 4 | // 5 | // Created by Gabriel O'Flaherty-Chan on 2019-01-11. 6 | // Copyright © 2019 gabrieloc. All rights reserved. 7 | // 8 | 9 | @testable import Roundrect 10 | import SnapshotTesting 11 | import XCTest 12 | 13 | class ButtonStyleTests: XCTestCase { 14 | enum State: String, CaseIterable { 15 | case normal, highlighted, disabled 16 | } 17 | 18 | let styles = UIButton.Style.allValues(cornerRadius: 10) 19 | 20 | @available(iOS 13, *) 21 | func testInterfaceStyleCombinations() { 22 | UIButton.Size.allCases.forEach { size in 23 | State.allCases.forEach { state in 24 | styles.forEach { style in 25 | let button = self.button(style: style, size: size, state: state) 26 | button.0.overrideUserInterfaceStyle = UIUserInterfaceStyle.light 27 | verifyStyle(button: button.0, identifier: button.1 + "-light") 28 | 29 | button.0.overrideUserInterfaceStyle = UIUserInterfaceStyle.dark 30 | verifyStyle(button: button.0, identifier: button.1 + "-dark") 31 | } 32 | } 33 | } 34 | } 35 | 36 | @available(iOS, obsoleted: 13) 37 | func testAllCombinations() { 38 | UIButton.Size.allCases.forEach { size in 39 | UIButton.Theme.allCases.forEach { theme in 40 | State.allCases.forEach { state in 41 | styles.forEach { style in 42 | let button = self.button(style: style, size: size, theme: theme, state: state) 43 | verifyStyle(button: button.0, identifier: button.1) 44 | } 45 | } 46 | } 47 | } 48 | } 49 | 50 | func verifyStyle(button: UIButton, identifier: String, file: StaticString = #file, line: UInt = #line) { 51 | button.setTitle(identifier, for: .normal) 52 | assertSnapshot( 53 | matching: button, as: .image(size: CGSize(width: 400, height: 40)), 54 | named: identifier, 55 | file: file, 56 | line: line 57 | ) 58 | } 59 | 60 | @available(iOS, obsoleted: 13) 61 | func button(style: UIButton.Style, size: UIButton.Size, theme: UIButton.Theme, state: State) -> (UIButton, String) { 62 | let button = UIButton( 63 | style: style, 64 | size: size, 65 | theme: theme, 66 | type: .system 67 | ) 68 | button.isEnabled = state != .disabled 69 | button.isHighlighted = state == .highlighted 70 | let identifier = [ 71 | style.rawValue, 72 | size.rawValue, 73 | theme.rawValue, 74 | state.rawValue, 75 | ] 76 | .joined(separator: "-") 77 | return (button, identifier) 78 | } 79 | 80 | @available(iOS 13, *) 81 | func button(style: UIButton.Style, size: UIButton.Size, state: State) -> (UIButton, String) { 82 | let button = UIButton( 83 | style: style, 84 | size: size, 85 | type: .system 86 | ) 87 | button.isEnabled = state != .disabled 88 | button.isHighlighted = state == .highlighted 89 | let identifier = [ 90 | style.rawValue, 91 | size.rawValue, 92 | state.rawValue, 93 | ] 94 | .joined(separator: "-") 95 | return (button, identifier) 96 | } 97 | } 98 | 99 | extension UIButton.Style: RawRepresentable { 100 | public typealias RawValue = String 101 | 102 | public init?(rawValue _: String) { 103 | return nil 104 | } 105 | 106 | public var title: String { 107 | switch self { 108 | case .gradient: 109 | return "Gradient" 110 | case .bordered: 111 | return "Bordered" 112 | case .filled: 113 | return "Filled" 114 | case .titleOnly: 115 | return "Titled" 116 | } 117 | } 118 | 119 | public var rawValue: String { 120 | switch self { 121 | case let .gradient(from, to, cornerRadius, _): 122 | return "gradient \(cornerRadius) \(from)-\(to)" 123 | case let .bordered(rounding, _, _, alpha): 124 | return "bordered \(rounding) \(alpha)" 125 | case let .filled(rounding, _, alpha): 126 | return "filled \(rounding) \(alpha)" 127 | case .titleOnly: 128 | return "titled" 129 | } 130 | } 131 | 132 | static func allValues(cornerRadius: CGFloat) -> [UIButton.Style] { 133 | let rounding = Rounding.all(cornerRadius) 134 | return [ 135 | .filled(rounding: rounding, color: nil, alpha: 1), 136 | .bordered(rounding: rounding, color: nil, alpha: 1), 137 | .gradient(from: .red, to: .blue, rounding: rounding, alpha: 1), 138 | .titleOnly(color: .red, alpha: 1), 139 | ] 140 | } 141 | } 142 | -------------------------------------------------------------------------------- /Tests/RoundrectTests/ImageGenerationTests.swift: -------------------------------------------------------------------------------- 1 | // 2 | // ImageGenerationTests.swift 3 | // Roundrect 4 | // 5 | // Created by Gabriel O'Flaherty-Chan on 2019-01-11. 6 | // Copyright © 2019 gabrieloc. All rights reserved. 7 | // 8 | 9 | @testable import Roundrect 10 | import SnapshotTesting 11 | import XCTest 12 | 13 | @available(iOS 13.0, *) 14 | class ImageGenerationTests: XCTestCase { 15 | func testViewRasterization() { 16 | let view = UILabel() 17 | view.text = "👹" 18 | view.isOpaque = false 19 | view.sizeToFit() 20 | let image = UIImage(view: view) 21 | verifyImage(image) 22 | } 23 | 24 | func testFilledImage() { 25 | let image = UIImage( 26 | fill: .blue, 27 | traitCollection: .lightInterfaceStyle 28 | )! 29 | verifyImage(image) 30 | } 31 | 32 | func testStrokedImage() { 33 | let image = UIImage( 34 | fill: .clear, 35 | stroke: ( 36 | color: .blue, 37 | width: 1 38 | ), 39 | traitCollection: .lightInterfaceStyle 40 | )! 41 | verifyImage(image) 42 | } 43 | 44 | func testStrokedImageNoLineWidth() { 45 | let image = UIImage( 46 | fill: .red, 47 | stroke: ( 48 | color: .blue, 49 | width: 0 50 | ), 51 | traitCollection: .lightInterfaceStyle 52 | )! 53 | verifyImage(image) 54 | } 55 | 56 | func testFilledAndStrokedImage() { 57 | let image = UIImage( 58 | fill: .red, 59 | stroke: ( 60 | color: .blue, 61 | width: 10 62 | ), 63 | traitCollection: .lightInterfaceStyle 64 | )! 65 | verifyImage(image) 66 | } 67 | 68 | func testRoundedImage() { 69 | let image = UIImage( 70 | fill: .blue, 71 | rounding: .all(10), 72 | traitCollection: .lightInterfaceStyle 73 | )! 74 | verifyImage(image) 75 | } 76 | 77 | func testRoundedStrokedImage() { 78 | let image = UIImage( 79 | fill: .blue, 80 | stroke: ( 81 | color: .red, 82 | width: 1 83 | ), 84 | rounding: .all(10), 85 | traitCollection: .lightInterfaceStyle 86 | )! 87 | verifyImage(image) 88 | } 89 | 90 | func testRoundedThickStrokedImage() { 91 | let image = UIImage( 92 | fill: .blue, 93 | stroke: ( 94 | color: .red, 95 | width: 4 96 | ), 97 | rounding: .all(10), 98 | traitCollection: .lightInterfaceStyle 99 | )! 100 | verifyImage(image) 101 | } 102 | 103 | func testConditionallyRoundedStrokedImage() { 104 | let image = UIImage( 105 | fill: .blue, 106 | stroke: ( 107 | color: .red, 108 | width: 1 109 | ), 110 | rounding: .some( 111 | corners: [.bottomLeft, .topRight, .bottomRight], 112 | radii: 10 113 | ), 114 | traitCollection: .lightInterfaceStyle 115 | )! 116 | verifyImage(image) 117 | } 118 | 119 | func testGradientImage() { 120 | let image = UIImage.gradientImage( 121 | colors: [.blue, .red], 122 | insets: .zero, 123 | stops: ( 124 | start: CGPoint(x: 0, y: 0), 125 | end: CGPoint(x: 1, y: 1) 126 | ), 127 | traitCollection: .lightInterfaceStyle 128 | )! 129 | verifyImage(image) 130 | } 131 | 132 | func testRoundedGradientImage() { 133 | let image = UIImage.gradientImage( 134 | colors: [.blue, .red], 135 | rounding: .all(10), 136 | insets: .zero, 137 | traitCollection: .lightInterfaceStyle 138 | )! 139 | verifyImage(image) 140 | } 141 | 142 | func testConditionallyRoundedGradientImage() { 143 | let image = UIImage.gradientImage( 144 | colors: [.blue, .red], 145 | rounding: .some( 146 | corners: [.bottomLeft, .topRight, .bottomRight], 147 | radii: 10 148 | ), 149 | insets: .zero, 150 | traitCollection: .lightInterfaceStyle 151 | )! 152 | verifyImage(image) 153 | } 154 | 155 | func testSingleConditionalStrokeOnFlatEdge() { 156 | let image = UIImage( 157 | fill: .blue, 158 | stroke: ( 159 | color: .red, 160 | width: 2 161 | ), 162 | strokeEdges: [.top, .left, .right], 163 | rounding: .some( 164 | corners: [.topLeft, .topRight], 165 | radii: 10 166 | ), 167 | traitCollection: .lightInterfaceStyle 168 | )! 169 | verifyImage(image) 170 | } 171 | 172 | func testMultipleConditionalStrokesNoRounding() { 173 | let image = UIImage( 174 | fill: .blue, 175 | stroke: ( 176 | color: .red, 177 | width: 2 178 | ), 179 | strokeEdges: [.left, .right], 180 | rounding: .none, 181 | traitCollection: .lightInterfaceStyle 182 | )! 183 | verifyImage(image) 184 | } 185 | 186 | func testMultipleConditionalStrokesOnFlatEdge() { 187 | let image = UIImage( 188 | fill: .blue, 189 | stroke: ( 190 | color: .red, 191 | width: 4 192 | ), 193 | strokeEdges: [.left, .right, .bottom], 194 | rounding: .some(corners: [.bottomLeft], radii: 10), 195 | traitCollection: .lightInterfaceStyle 196 | )! 197 | verifyImage(image) 198 | } 199 | 200 | func testConditionalStrokesOnRoundEdge() { 201 | let image = UIImage( 202 | fill: .blue, 203 | stroke: ( 204 | color: .red, 205 | width: 4 206 | ), 207 | strokeEdges: [.top, .left, .right], 208 | rounding: .all(10), 209 | traitCollection: .lightInterfaceStyle 210 | )! 211 | verifyImage(image) 212 | } 213 | 214 | func verifyImage(_ image: UIImage, testName: String = #function, file: StaticString = #file, line: UInt = #line) { 215 | assertSnapshot( 216 | matching: UIImageView(image: image), 217 | as: .image(size: image.size), 218 | file: file, 219 | testName: testName, 220 | line: line 221 | ) 222 | } 223 | } 224 | -------------------------------------------------------------------------------- /Tests/RoundrectTests/SampleSheet.swift: -------------------------------------------------------------------------------- 1 | // 2 | // SampleSheet.swift 3 | // RoundrectTests 4 | // 5 | // Created by Gabriel O'Flaherty-Chan on 2019-01-12. 6 | // Copyright © 2019 gabrieloc. All rights reserved. 7 | // 8 | 9 | import UIKit 10 | @testable import Roundrect 11 | 12 | class SampleSheet: UIView { 13 | let innerMargin: CGFloat = 8 14 | let gutter: CGFloat = 4 15 | let styles = UIButton.Style.allValues(cornerRadius: 10) 16 | let states = ButtonStyleTests.State.allCases 17 | let sheetInset = UIEdgeInsets(equalInsets: 32) 18 | let sectionMargin = (x: CGFloat(16), y: CGFloat(16)) 19 | let sectionInset: CGFloat = 32 20 | 21 | @available(iOS, obsoleted: 13) 22 | init(frame: CGRect, themes: [UIButton.Theme]) { 23 | super.init(frame: frame) 24 | 25 | styles.forEach { style in 26 | let section = styles.firstIndex(of: style)! 27 | let rect = sectionRect(in: frame.inset(by: sheetInset), section: section) 28 | 29 | let header = UILabel( 30 | frame: CGRect( 31 | origin: rect.origin, 32 | size: CGSize( 33 | width: rect.width, 34 | height: 64 35 | ) 36 | ) 37 | ) 38 | header.font = UIFont.systemFont(ofSize: 30, weight: .heavy) 39 | header.text = style.title 40 | addSubview(header) 41 | 42 | header.textColor = .black 43 | backgroundColor = .white 44 | themes.forEach { theme in 45 | drawColumn( 46 | rect: rect, 47 | i: themes.firstIndex(of: theme)!, 48 | of: themes.count, 49 | name: theme.rawValue, 50 | textColor: theme.foregroundColor.withAlphaComponent(0.5), 51 | backgroundColor: theme.inverse.foregroundColor, 52 | style: style, 53 | headerFrame: header.frame, 54 | createButton: { 55 | UIButton(style: style, theme: theme) 56 | } 57 | ) 58 | } 59 | } 60 | } 61 | 62 | @available (iOS 13.0, *) 63 | init(frame: CGRect, a: Bool = true) { 64 | super.init(frame: frame) 65 | 66 | styles.forEach { style in 67 | let section = styles.firstIndex(of: style)! 68 | let rect = sectionRect(in: frame.inset(by: sheetInset), section: section) 69 | 70 | let header = UILabel( 71 | frame: CGRect( 72 | origin: rect.origin, 73 | size: CGSize( 74 | width: rect.width, 75 | height: 40 76 | ) 77 | ) 78 | ) 79 | header.font = UIFont.systemFont(ofSize: 30, weight: .heavy) 80 | header.text = style.title 81 | addSubview(header) 82 | 83 | backgroundColor = .systemBackground 84 | drawColumn( 85 | rect: rect, 86 | i: 0, 87 | of: 1, 88 | name: nil, 89 | textColor: .label, 90 | backgroundColor: .systemBackground, 91 | style: style, 92 | headerFrame: header.frame) { 93 | UIButton(style: style) 94 | } 95 | } 96 | } 97 | 98 | func sectionRect(in sheetFrame: CGRect, section: Int) -> CGRect { 99 | let (row, col) = ( 100 | CGFloat(floor(CGFloat(section) / 2)), 101 | CGFloat(section % 2) 102 | ) 103 | return CGRect( 104 | origin: CGPoint( 105 | x: sheetFrame.minX + (sheetFrame.width / 2 + sectionMargin.x) * col, 106 | y: sheetFrame.minY + (sheetFrame.height / 2 + sectionMargin.y) * row 107 | ), 108 | size: CGSize( 109 | width: (sheetFrame.width - sectionMargin.x) / 2, 110 | height: (sheetFrame.height - sectionMargin.y) / 2 111 | ) 112 | ) 113 | } 114 | 115 | func drawColumn(rect: CGRect, i: Int, of: Int, name: String?, textColor: UIColor, backgroundColor: UIColor?, style: UIButton.Style, headerFrame: CGRect, createButton: (() -> UIButton)) { 116 | let columnWidth = rect.width / CGFloat(of) 117 | let ti = CGFloat(i) 118 | let columnFrame = CGRect( 119 | origin: CGPoint( 120 | x: rect.minX + columnWidth * ti, 121 | y: headerFrame.maxY 122 | ), 123 | size: CGSize( 124 | width: columnWidth - (gutter + (CGFloat(of) - 1) * ti), 125 | height: rect.height - headerFrame.height 126 | ) 127 | ) 128 | let background = UIView(frame: columnFrame) 129 | background.backgroundColor = backgroundColor 130 | background.layer.cornerRadius = 4 131 | addSubview(background) 132 | 133 | let columnLabel = UILabel( 134 | frame: CGRect( 135 | origin: CGPoint( 136 | x: columnFrame.minX, 137 | y: columnFrame.minY + 4 138 | ), 139 | size: CGSize( 140 | width: columnFrame.width, 141 | height: 16 142 | ) 143 | ) 144 | ) 145 | columnLabel.text = name?.uppercased() 146 | columnLabel.font = UIFont.systemFont(ofSize: 12) 147 | columnLabel.textAlignment = .center 148 | addSubview(columnLabel) 149 | columnLabel.textColor = textColor 150 | states.enumerated().forEach { 151 | drawButton( 152 | createButton(), 153 | in: columnFrame, 154 | i: $0.offset, 155 | of: states.count, 156 | state: $0.element, 157 | style: style, 158 | sectionInset: name != nil ? sectionInset : 16 159 | ) 160 | } 161 | } 162 | 163 | 164 | func drawButton(_ button: UIButton, in themeFrame: CGRect, i: Int, of: Int, state: ButtonStyleTests.State, style: UIButton.Style, sectionInset: CGFloat) { 165 | let stateHeight = (themeFrame.height - sectionInset) / CGFloat(of) 166 | let buttonFrame = CGRect( 167 | origin: CGPoint( 168 | x: themeFrame.minX, 169 | y: sectionInset + themeFrame.minY + stateHeight * CGFloat(i) 170 | ), 171 | size: CGSize( 172 | width: themeFrame.width, 173 | height: stateHeight 174 | ) 175 | ).inset(by: UIEdgeInsets(equalInsets: gutter)) 176 | button.setTitle(state.rawValue.capitalized, for: .normal) 177 | button.isEnabled = state != .disabled 178 | button.isHighlighted = state == .highlighted 179 | button.frame = buttonFrame 180 | addSubview(button) 181 | } 182 | 183 | required init?(coder aDecoder: NSCoder) { 184 | fatalError("init(coder:) has not been implemented") 185 | } 186 | } 187 | -------------------------------------------------------------------------------- /Tests/RoundrectTests/SampleSheetTests.swift: -------------------------------------------------------------------------------- 1 | // 2 | // SampleSheetTests.swift 3 | // RoundrectTests 4 | // 5 | // Created by Gabriel O'Flaherty-Chan on 2019-01-12. 6 | // Copyright © 2019 gabrieloc. All rights reserved. 7 | // 8 | 9 | import SnapshotTesting 10 | import XCTest 11 | 12 | class SampleSheetTests: XCTestCase { 13 | @available(iOS 13.0, *) 14 | func testGenerateSampleSheetLightDark() { 15 | let canvas = CGRect( 16 | origin: .zero, 17 | size: CGSize( 18 | width: 400, 19 | height: 400 20 | ) 21 | ) 22 | let sampleSheet = SampleSheet(frame: canvas) 23 | sampleSheet.overrideUserInterfaceStyle = .light 24 | assertSnapshot( 25 | matching: sampleSheet, 26 | as: .image, 27 | testName: #function + "-light" 28 | ) 29 | 30 | sampleSheet.overrideUserInterfaceStyle = .dark 31 | assertSnapshot( 32 | matching: sampleSheet, 33 | as: .image, 34 | testName: #function + "-dark" 35 | ) 36 | } 37 | 38 | @available(iOS 13.0, *) 39 | func testGenerateSampleSheet() { 40 | let canvas = CGRect( 41 | origin: .zero, 42 | size: CGSize( 43 | width: 1024, 44 | height: 512 45 | ) 46 | ) 47 | let themes = UIButton.Theme.allCases 48 | let sampleSheet = SampleSheet(frame: canvas, themes: themes) 49 | sampleSheet.overrideUserInterfaceStyle = .light 50 | assertSnapshot( 51 | matching: sampleSheet, 52 | as: .image 53 | ) 54 | } 55 | } 56 | -------------------------------------------------------------------------------- /Tests/RoundrectTests/SnapshotUtility.swift: -------------------------------------------------------------------------------- 1 | // 2 | // SnapshotUtility.swift 3 | // RoundrectTests 4 | // 5 | // Created by Gabriel O'Flaherty-Chan on 2021-11-03. 6 | // 7 | 8 | import SnapshotTesting 9 | import UIKit 10 | 11 | extension Snapshotting where Value == UIView, Format == UIImage { 12 | static var image: Self { 13 | .image( 14 | precision: .fuzzyPrecision 15 | ) 16 | } 17 | 18 | static func image(size: CGSize) -> Self { 19 | .image( 20 | precision: .fuzzyPrecision, 21 | size: size 22 | ) 23 | } 24 | } 25 | 26 | extension Float { 27 | static var fuzzyPrecision: Self { 0.98 } 28 | } 29 | -------------------------------------------------------------------------------- /Tests/RoundrectTests/TestUtility.swift: -------------------------------------------------------------------------------- 1 | // 2 | // TestUtility.swift 3 | // 4 | // 5 | // Created by Gabriel O'Flaherty-Chan on 2021-05-03. 6 | // 7 | 8 | import SnapshotTesting 9 | import UIKit 10 | 11 | @available(iOS 12.0, *) 12 | extension Snapshotting where Value == UIImage, Format == UIImage { 13 | static func image(style: UIUserInterfaceStyle) -> Self { 14 | Snapshotting.image.pullback { 15 | let view = UIImageView(image: $0) 16 | if #available(iOS 13.0, *) { 17 | view.overrideUserInterfaceStyle = style 18 | } 19 | return view 20 | } 21 | } 22 | } 23 | 24 | extension UIColor { 25 | static let adaptive1 = UIColor( 26 | named: "bluered", 27 | in: Bundle.module, 28 | compatibleWith: nil 29 | )! 30 | 31 | static let adaptive2 = UIColor( 32 | named: "cyanmagenta", 33 | in: Bundle.module, 34 | compatibleWith: nil 35 | )! 36 | } 37 | 38 | @available(iOS 13.0, *) 39 | extension UITraitCollection { 40 | static let lightInterfaceStyle = UITraitCollection.current.withUserInterfaceStyle(.light) 41 | static let darkInterfaceStyle = UITraitCollection.current.withUserInterfaceStyle(.dark) 42 | } 43 | -------------------------------------------------------------------------------- /Tests/RoundrectTests/__Snapshots__/AdaptiveColorTests/testGradientFillDark.1.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/gabrieloc/roundrect/43c967fde94290bc371f46a0ba8e24a40d2eda5d/Tests/RoundrectTests/__Snapshots__/AdaptiveColorTests/testGradientFillDark.1.png -------------------------------------------------------------------------------- /Tests/RoundrectTests/__Snapshots__/AdaptiveColorTests/testGradientFillLight.1.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/gabrieloc/roundrect/43c967fde94290bc371f46a0ba8e24a40d2eda5d/Tests/RoundrectTests/__Snapshots__/AdaptiveColorTests/testGradientFillLight.1.png -------------------------------------------------------------------------------- /Tests/RoundrectTests/__Snapshots__/AdaptiveColorTests/testSingleFillLight.1.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/gabrieloc/roundrect/43c967fde94290bc371f46a0ba8e24a40d2eda5d/Tests/RoundrectTests/__Snapshots__/AdaptiveColorTests/testSingleFillLight.1.png -------------------------------------------------------------------------------- /Tests/RoundrectTests/__Snapshots__/AdaptiveColorTests/testSingleFillLightDark.1.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/gabrieloc/roundrect/43c967fde94290bc371f46a0ba8e24a40d2eda5d/Tests/RoundrectTests/__Snapshots__/AdaptiveColorTests/testSingleFillLightDark.1.png -------------------------------------------------------------------------------- /Tests/RoundrectTests/__Snapshots__/ButtonStyleTests/verifyStyle-button-identifier-file-line.bordered-all-10-0-1-0-big-dark-disabled.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/gabrieloc/roundrect/43c967fde94290bc371f46a0ba8e24a40d2eda5d/Tests/RoundrectTests/__Snapshots__/ButtonStyleTests/verifyStyle-button-identifier-file-line.bordered-all-10-0-1-0-big-dark-disabled.png -------------------------------------------------------------------------------- /Tests/RoundrectTests/__Snapshots__/ButtonStyleTests/verifyStyle-button-identifier-file-line.bordered-all-10-0-1-0-big-dark-highlighted.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/gabrieloc/roundrect/43c967fde94290bc371f46a0ba8e24a40d2eda5d/Tests/RoundrectTests/__Snapshots__/ButtonStyleTests/verifyStyle-button-identifier-file-line.bordered-all-10-0-1-0-big-dark-highlighted.png -------------------------------------------------------------------------------- /Tests/RoundrectTests/__Snapshots__/ButtonStyleTests/verifyStyle-button-identifier-file-line.bordered-all-10-0-1-0-big-dark-normal.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/gabrieloc/roundrect/43c967fde94290bc371f46a0ba8e24a40d2eda5d/Tests/RoundrectTests/__Snapshots__/ButtonStyleTests/verifyStyle-button-identifier-file-line.bordered-all-10-0-1-0-big-dark-normal.png -------------------------------------------------------------------------------- /Tests/RoundrectTests/__Snapshots__/ButtonStyleTests/verifyStyle-button-identifier-file-line.bordered-all-10-0-1-0-big-disabled-dark.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/gabrieloc/roundrect/43c967fde94290bc371f46a0ba8e24a40d2eda5d/Tests/RoundrectTests/__Snapshots__/ButtonStyleTests/verifyStyle-button-identifier-file-line.bordered-all-10-0-1-0-big-disabled-dark.png -------------------------------------------------------------------------------- /Tests/RoundrectTests/__Snapshots__/ButtonStyleTests/verifyStyle-button-identifier-file-line.bordered-all-10-0-1-0-big-disabled-light.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/gabrieloc/roundrect/43c967fde94290bc371f46a0ba8e24a40d2eda5d/Tests/RoundrectTests/__Snapshots__/ButtonStyleTests/verifyStyle-button-identifier-file-line.bordered-all-10-0-1-0-big-disabled-light.png -------------------------------------------------------------------------------- /Tests/RoundrectTests/__Snapshots__/ButtonStyleTests/verifyStyle-button-identifier-file-line.bordered-all-10-0-1-0-big-extraLight-disabled.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/gabrieloc/roundrect/43c967fde94290bc371f46a0ba8e24a40d2eda5d/Tests/RoundrectTests/__Snapshots__/ButtonStyleTests/verifyStyle-button-identifier-file-line.bordered-all-10-0-1-0-big-extraLight-disabled.png -------------------------------------------------------------------------------- /Tests/RoundrectTests/__Snapshots__/ButtonStyleTests/verifyStyle-button-identifier-file-line.bordered-all-10-0-1-0-big-extraLight-highlighted.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/gabrieloc/roundrect/43c967fde94290bc371f46a0ba8e24a40d2eda5d/Tests/RoundrectTests/__Snapshots__/ButtonStyleTests/verifyStyle-button-identifier-file-line.bordered-all-10-0-1-0-big-extraLight-highlighted.png -------------------------------------------------------------------------------- /Tests/RoundrectTests/__Snapshots__/ButtonStyleTests/verifyStyle-button-identifier-file-line.bordered-all-10-0-1-0-big-extraLight-normal.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/gabrieloc/roundrect/43c967fde94290bc371f46a0ba8e24a40d2eda5d/Tests/RoundrectTests/__Snapshots__/ButtonStyleTests/verifyStyle-button-identifier-file-line.bordered-all-10-0-1-0-big-extraLight-normal.png -------------------------------------------------------------------------------- /Tests/RoundrectTests/__Snapshots__/ButtonStyleTests/verifyStyle-button-identifier-file-line.bordered-all-10-0-1-0-big-highlighted-dark.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/gabrieloc/roundrect/43c967fde94290bc371f46a0ba8e24a40d2eda5d/Tests/RoundrectTests/__Snapshots__/ButtonStyleTests/verifyStyle-button-identifier-file-line.bordered-all-10-0-1-0-big-highlighted-dark.png -------------------------------------------------------------------------------- /Tests/RoundrectTests/__Snapshots__/ButtonStyleTests/verifyStyle-button-identifier-file-line.bordered-all-10-0-1-0-big-highlighted-light.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/gabrieloc/roundrect/43c967fde94290bc371f46a0ba8e24a40d2eda5d/Tests/RoundrectTests/__Snapshots__/ButtonStyleTests/verifyStyle-button-identifier-file-line.bordered-all-10-0-1-0-big-highlighted-light.png -------------------------------------------------------------------------------- /Tests/RoundrectTests/__Snapshots__/ButtonStyleTests/verifyStyle-button-identifier-file-line.bordered-all-10-0-1-0-big-light-disabled.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/gabrieloc/roundrect/43c967fde94290bc371f46a0ba8e24a40d2eda5d/Tests/RoundrectTests/__Snapshots__/ButtonStyleTests/verifyStyle-button-identifier-file-line.bordered-all-10-0-1-0-big-light-disabled.png -------------------------------------------------------------------------------- /Tests/RoundrectTests/__Snapshots__/ButtonStyleTests/verifyStyle-button-identifier-file-line.bordered-all-10-0-1-0-big-light-highlighted.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/gabrieloc/roundrect/43c967fde94290bc371f46a0ba8e24a40d2eda5d/Tests/RoundrectTests/__Snapshots__/ButtonStyleTests/verifyStyle-button-identifier-file-line.bordered-all-10-0-1-0-big-light-highlighted.png -------------------------------------------------------------------------------- /Tests/RoundrectTests/__Snapshots__/ButtonStyleTests/verifyStyle-button-identifier-file-line.bordered-all-10-0-1-0-big-light-normal.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/gabrieloc/roundrect/43c967fde94290bc371f46a0ba8e24a40d2eda5d/Tests/RoundrectTests/__Snapshots__/ButtonStyleTests/verifyStyle-button-identifier-file-line.bordered-all-10-0-1-0-big-light-normal.png -------------------------------------------------------------------------------- /Tests/RoundrectTests/__Snapshots__/ButtonStyleTests/verifyStyle-button-identifier-file-line.bordered-all-10-0-1-0-big-normal-dark.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/gabrieloc/roundrect/43c967fde94290bc371f46a0ba8e24a40d2eda5d/Tests/RoundrectTests/__Snapshots__/ButtonStyleTests/verifyStyle-button-identifier-file-line.bordered-all-10-0-1-0-big-normal-dark.png -------------------------------------------------------------------------------- /Tests/RoundrectTests/__Snapshots__/ButtonStyleTests/verifyStyle-button-identifier-file-line.bordered-all-10-0-1-0-big-normal-light.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/gabrieloc/roundrect/43c967fde94290bc371f46a0ba8e24a40d2eda5d/Tests/RoundrectTests/__Snapshots__/ButtonStyleTests/verifyStyle-button-identifier-file-line.bordered-all-10-0-1-0-big-normal-light.png -------------------------------------------------------------------------------- /Tests/RoundrectTests/__Snapshots__/ButtonStyleTests/verifyStyle-button-identifier-file-line.bordered-all-10-0-1-0-small-dark-disabled.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/gabrieloc/roundrect/43c967fde94290bc371f46a0ba8e24a40d2eda5d/Tests/RoundrectTests/__Snapshots__/ButtonStyleTests/verifyStyle-button-identifier-file-line.bordered-all-10-0-1-0-small-dark-disabled.png -------------------------------------------------------------------------------- /Tests/RoundrectTests/__Snapshots__/ButtonStyleTests/verifyStyle-button-identifier-file-line.bordered-all-10-0-1-0-small-dark-highlighted.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/gabrieloc/roundrect/43c967fde94290bc371f46a0ba8e24a40d2eda5d/Tests/RoundrectTests/__Snapshots__/ButtonStyleTests/verifyStyle-button-identifier-file-line.bordered-all-10-0-1-0-small-dark-highlighted.png -------------------------------------------------------------------------------- /Tests/RoundrectTests/__Snapshots__/ButtonStyleTests/verifyStyle-button-identifier-file-line.bordered-all-10-0-1-0-small-dark-normal.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/gabrieloc/roundrect/43c967fde94290bc371f46a0ba8e24a40d2eda5d/Tests/RoundrectTests/__Snapshots__/ButtonStyleTests/verifyStyle-button-identifier-file-line.bordered-all-10-0-1-0-small-dark-normal.png -------------------------------------------------------------------------------- /Tests/RoundrectTests/__Snapshots__/ButtonStyleTests/verifyStyle-button-identifier-file-line.bordered-all-10-0-1-0-small-disabled-dark.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/gabrieloc/roundrect/43c967fde94290bc371f46a0ba8e24a40d2eda5d/Tests/RoundrectTests/__Snapshots__/ButtonStyleTests/verifyStyle-button-identifier-file-line.bordered-all-10-0-1-0-small-disabled-dark.png -------------------------------------------------------------------------------- /Tests/RoundrectTests/__Snapshots__/ButtonStyleTests/verifyStyle-button-identifier-file-line.bordered-all-10-0-1-0-small-disabled-light.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/gabrieloc/roundrect/43c967fde94290bc371f46a0ba8e24a40d2eda5d/Tests/RoundrectTests/__Snapshots__/ButtonStyleTests/verifyStyle-button-identifier-file-line.bordered-all-10-0-1-0-small-disabled-light.png -------------------------------------------------------------------------------- /Tests/RoundrectTests/__Snapshots__/ButtonStyleTests/verifyStyle-button-identifier-file-line.bordered-all-10-0-1-0-small-extraLight-disabled.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/gabrieloc/roundrect/43c967fde94290bc371f46a0ba8e24a40d2eda5d/Tests/RoundrectTests/__Snapshots__/ButtonStyleTests/verifyStyle-button-identifier-file-line.bordered-all-10-0-1-0-small-extraLight-disabled.png -------------------------------------------------------------------------------- /Tests/RoundrectTests/__Snapshots__/ButtonStyleTests/verifyStyle-button-identifier-file-line.bordered-all-10-0-1-0-small-extraLight-highlighted.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/gabrieloc/roundrect/43c967fde94290bc371f46a0ba8e24a40d2eda5d/Tests/RoundrectTests/__Snapshots__/ButtonStyleTests/verifyStyle-button-identifier-file-line.bordered-all-10-0-1-0-small-extraLight-highlighted.png -------------------------------------------------------------------------------- /Tests/RoundrectTests/__Snapshots__/ButtonStyleTests/verifyStyle-button-identifier-file-line.bordered-all-10-0-1-0-small-extraLight-normal.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/gabrieloc/roundrect/43c967fde94290bc371f46a0ba8e24a40d2eda5d/Tests/RoundrectTests/__Snapshots__/ButtonStyleTests/verifyStyle-button-identifier-file-line.bordered-all-10-0-1-0-small-extraLight-normal.png -------------------------------------------------------------------------------- /Tests/RoundrectTests/__Snapshots__/ButtonStyleTests/verifyStyle-button-identifier-file-line.bordered-all-10-0-1-0-small-highlighted-dark.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/gabrieloc/roundrect/43c967fde94290bc371f46a0ba8e24a40d2eda5d/Tests/RoundrectTests/__Snapshots__/ButtonStyleTests/verifyStyle-button-identifier-file-line.bordered-all-10-0-1-0-small-highlighted-dark.png -------------------------------------------------------------------------------- /Tests/RoundrectTests/__Snapshots__/ButtonStyleTests/verifyStyle-button-identifier-file-line.bordered-all-10-0-1-0-small-highlighted-light.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/gabrieloc/roundrect/43c967fde94290bc371f46a0ba8e24a40d2eda5d/Tests/RoundrectTests/__Snapshots__/ButtonStyleTests/verifyStyle-button-identifier-file-line.bordered-all-10-0-1-0-small-highlighted-light.png -------------------------------------------------------------------------------- /Tests/RoundrectTests/__Snapshots__/ButtonStyleTests/verifyStyle-button-identifier-file-line.bordered-all-10-0-1-0-small-light-disabled.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/gabrieloc/roundrect/43c967fde94290bc371f46a0ba8e24a40d2eda5d/Tests/RoundrectTests/__Snapshots__/ButtonStyleTests/verifyStyle-button-identifier-file-line.bordered-all-10-0-1-0-small-light-disabled.png -------------------------------------------------------------------------------- /Tests/RoundrectTests/__Snapshots__/ButtonStyleTests/verifyStyle-button-identifier-file-line.bordered-all-10-0-1-0-small-light-highlighted.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/gabrieloc/roundrect/43c967fde94290bc371f46a0ba8e24a40d2eda5d/Tests/RoundrectTests/__Snapshots__/ButtonStyleTests/verifyStyle-button-identifier-file-line.bordered-all-10-0-1-0-small-light-highlighted.png -------------------------------------------------------------------------------- /Tests/RoundrectTests/__Snapshots__/ButtonStyleTests/verifyStyle-button-identifier-file-line.bordered-all-10-0-1-0-small-light-normal.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/gabrieloc/roundrect/43c967fde94290bc371f46a0ba8e24a40d2eda5d/Tests/RoundrectTests/__Snapshots__/ButtonStyleTests/verifyStyle-button-identifier-file-line.bordered-all-10-0-1-0-small-light-normal.png -------------------------------------------------------------------------------- /Tests/RoundrectTests/__Snapshots__/ButtonStyleTests/verifyStyle-button-identifier-file-line.bordered-all-10-0-1-0-small-normal-dark.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/gabrieloc/roundrect/43c967fde94290bc371f46a0ba8e24a40d2eda5d/Tests/RoundrectTests/__Snapshots__/ButtonStyleTests/verifyStyle-button-identifier-file-line.bordered-all-10-0-1-0-small-normal-dark.png -------------------------------------------------------------------------------- /Tests/RoundrectTests/__Snapshots__/ButtonStyleTests/verifyStyle-button-identifier-file-line.bordered-all-10-0-1-0-small-normal-light.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/gabrieloc/roundrect/43c967fde94290bc371f46a0ba8e24a40d2eda5d/Tests/RoundrectTests/__Snapshots__/ButtonStyleTests/verifyStyle-button-identifier-file-line.bordered-all-10-0-1-0-small-normal-light.png -------------------------------------------------------------------------------- /Tests/RoundrectTests/__Snapshots__/ButtonStyleTests/verifyStyle-button-identifier-file-line.filled-all-10-0-1-0-big-dark-disabled.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/gabrieloc/roundrect/43c967fde94290bc371f46a0ba8e24a40d2eda5d/Tests/RoundrectTests/__Snapshots__/ButtonStyleTests/verifyStyle-button-identifier-file-line.filled-all-10-0-1-0-big-dark-disabled.png -------------------------------------------------------------------------------- /Tests/RoundrectTests/__Snapshots__/ButtonStyleTests/verifyStyle-button-identifier-file-line.filled-all-10-0-1-0-big-dark-highlighted.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/gabrieloc/roundrect/43c967fde94290bc371f46a0ba8e24a40d2eda5d/Tests/RoundrectTests/__Snapshots__/ButtonStyleTests/verifyStyle-button-identifier-file-line.filled-all-10-0-1-0-big-dark-highlighted.png -------------------------------------------------------------------------------- /Tests/RoundrectTests/__Snapshots__/ButtonStyleTests/verifyStyle-button-identifier-file-line.filled-all-10-0-1-0-big-dark-normal.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/gabrieloc/roundrect/43c967fde94290bc371f46a0ba8e24a40d2eda5d/Tests/RoundrectTests/__Snapshots__/ButtonStyleTests/verifyStyle-button-identifier-file-line.filled-all-10-0-1-0-big-dark-normal.png -------------------------------------------------------------------------------- /Tests/RoundrectTests/__Snapshots__/ButtonStyleTests/verifyStyle-button-identifier-file-line.filled-all-10-0-1-0-big-disabled-dark.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/gabrieloc/roundrect/43c967fde94290bc371f46a0ba8e24a40d2eda5d/Tests/RoundrectTests/__Snapshots__/ButtonStyleTests/verifyStyle-button-identifier-file-line.filled-all-10-0-1-0-big-disabled-dark.png -------------------------------------------------------------------------------- /Tests/RoundrectTests/__Snapshots__/ButtonStyleTests/verifyStyle-button-identifier-file-line.filled-all-10-0-1-0-big-disabled-light.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/gabrieloc/roundrect/43c967fde94290bc371f46a0ba8e24a40d2eda5d/Tests/RoundrectTests/__Snapshots__/ButtonStyleTests/verifyStyle-button-identifier-file-line.filled-all-10-0-1-0-big-disabled-light.png -------------------------------------------------------------------------------- /Tests/RoundrectTests/__Snapshots__/ButtonStyleTests/verifyStyle-button-identifier-file-line.filled-all-10-0-1-0-big-extraLight-disabled.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/gabrieloc/roundrect/43c967fde94290bc371f46a0ba8e24a40d2eda5d/Tests/RoundrectTests/__Snapshots__/ButtonStyleTests/verifyStyle-button-identifier-file-line.filled-all-10-0-1-0-big-extraLight-disabled.png -------------------------------------------------------------------------------- /Tests/RoundrectTests/__Snapshots__/ButtonStyleTests/verifyStyle-button-identifier-file-line.filled-all-10-0-1-0-big-extraLight-highlighted.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/gabrieloc/roundrect/43c967fde94290bc371f46a0ba8e24a40d2eda5d/Tests/RoundrectTests/__Snapshots__/ButtonStyleTests/verifyStyle-button-identifier-file-line.filled-all-10-0-1-0-big-extraLight-highlighted.png -------------------------------------------------------------------------------- /Tests/RoundrectTests/__Snapshots__/ButtonStyleTests/verifyStyle-button-identifier-file-line.filled-all-10-0-1-0-big-extraLight-normal.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/gabrieloc/roundrect/43c967fde94290bc371f46a0ba8e24a40d2eda5d/Tests/RoundrectTests/__Snapshots__/ButtonStyleTests/verifyStyle-button-identifier-file-line.filled-all-10-0-1-0-big-extraLight-normal.png -------------------------------------------------------------------------------- /Tests/RoundrectTests/__Snapshots__/ButtonStyleTests/verifyStyle-button-identifier-file-line.filled-all-10-0-1-0-big-highlighted-dark.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/gabrieloc/roundrect/43c967fde94290bc371f46a0ba8e24a40d2eda5d/Tests/RoundrectTests/__Snapshots__/ButtonStyleTests/verifyStyle-button-identifier-file-line.filled-all-10-0-1-0-big-highlighted-dark.png -------------------------------------------------------------------------------- /Tests/RoundrectTests/__Snapshots__/ButtonStyleTests/verifyStyle-button-identifier-file-line.filled-all-10-0-1-0-big-highlighted-light.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/gabrieloc/roundrect/43c967fde94290bc371f46a0ba8e24a40d2eda5d/Tests/RoundrectTests/__Snapshots__/ButtonStyleTests/verifyStyle-button-identifier-file-line.filled-all-10-0-1-0-big-highlighted-light.png -------------------------------------------------------------------------------- /Tests/RoundrectTests/__Snapshots__/ButtonStyleTests/verifyStyle-button-identifier-file-line.filled-all-10-0-1-0-big-light-disabled.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/gabrieloc/roundrect/43c967fde94290bc371f46a0ba8e24a40d2eda5d/Tests/RoundrectTests/__Snapshots__/ButtonStyleTests/verifyStyle-button-identifier-file-line.filled-all-10-0-1-0-big-light-disabled.png -------------------------------------------------------------------------------- /Tests/RoundrectTests/__Snapshots__/ButtonStyleTests/verifyStyle-button-identifier-file-line.filled-all-10-0-1-0-big-light-highlighted.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/gabrieloc/roundrect/43c967fde94290bc371f46a0ba8e24a40d2eda5d/Tests/RoundrectTests/__Snapshots__/ButtonStyleTests/verifyStyle-button-identifier-file-line.filled-all-10-0-1-0-big-light-highlighted.png -------------------------------------------------------------------------------- /Tests/RoundrectTests/__Snapshots__/ButtonStyleTests/verifyStyle-button-identifier-file-line.filled-all-10-0-1-0-big-light-normal.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/gabrieloc/roundrect/43c967fde94290bc371f46a0ba8e24a40d2eda5d/Tests/RoundrectTests/__Snapshots__/ButtonStyleTests/verifyStyle-button-identifier-file-line.filled-all-10-0-1-0-big-light-normal.png -------------------------------------------------------------------------------- /Tests/RoundrectTests/__Snapshots__/ButtonStyleTests/verifyStyle-button-identifier-file-line.filled-all-10-0-1-0-big-normal-dark.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/gabrieloc/roundrect/43c967fde94290bc371f46a0ba8e24a40d2eda5d/Tests/RoundrectTests/__Snapshots__/ButtonStyleTests/verifyStyle-button-identifier-file-line.filled-all-10-0-1-0-big-normal-dark.png -------------------------------------------------------------------------------- /Tests/RoundrectTests/__Snapshots__/ButtonStyleTests/verifyStyle-button-identifier-file-line.filled-all-10-0-1-0-big-normal-light.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/gabrieloc/roundrect/43c967fde94290bc371f46a0ba8e24a40d2eda5d/Tests/RoundrectTests/__Snapshots__/ButtonStyleTests/verifyStyle-button-identifier-file-line.filled-all-10-0-1-0-big-normal-light.png -------------------------------------------------------------------------------- /Tests/RoundrectTests/__Snapshots__/ButtonStyleTests/verifyStyle-button-identifier-file-line.filled-all-10-0-1-0-small-dark-disabled.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/gabrieloc/roundrect/43c967fde94290bc371f46a0ba8e24a40d2eda5d/Tests/RoundrectTests/__Snapshots__/ButtonStyleTests/verifyStyle-button-identifier-file-line.filled-all-10-0-1-0-small-dark-disabled.png -------------------------------------------------------------------------------- /Tests/RoundrectTests/__Snapshots__/ButtonStyleTests/verifyStyle-button-identifier-file-line.filled-all-10-0-1-0-small-dark-highlighted.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/gabrieloc/roundrect/43c967fde94290bc371f46a0ba8e24a40d2eda5d/Tests/RoundrectTests/__Snapshots__/ButtonStyleTests/verifyStyle-button-identifier-file-line.filled-all-10-0-1-0-small-dark-highlighted.png -------------------------------------------------------------------------------- /Tests/RoundrectTests/__Snapshots__/ButtonStyleTests/verifyStyle-button-identifier-file-line.filled-all-10-0-1-0-small-dark-normal.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/gabrieloc/roundrect/43c967fde94290bc371f46a0ba8e24a40d2eda5d/Tests/RoundrectTests/__Snapshots__/ButtonStyleTests/verifyStyle-button-identifier-file-line.filled-all-10-0-1-0-small-dark-normal.png -------------------------------------------------------------------------------- /Tests/RoundrectTests/__Snapshots__/ButtonStyleTests/verifyStyle-button-identifier-file-line.filled-all-10-0-1-0-small-disabled-dark.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/gabrieloc/roundrect/43c967fde94290bc371f46a0ba8e24a40d2eda5d/Tests/RoundrectTests/__Snapshots__/ButtonStyleTests/verifyStyle-button-identifier-file-line.filled-all-10-0-1-0-small-disabled-dark.png -------------------------------------------------------------------------------- /Tests/RoundrectTests/__Snapshots__/ButtonStyleTests/verifyStyle-button-identifier-file-line.filled-all-10-0-1-0-small-disabled-light.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/gabrieloc/roundrect/43c967fde94290bc371f46a0ba8e24a40d2eda5d/Tests/RoundrectTests/__Snapshots__/ButtonStyleTests/verifyStyle-button-identifier-file-line.filled-all-10-0-1-0-small-disabled-light.png -------------------------------------------------------------------------------- /Tests/RoundrectTests/__Snapshots__/ButtonStyleTests/verifyStyle-button-identifier-file-line.filled-all-10-0-1-0-small-extraLight-disabled.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/gabrieloc/roundrect/43c967fde94290bc371f46a0ba8e24a40d2eda5d/Tests/RoundrectTests/__Snapshots__/ButtonStyleTests/verifyStyle-button-identifier-file-line.filled-all-10-0-1-0-small-extraLight-disabled.png -------------------------------------------------------------------------------- /Tests/RoundrectTests/__Snapshots__/ButtonStyleTests/verifyStyle-button-identifier-file-line.filled-all-10-0-1-0-small-extraLight-highlighted.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/gabrieloc/roundrect/43c967fde94290bc371f46a0ba8e24a40d2eda5d/Tests/RoundrectTests/__Snapshots__/ButtonStyleTests/verifyStyle-button-identifier-file-line.filled-all-10-0-1-0-small-extraLight-highlighted.png -------------------------------------------------------------------------------- /Tests/RoundrectTests/__Snapshots__/ButtonStyleTests/verifyStyle-button-identifier-file-line.filled-all-10-0-1-0-small-extraLight-normal.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/gabrieloc/roundrect/43c967fde94290bc371f46a0ba8e24a40d2eda5d/Tests/RoundrectTests/__Snapshots__/ButtonStyleTests/verifyStyle-button-identifier-file-line.filled-all-10-0-1-0-small-extraLight-normal.png -------------------------------------------------------------------------------- /Tests/RoundrectTests/__Snapshots__/ButtonStyleTests/verifyStyle-button-identifier-file-line.filled-all-10-0-1-0-small-highlighted-dark.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/gabrieloc/roundrect/43c967fde94290bc371f46a0ba8e24a40d2eda5d/Tests/RoundrectTests/__Snapshots__/ButtonStyleTests/verifyStyle-button-identifier-file-line.filled-all-10-0-1-0-small-highlighted-dark.png -------------------------------------------------------------------------------- /Tests/RoundrectTests/__Snapshots__/ButtonStyleTests/verifyStyle-button-identifier-file-line.filled-all-10-0-1-0-small-highlighted-light.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/gabrieloc/roundrect/43c967fde94290bc371f46a0ba8e24a40d2eda5d/Tests/RoundrectTests/__Snapshots__/ButtonStyleTests/verifyStyle-button-identifier-file-line.filled-all-10-0-1-0-small-highlighted-light.png -------------------------------------------------------------------------------- /Tests/RoundrectTests/__Snapshots__/ButtonStyleTests/verifyStyle-button-identifier-file-line.filled-all-10-0-1-0-small-light-disabled.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/gabrieloc/roundrect/43c967fde94290bc371f46a0ba8e24a40d2eda5d/Tests/RoundrectTests/__Snapshots__/ButtonStyleTests/verifyStyle-button-identifier-file-line.filled-all-10-0-1-0-small-light-disabled.png -------------------------------------------------------------------------------- /Tests/RoundrectTests/__Snapshots__/ButtonStyleTests/verifyStyle-button-identifier-file-line.filled-all-10-0-1-0-small-light-highlighted.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/gabrieloc/roundrect/43c967fde94290bc371f46a0ba8e24a40d2eda5d/Tests/RoundrectTests/__Snapshots__/ButtonStyleTests/verifyStyle-button-identifier-file-line.filled-all-10-0-1-0-small-light-highlighted.png -------------------------------------------------------------------------------- /Tests/RoundrectTests/__Snapshots__/ButtonStyleTests/verifyStyle-button-identifier-file-line.filled-all-10-0-1-0-small-light-normal.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/gabrieloc/roundrect/43c967fde94290bc371f46a0ba8e24a40d2eda5d/Tests/RoundrectTests/__Snapshots__/ButtonStyleTests/verifyStyle-button-identifier-file-line.filled-all-10-0-1-0-small-light-normal.png -------------------------------------------------------------------------------- /Tests/RoundrectTests/__Snapshots__/ButtonStyleTests/verifyStyle-button-identifier-file-line.filled-all-10-0-1-0-small-normal-dark.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/gabrieloc/roundrect/43c967fde94290bc371f46a0ba8e24a40d2eda5d/Tests/RoundrectTests/__Snapshots__/ButtonStyleTests/verifyStyle-button-identifier-file-line.filled-all-10-0-1-0-small-normal-dark.png -------------------------------------------------------------------------------- /Tests/RoundrectTests/__Snapshots__/ButtonStyleTests/verifyStyle-button-identifier-file-line.filled-all-10-0-1-0-small-normal-light.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/gabrieloc/roundrect/43c967fde94290bc371f46a0ba8e24a40d2eda5d/Tests/RoundrectTests/__Snapshots__/ButtonStyleTests/verifyStyle-button-identifier-file-line.filled-all-10-0-1-0-small-normal-light.png -------------------------------------------------------------------------------- /Tests/RoundrectTests/__Snapshots__/ButtonStyleTests/verifyStyle-button-identifier-file-line.gradient-all-10-0-UIExtendedSRGBColorSpace-1-0-0-1-UIExtendedSRGBColorSpace-0-0-1-1-big-dark-disabled.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/gabrieloc/roundrect/43c967fde94290bc371f46a0ba8e24a40d2eda5d/Tests/RoundrectTests/__Snapshots__/ButtonStyleTests/verifyStyle-button-identifier-file-line.gradient-all-10-0-UIExtendedSRGBColorSpace-1-0-0-1-UIExtendedSRGBColorSpace-0-0-1-1-big-dark-disabled.png -------------------------------------------------------------------------------- /Tests/RoundrectTests/__Snapshots__/ButtonStyleTests/verifyStyle-button-identifier-file-line.gradient-all-10-0-UIExtendedSRGBColorSpace-1-0-0-1-UIExtendedSRGBColorSpace-0-0-1-1-big-dark-highlighted.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/gabrieloc/roundrect/43c967fde94290bc371f46a0ba8e24a40d2eda5d/Tests/RoundrectTests/__Snapshots__/ButtonStyleTests/verifyStyle-button-identifier-file-line.gradient-all-10-0-UIExtendedSRGBColorSpace-1-0-0-1-UIExtendedSRGBColorSpace-0-0-1-1-big-dark-highlighted.png -------------------------------------------------------------------------------- /Tests/RoundrectTests/__Snapshots__/ButtonStyleTests/verifyStyle-button-identifier-file-line.gradient-all-10-0-UIExtendedSRGBColorSpace-1-0-0-1-UIExtendedSRGBColorSpace-0-0-1-1-big-dark-normal.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/gabrieloc/roundrect/43c967fde94290bc371f46a0ba8e24a40d2eda5d/Tests/RoundrectTests/__Snapshots__/ButtonStyleTests/verifyStyle-button-identifier-file-line.gradient-all-10-0-UIExtendedSRGBColorSpace-1-0-0-1-UIExtendedSRGBColorSpace-0-0-1-1-big-dark-normal.png -------------------------------------------------------------------------------- /Tests/RoundrectTests/__Snapshots__/ButtonStyleTests/verifyStyle-button-identifier-file-line.gradient-all-10-0-UIExtendedSRGBColorSpace-1-0-0-1-UIExtendedSRGBColorSpace-0-0-1-1-big-disabled-dark.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/gabrieloc/roundrect/43c967fde94290bc371f46a0ba8e24a40d2eda5d/Tests/RoundrectTests/__Snapshots__/ButtonStyleTests/verifyStyle-button-identifier-file-line.gradient-all-10-0-UIExtendedSRGBColorSpace-1-0-0-1-UIExtendedSRGBColorSpace-0-0-1-1-big-disabled-dark.png -------------------------------------------------------------------------------- /Tests/RoundrectTests/__Snapshots__/ButtonStyleTests/verifyStyle-button-identifier-file-line.gradient-all-10-0-UIExtendedSRGBColorSpace-1-0-0-1-UIExtendedSRGBColorSpace-0-0-1-1-big-disabled-light.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/gabrieloc/roundrect/43c967fde94290bc371f46a0ba8e24a40d2eda5d/Tests/RoundrectTests/__Snapshots__/ButtonStyleTests/verifyStyle-button-identifier-file-line.gradient-all-10-0-UIExtendedSRGBColorSpace-1-0-0-1-UIExtendedSRGBColorSpace-0-0-1-1-big-disabled-light.png -------------------------------------------------------------------------------- /Tests/RoundrectTests/__Snapshots__/ButtonStyleTests/verifyStyle-button-identifier-file-line.gradient-all-10-0-UIExtendedSRGBColorSpace-1-0-0-1-UIExtendedSRGBColorSpace-0-0-1-1-big-extraLight-disabled.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/gabrieloc/roundrect/43c967fde94290bc371f46a0ba8e24a40d2eda5d/Tests/RoundrectTests/__Snapshots__/ButtonStyleTests/verifyStyle-button-identifier-file-line.gradient-all-10-0-UIExtendedSRGBColorSpace-1-0-0-1-UIExtendedSRGBColorSpace-0-0-1-1-big-extraLight-disabled.png -------------------------------------------------------------------------------- /Tests/RoundrectTests/__Snapshots__/ButtonStyleTests/verifyStyle-button-identifier-file-line.gradient-all-10-0-UIExtendedSRGBColorSpace-1-0-0-1-UIExtendedSRGBColorSpace-0-0-1-1-big-extraLight-highlighted.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/gabrieloc/roundrect/43c967fde94290bc371f46a0ba8e24a40d2eda5d/Tests/RoundrectTests/__Snapshots__/ButtonStyleTests/verifyStyle-button-identifier-file-line.gradient-all-10-0-UIExtendedSRGBColorSpace-1-0-0-1-UIExtendedSRGBColorSpace-0-0-1-1-big-extraLight-highlighted.png -------------------------------------------------------------------------------- /Tests/RoundrectTests/__Snapshots__/ButtonStyleTests/verifyStyle-button-identifier-file-line.gradient-all-10-0-UIExtendedSRGBColorSpace-1-0-0-1-UIExtendedSRGBColorSpace-0-0-1-1-big-extraLight-normal.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/gabrieloc/roundrect/43c967fde94290bc371f46a0ba8e24a40d2eda5d/Tests/RoundrectTests/__Snapshots__/ButtonStyleTests/verifyStyle-button-identifier-file-line.gradient-all-10-0-UIExtendedSRGBColorSpace-1-0-0-1-UIExtendedSRGBColorSpace-0-0-1-1-big-extraLight-normal.png -------------------------------------------------------------------------------- /Tests/RoundrectTests/__Snapshots__/ButtonStyleTests/verifyStyle-button-identifier-file-line.gradient-all-10-0-UIExtendedSRGBColorSpace-1-0-0-1-UIExtendedSRGBColorSpace-0-0-1-1-big-highlighted-dark.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/gabrieloc/roundrect/43c967fde94290bc371f46a0ba8e24a40d2eda5d/Tests/RoundrectTests/__Snapshots__/ButtonStyleTests/verifyStyle-button-identifier-file-line.gradient-all-10-0-UIExtendedSRGBColorSpace-1-0-0-1-UIExtendedSRGBColorSpace-0-0-1-1-big-highlighted-dark.png -------------------------------------------------------------------------------- /Tests/RoundrectTests/__Snapshots__/ButtonStyleTests/verifyStyle-button-identifier-file-line.gradient-all-10-0-UIExtendedSRGBColorSpace-1-0-0-1-UIExtendedSRGBColorSpace-0-0-1-1-big-highlighted-light.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/gabrieloc/roundrect/43c967fde94290bc371f46a0ba8e24a40d2eda5d/Tests/RoundrectTests/__Snapshots__/ButtonStyleTests/verifyStyle-button-identifier-file-line.gradient-all-10-0-UIExtendedSRGBColorSpace-1-0-0-1-UIExtendedSRGBColorSpace-0-0-1-1-big-highlighted-light.png -------------------------------------------------------------------------------- /Tests/RoundrectTests/__Snapshots__/ButtonStyleTests/verifyStyle-button-identifier-file-line.gradient-all-10-0-UIExtendedSRGBColorSpace-1-0-0-1-UIExtendedSRGBColorSpace-0-0-1-1-big-light-disabled.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/gabrieloc/roundrect/43c967fde94290bc371f46a0ba8e24a40d2eda5d/Tests/RoundrectTests/__Snapshots__/ButtonStyleTests/verifyStyle-button-identifier-file-line.gradient-all-10-0-UIExtendedSRGBColorSpace-1-0-0-1-UIExtendedSRGBColorSpace-0-0-1-1-big-light-disabled.png -------------------------------------------------------------------------------- /Tests/RoundrectTests/__Snapshots__/ButtonStyleTests/verifyStyle-button-identifier-file-line.gradient-all-10-0-UIExtendedSRGBColorSpace-1-0-0-1-UIExtendedSRGBColorSpace-0-0-1-1-big-light-highlighted.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/gabrieloc/roundrect/43c967fde94290bc371f46a0ba8e24a40d2eda5d/Tests/RoundrectTests/__Snapshots__/ButtonStyleTests/verifyStyle-button-identifier-file-line.gradient-all-10-0-UIExtendedSRGBColorSpace-1-0-0-1-UIExtendedSRGBColorSpace-0-0-1-1-big-light-highlighted.png -------------------------------------------------------------------------------- /Tests/RoundrectTests/__Snapshots__/ButtonStyleTests/verifyStyle-button-identifier-file-line.gradient-all-10-0-UIExtendedSRGBColorSpace-1-0-0-1-UIExtendedSRGBColorSpace-0-0-1-1-big-light-normal.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/gabrieloc/roundrect/43c967fde94290bc371f46a0ba8e24a40d2eda5d/Tests/RoundrectTests/__Snapshots__/ButtonStyleTests/verifyStyle-button-identifier-file-line.gradient-all-10-0-UIExtendedSRGBColorSpace-1-0-0-1-UIExtendedSRGBColorSpace-0-0-1-1-big-light-normal.png -------------------------------------------------------------------------------- /Tests/RoundrectTests/__Snapshots__/ButtonStyleTests/verifyStyle-button-identifier-file-line.gradient-all-10-0-UIExtendedSRGBColorSpace-1-0-0-1-UIExtendedSRGBColorSpace-0-0-1-1-big-normal-dark.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/gabrieloc/roundrect/43c967fde94290bc371f46a0ba8e24a40d2eda5d/Tests/RoundrectTests/__Snapshots__/ButtonStyleTests/verifyStyle-button-identifier-file-line.gradient-all-10-0-UIExtendedSRGBColorSpace-1-0-0-1-UIExtendedSRGBColorSpace-0-0-1-1-big-normal-dark.png -------------------------------------------------------------------------------- /Tests/RoundrectTests/__Snapshots__/ButtonStyleTests/verifyStyle-button-identifier-file-line.gradient-all-10-0-UIExtendedSRGBColorSpace-1-0-0-1-UIExtendedSRGBColorSpace-0-0-1-1-big-normal-light.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/gabrieloc/roundrect/43c967fde94290bc371f46a0ba8e24a40d2eda5d/Tests/RoundrectTests/__Snapshots__/ButtonStyleTests/verifyStyle-button-identifier-file-line.gradient-all-10-0-UIExtendedSRGBColorSpace-1-0-0-1-UIExtendedSRGBColorSpace-0-0-1-1-big-normal-light.png -------------------------------------------------------------------------------- /Tests/RoundrectTests/__Snapshots__/ButtonStyleTests/verifyStyle-button-identifier-file-line.gradient-all-10-0-UIExtendedSRGBColorSpace-1-0-0-1-UIExtendedSRGBColorSpace-0-0-1-1-small-dark-disabled.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/gabrieloc/roundrect/43c967fde94290bc371f46a0ba8e24a40d2eda5d/Tests/RoundrectTests/__Snapshots__/ButtonStyleTests/verifyStyle-button-identifier-file-line.gradient-all-10-0-UIExtendedSRGBColorSpace-1-0-0-1-UIExtendedSRGBColorSpace-0-0-1-1-small-dark-disabled.png -------------------------------------------------------------------------------- /Tests/RoundrectTests/__Snapshots__/ButtonStyleTests/verifyStyle-button-identifier-file-line.gradient-all-10-0-UIExtendedSRGBColorSpace-1-0-0-1-UIExtendedSRGBColorSpace-0-0-1-1-small-dark-highlighted.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/gabrieloc/roundrect/43c967fde94290bc371f46a0ba8e24a40d2eda5d/Tests/RoundrectTests/__Snapshots__/ButtonStyleTests/verifyStyle-button-identifier-file-line.gradient-all-10-0-UIExtendedSRGBColorSpace-1-0-0-1-UIExtendedSRGBColorSpace-0-0-1-1-small-dark-highlighted.png -------------------------------------------------------------------------------- /Tests/RoundrectTests/__Snapshots__/ButtonStyleTests/verifyStyle-button-identifier-file-line.gradient-all-10-0-UIExtendedSRGBColorSpace-1-0-0-1-UIExtendedSRGBColorSpace-0-0-1-1-small-dark-normal.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/gabrieloc/roundrect/43c967fde94290bc371f46a0ba8e24a40d2eda5d/Tests/RoundrectTests/__Snapshots__/ButtonStyleTests/verifyStyle-button-identifier-file-line.gradient-all-10-0-UIExtendedSRGBColorSpace-1-0-0-1-UIExtendedSRGBColorSpace-0-0-1-1-small-dark-normal.png -------------------------------------------------------------------------------- /Tests/RoundrectTests/__Snapshots__/ButtonStyleTests/verifyStyle-button-identifier-file-line.gradient-all-10-0-UIExtendedSRGBColorSpace-1-0-0-1-UIExtendedSRGBColorSpace-0-0-1-1-small-disabled-dark.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/gabrieloc/roundrect/43c967fde94290bc371f46a0ba8e24a40d2eda5d/Tests/RoundrectTests/__Snapshots__/ButtonStyleTests/verifyStyle-button-identifier-file-line.gradient-all-10-0-UIExtendedSRGBColorSpace-1-0-0-1-UIExtendedSRGBColorSpace-0-0-1-1-small-disabled-dark.png -------------------------------------------------------------------------------- /Tests/RoundrectTests/__Snapshots__/ButtonStyleTests/verifyStyle-button-identifier-file-line.gradient-all-10-0-UIExtendedSRGBColorSpace-1-0-0-1-UIExtendedSRGBColorSpace-0-0-1-1-small-disabled-light.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/gabrieloc/roundrect/43c967fde94290bc371f46a0ba8e24a40d2eda5d/Tests/RoundrectTests/__Snapshots__/ButtonStyleTests/verifyStyle-button-identifier-file-line.gradient-all-10-0-UIExtendedSRGBColorSpace-1-0-0-1-UIExtendedSRGBColorSpace-0-0-1-1-small-disabled-light.png -------------------------------------------------------------------------------- /Tests/RoundrectTests/__Snapshots__/ButtonStyleTests/verifyStyle-button-identifier-file-line.gradient-all-10-0-UIExtendedSRGBColorSpace-1-0-0-1-UIExtendedSRGBColorSpace-0-0-1-1-small-extraLight-disabled.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/gabrieloc/roundrect/43c967fde94290bc371f46a0ba8e24a40d2eda5d/Tests/RoundrectTests/__Snapshots__/ButtonStyleTests/verifyStyle-button-identifier-file-line.gradient-all-10-0-UIExtendedSRGBColorSpace-1-0-0-1-UIExtendedSRGBColorSpace-0-0-1-1-small-extraLight-disabled.png -------------------------------------------------------------------------------- /Tests/RoundrectTests/__Snapshots__/ButtonStyleTests/verifyStyle-button-identifier-file-line.gradient-all-10-0-UIExtendedSRGBColorSpace-1-0-0-1-UIExtendedSRGBColorSpace-0-0-1-1-small-extraLight-highlighted.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/gabrieloc/roundrect/43c967fde94290bc371f46a0ba8e24a40d2eda5d/Tests/RoundrectTests/__Snapshots__/ButtonStyleTests/verifyStyle-button-identifier-file-line.gradient-all-10-0-UIExtendedSRGBColorSpace-1-0-0-1-UIExtendedSRGBColorSpace-0-0-1-1-small-extraLight-highlighted.png -------------------------------------------------------------------------------- /Tests/RoundrectTests/__Snapshots__/ButtonStyleTests/verifyStyle-button-identifier-file-line.gradient-all-10-0-UIExtendedSRGBColorSpace-1-0-0-1-UIExtendedSRGBColorSpace-0-0-1-1-small-extraLight-normal.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/gabrieloc/roundrect/43c967fde94290bc371f46a0ba8e24a40d2eda5d/Tests/RoundrectTests/__Snapshots__/ButtonStyleTests/verifyStyle-button-identifier-file-line.gradient-all-10-0-UIExtendedSRGBColorSpace-1-0-0-1-UIExtendedSRGBColorSpace-0-0-1-1-small-extraLight-normal.png -------------------------------------------------------------------------------- /Tests/RoundrectTests/__Snapshots__/ButtonStyleTests/verifyStyle-button-identifier-file-line.gradient-all-10-0-UIExtendedSRGBColorSpace-1-0-0-1-UIExtendedSRGBColorSpace-0-0-1-1-small-highlighted-dark.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/gabrieloc/roundrect/43c967fde94290bc371f46a0ba8e24a40d2eda5d/Tests/RoundrectTests/__Snapshots__/ButtonStyleTests/verifyStyle-button-identifier-file-line.gradient-all-10-0-UIExtendedSRGBColorSpace-1-0-0-1-UIExtendedSRGBColorSpace-0-0-1-1-small-highlighted-dark.png -------------------------------------------------------------------------------- /Tests/RoundrectTests/__Snapshots__/ButtonStyleTests/verifyStyle-button-identifier-file-line.gradient-all-10-0-UIExtendedSRGBColorSpace-1-0-0-1-UIExtendedSRGBColorSpace-0-0-1-1-small-highlighted-light.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/gabrieloc/roundrect/43c967fde94290bc371f46a0ba8e24a40d2eda5d/Tests/RoundrectTests/__Snapshots__/ButtonStyleTests/verifyStyle-button-identifier-file-line.gradient-all-10-0-UIExtendedSRGBColorSpace-1-0-0-1-UIExtendedSRGBColorSpace-0-0-1-1-small-highlighted-light.png -------------------------------------------------------------------------------- /Tests/RoundrectTests/__Snapshots__/ButtonStyleTests/verifyStyle-button-identifier-file-line.gradient-all-10-0-UIExtendedSRGBColorSpace-1-0-0-1-UIExtendedSRGBColorSpace-0-0-1-1-small-light-disabled.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/gabrieloc/roundrect/43c967fde94290bc371f46a0ba8e24a40d2eda5d/Tests/RoundrectTests/__Snapshots__/ButtonStyleTests/verifyStyle-button-identifier-file-line.gradient-all-10-0-UIExtendedSRGBColorSpace-1-0-0-1-UIExtendedSRGBColorSpace-0-0-1-1-small-light-disabled.png -------------------------------------------------------------------------------- /Tests/RoundrectTests/__Snapshots__/ButtonStyleTests/verifyStyle-button-identifier-file-line.gradient-all-10-0-UIExtendedSRGBColorSpace-1-0-0-1-UIExtendedSRGBColorSpace-0-0-1-1-small-light-highlighted.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/gabrieloc/roundrect/43c967fde94290bc371f46a0ba8e24a40d2eda5d/Tests/RoundrectTests/__Snapshots__/ButtonStyleTests/verifyStyle-button-identifier-file-line.gradient-all-10-0-UIExtendedSRGBColorSpace-1-0-0-1-UIExtendedSRGBColorSpace-0-0-1-1-small-light-highlighted.png -------------------------------------------------------------------------------- /Tests/RoundrectTests/__Snapshots__/ButtonStyleTests/verifyStyle-button-identifier-file-line.gradient-all-10-0-UIExtendedSRGBColorSpace-1-0-0-1-UIExtendedSRGBColorSpace-0-0-1-1-small-light-normal.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/gabrieloc/roundrect/43c967fde94290bc371f46a0ba8e24a40d2eda5d/Tests/RoundrectTests/__Snapshots__/ButtonStyleTests/verifyStyle-button-identifier-file-line.gradient-all-10-0-UIExtendedSRGBColorSpace-1-0-0-1-UIExtendedSRGBColorSpace-0-0-1-1-small-light-normal.png -------------------------------------------------------------------------------- /Tests/RoundrectTests/__Snapshots__/ButtonStyleTests/verifyStyle-button-identifier-file-line.gradient-all-10-0-UIExtendedSRGBColorSpace-1-0-0-1-UIExtendedSRGBColorSpace-0-0-1-1-small-normal-dark.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/gabrieloc/roundrect/43c967fde94290bc371f46a0ba8e24a40d2eda5d/Tests/RoundrectTests/__Snapshots__/ButtonStyleTests/verifyStyle-button-identifier-file-line.gradient-all-10-0-UIExtendedSRGBColorSpace-1-0-0-1-UIExtendedSRGBColorSpace-0-0-1-1-small-normal-dark.png -------------------------------------------------------------------------------- /Tests/RoundrectTests/__Snapshots__/ButtonStyleTests/verifyStyle-button-identifier-file-line.gradient-all-10-0-UIExtendedSRGBColorSpace-1-0-0-1-UIExtendedSRGBColorSpace-0-0-1-1-small-normal-light.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/gabrieloc/roundrect/43c967fde94290bc371f46a0ba8e24a40d2eda5d/Tests/RoundrectTests/__Snapshots__/ButtonStyleTests/verifyStyle-button-identifier-file-line.gradient-all-10-0-UIExtendedSRGBColorSpace-1-0-0-1-UIExtendedSRGBColorSpace-0-0-1-1-small-normal-light.png -------------------------------------------------------------------------------- /Tests/RoundrectTests/__Snapshots__/ButtonStyleTests/verifyStyle-button-identifier-file-line.titled-big-dark-disabled.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/gabrieloc/roundrect/43c967fde94290bc371f46a0ba8e24a40d2eda5d/Tests/RoundrectTests/__Snapshots__/ButtonStyleTests/verifyStyle-button-identifier-file-line.titled-big-dark-disabled.png -------------------------------------------------------------------------------- /Tests/RoundrectTests/__Snapshots__/ButtonStyleTests/verifyStyle-button-identifier-file-line.titled-big-dark-highlighted.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/gabrieloc/roundrect/43c967fde94290bc371f46a0ba8e24a40d2eda5d/Tests/RoundrectTests/__Snapshots__/ButtonStyleTests/verifyStyle-button-identifier-file-line.titled-big-dark-highlighted.png -------------------------------------------------------------------------------- /Tests/RoundrectTests/__Snapshots__/ButtonStyleTests/verifyStyle-button-identifier-file-line.titled-big-dark-normal.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/gabrieloc/roundrect/43c967fde94290bc371f46a0ba8e24a40d2eda5d/Tests/RoundrectTests/__Snapshots__/ButtonStyleTests/verifyStyle-button-identifier-file-line.titled-big-dark-normal.png -------------------------------------------------------------------------------- /Tests/RoundrectTests/__Snapshots__/ButtonStyleTests/verifyStyle-button-identifier-file-line.titled-big-disabled-dark.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/gabrieloc/roundrect/43c967fde94290bc371f46a0ba8e24a40d2eda5d/Tests/RoundrectTests/__Snapshots__/ButtonStyleTests/verifyStyle-button-identifier-file-line.titled-big-disabled-dark.png -------------------------------------------------------------------------------- /Tests/RoundrectTests/__Snapshots__/ButtonStyleTests/verifyStyle-button-identifier-file-line.titled-big-disabled-light.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/gabrieloc/roundrect/43c967fde94290bc371f46a0ba8e24a40d2eda5d/Tests/RoundrectTests/__Snapshots__/ButtonStyleTests/verifyStyle-button-identifier-file-line.titled-big-disabled-light.png -------------------------------------------------------------------------------- /Tests/RoundrectTests/__Snapshots__/ButtonStyleTests/verifyStyle-button-identifier-file-line.titled-big-extraLight-disabled.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/gabrieloc/roundrect/43c967fde94290bc371f46a0ba8e24a40d2eda5d/Tests/RoundrectTests/__Snapshots__/ButtonStyleTests/verifyStyle-button-identifier-file-line.titled-big-extraLight-disabled.png -------------------------------------------------------------------------------- /Tests/RoundrectTests/__Snapshots__/ButtonStyleTests/verifyStyle-button-identifier-file-line.titled-big-extraLight-highlighted.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/gabrieloc/roundrect/43c967fde94290bc371f46a0ba8e24a40d2eda5d/Tests/RoundrectTests/__Snapshots__/ButtonStyleTests/verifyStyle-button-identifier-file-line.titled-big-extraLight-highlighted.png -------------------------------------------------------------------------------- /Tests/RoundrectTests/__Snapshots__/ButtonStyleTests/verifyStyle-button-identifier-file-line.titled-big-extraLight-normal.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/gabrieloc/roundrect/43c967fde94290bc371f46a0ba8e24a40d2eda5d/Tests/RoundrectTests/__Snapshots__/ButtonStyleTests/verifyStyle-button-identifier-file-line.titled-big-extraLight-normal.png -------------------------------------------------------------------------------- /Tests/RoundrectTests/__Snapshots__/ButtonStyleTests/verifyStyle-button-identifier-file-line.titled-big-highlighted-dark.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/gabrieloc/roundrect/43c967fde94290bc371f46a0ba8e24a40d2eda5d/Tests/RoundrectTests/__Snapshots__/ButtonStyleTests/verifyStyle-button-identifier-file-line.titled-big-highlighted-dark.png -------------------------------------------------------------------------------- /Tests/RoundrectTests/__Snapshots__/ButtonStyleTests/verifyStyle-button-identifier-file-line.titled-big-highlighted-light.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/gabrieloc/roundrect/43c967fde94290bc371f46a0ba8e24a40d2eda5d/Tests/RoundrectTests/__Snapshots__/ButtonStyleTests/verifyStyle-button-identifier-file-line.titled-big-highlighted-light.png -------------------------------------------------------------------------------- /Tests/RoundrectTests/__Snapshots__/ButtonStyleTests/verifyStyle-button-identifier-file-line.titled-big-light-disabled.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/gabrieloc/roundrect/43c967fde94290bc371f46a0ba8e24a40d2eda5d/Tests/RoundrectTests/__Snapshots__/ButtonStyleTests/verifyStyle-button-identifier-file-line.titled-big-light-disabled.png -------------------------------------------------------------------------------- /Tests/RoundrectTests/__Snapshots__/ButtonStyleTests/verifyStyle-button-identifier-file-line.titled-big-light-highlighted.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/gabrieloc/roundrect/43c967fde94290bc371f46a0ba8e24a40d2eda5d/Tests/RoundrectTests/__Snapshots__/ButtonStyleTests/verifyStyle-button-identifier-file-line.titled-big-light-highlighted.png -------------------------------------------------------------------------------- /Tests/RoundrectTests/__Snapshots__/ButtonStyleTests/verifyStyle-button-identifier-file-line.titled-big-light-normal.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/gabrieloc/roundrect/43c967fde94290bc371f46a0ba8e24a40d2eda5d/Tests/RoundrectTests/__Snapshots__/ButtonStyleTests/verifyStyle-button-identifier-file-line.titled-big-light-normal.png -------------------------------------------------------------------------------- /Tests/RoundrectTests/__Snapshots__/ButtonStyleTests/verifyStyle-button-identifier-file-line.titled-big-normal-dark.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/gabrieloc/roundrect/43c967fde94290bc371f46a0ba8e24a40d2eda5d/Tests/RoundrectTests/__Snapshots__/ButtonStyleTests/verifyStyle-button-identifier-file-line.titled-big-normal-dark.png -------------------------------------------------------------------------------- /Tests/RoundrectTests/__Snapshots__/ButtonStyleTests/verifyStyle-button-identifier-file-line.titled-big-normal-light.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/gabrieloc/roundrect/43c967fde94290bc371f46a0ba8e24a40d2eda5d/Tests/RoundrectTests/__Snapshots__/ButtonStyleTests/verifyStyle-button-identifier-file-line.titled-big-normal-light.png -------------------------------------------------------------------------------- /Tests/RoundrectTests/__Snapshots__/ButtonStyleTests/verifyStyle-button-identifier-file-line.titled-small-dark-disabled.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/gabrieloc/roundrect/43c967fde94290bc371f46a0ba8e24a40d2eda5d/Tests/RoundrectTests/__Snapshots__/ButtonStyleTests/verifyStyle-button-identifier-file-line.titled-small-dark-disabled.png -------------------------------------------------------------------------------- /Tests/RoundrectTests/__Snapshots__/ButtonStyleTests/verifyStyle-button-identifier-file-line.titled-small-dark-highlighted.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/gabrieloc/roundrect/43c967fde94290bc371f46a0ba8e24a40d2eda5d/Tests/RoundrectTests/__Snapshots__/ButtonStyleTests/verifyStyle-button-identifier-file-line.titled-small-dark-highlighted.png -------------------------------------------------------------------------------- /Tests/RoundrectTests/__Snapshots__/ButtonStyleTests/verifyStyle-button-identifier-file-line.titled-small-dark-normal.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/gabrieloc/roundrect/43c967fde94290bc371f46a0ba8e24a40d2eda5d/Tests/RoundrectTests/__Snapshots__/ButtonStyleTests/verifyStyle-button-identifier-file-line.titled-small-dark-normal.png -------------------------------------------------------------------------------- /Tests/RoundrectTests/__Snapshots__/ButtonStyleTests/verifyStyle-button-identifier-file-line.titled-small-disabled-dark.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/gabrieloc/roundrect/43c967fde94290bc371f46a0ba8e24a40d2eda5d/Tests/RoundrectTests/__Snapshots__/ButtonStyleTests/verifyStyle-button-identifier-file-line.titled-small-disabled-dark.png -------------------------------------------------------------------------------- /Tests/RoundrectTests/__Snapshots__/ButtonStyleTests/verifyStyle-button-identifier-file-line.titled-small-disabled-light.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/gabrieloc/roundrect/43c967fde94290bc371f46a0ba8e24a40d2eda5d/Tests/RoundrectTests/__Snapshots__/ButtonStyleTests/verifyStyle-button-identifier-file-line.titled-small-disabled-light.png -------------------------------------------------------------------------------- /Tests/RoundrectTests/__Snapshots__/ButtonStyleTests/verifyStyle-button-identifier-file-line.titled-small-extraLight-disabled.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/gabrieloc/roundrect/43c967fde94290bc371f46a0ba8e24a40d2eda5d/Tests/RoundrectTests/__Snapshots__/ButtonStyleTests/verifyStyle-button-identifier-file-line.titled-small-extraLight-disabled.png -------------------------------------------------------------------------------- /Tests/RoundrectTests/__Snapshots__/ButtonStyleTests/verifyStyle-button-identifier-file-line.titled-small-extraLight-highlighted.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/gabrieloc/roundrect/43c967fde94290bc371f46a0ba8e24a40d2eda5d/Tests/RoundrectTests/__Snapshots__/ButtonStyleTests/verifyStyle-button-identifier-file-line.titled-small-extraLight-highlighted.png -------------------------------------------------------------------------------- /Tests/RoundrectTests/__Snapshots__/ButtonStyleTests/verifyStyle-button-identifier-file-line.titled-small-extraLight-normal.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/gabrieloc/roundrect/43c967fde94290bc371f46a0ba8e24a40d2eda5d/Tests/RoundrectTests/__Snapshots__/ButtonStyleTests/verifyStyle-button-identifier-file-line.titled-small-extraLight-normal.png -------------------------------------------------------------------------------- /Tests/RoundrectTests/__Snapshots__/ButtonStyleTests/verifyStyle-button-identifier-file-line.titled-small-highlighted-dark.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/gabrieloc/roundrect/43c967fde94290bc371f46a0ba8e24a40d2eda5d/Tests/RoundrectTests/__Snapshots__/ButtonStyleTests/verifyStyle-button-identifier-file-line.titled-small-highlighted-dark.png -------------------------------------------------------------------------------- /Tests/RoundrectTests/__Snapshots__/ButtonStyleTests/verifyStyle-button-identifier-file-line.titled-small-highlighted-light.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/gabrieloc/roundrect/43c967fde94290bc371f46a0ba8e24a40d2eda5d/Tests/RoundrectTests/__Snapshots__/ButtonStyleTests/verifyStyle-button-identifier-file-line.titled-small-highlighted-light.png -------------------------------------------------------------------------------- /Tests/RoundrectTests/__Snapshots__/ButtonStyleTests/verifyStyle-button-identifier-file-line.titled-small-light-disabled.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/gabrieloc/roundrect/43c967fde94290bc371f46a0ba8e24a40d2eda5d/Tests/RoundrectTests/__Snapshots__/ButtonStyleTests/verifyStyle-button-identifier-file-line.titled-small-light-disabled.png -------------------------------------------------------------------------------- /Tests/RoundrectTests/__Snapshots__/ButtonStyleTests/verifyStyle-button-identifier-file-line.titled-small-light-highlighted.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/gabrieloc/roundrect/43c967fde94290bc371f46a0ba8e24a40d2eda5d/Tests/RoundrectTests/__Snapshots__/ButtonStyleTests/verifyStyle-button-identifier-file-line.titled-small-light-highlighted.png -------------------------------------------------------------------------------- /Tests/RoundrectTests/__Snapshots__/ButtonStyleTests/verifyStyle-button-identifier-file-line.titled-small-light-normal.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/gabrieloc/roundrect/43c967fde94290bc371f46a0ba8e24a40d2eda5d/Tests/RoundrectTests/__Snapshots__/ButtonStyleTests/verifyStyle-button-identifier-file-line.titled-small-light-normal.png -------------------------------------------------------------------------------- /Tests/RoundrectTests/__Snapshots__/ButtonStyleTests/verifyStyle-button-identifier-file-line.titled-small-normal-dark.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/gabrieloc/roundrect/43c967fde94290bc371f46a0ba8e24a40d2eda5d/Tests/RoundrectTests/__Snapshots__/ButtonStyleTests/verifyStyle-button-identifier-file-line.titled-small-normal-dark.png -------------------------------------------------------------------------------- /Tests/RoundrectTests/__Snapshots__/ButtonStyleTests/verifyStyle-button-identifier-file-line.titled-small-normal-light.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/gabrieloc/roundrect/43c967fde94290bc371f46a0ba8e24a40d2eda5d/Tests/RoundrectTests/__Snapshots__/ButtonStyleTests/verifyStyle-button-identifier-file-line.titled-small-normal-light.png -------------------------------------------------------------------------------- /Tests/RoundrectTests/__Snapshots__/ImageGenerationTests/testConditionalStrokesOnRoundEdge.1.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/gabrieloc/roundrect/43c967fde94290bc371f46a0ba8e24a40d2eda5d/Tests/RoundrectTests/__Snapshots__/ImageGenerationTests/testConditionalStrokesOnRoundEdge.1.png -------------------------------------------------------------------------------- /Tests/RoundrectTests/__Snapshots__/ImageGenerationTests/testConditionallyRoundedGradientImage.1.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/gabrieloc/roundrect/43c967fde94290bc371f46a0ba8e24a40d2eda5d/Tests/RoundrectTests/__Snapshots__/ImageGenerationTests/testConditionallyRoundedGradientImage.1.png -------------------------------------------------------------------------------- /Tests/RoundrectTests/__Snapshots__/ImageGenerationTests/testConditionallyRoundedStrokedImage.1.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/gabrieloc/roundrect/43c967fde94290bc371f46a0ba8e24a40d2eda5d/Tests/RoundrectTests/__Snapshots__/ImageGenerationTests/testConditionallyRoundedStrokedImage.1.png -------------------------------------------------------------------------------- /Tests/RoundrectTests/__Snapshots__/ImageGenerationTests/testFilledAndStrokedImage.1.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/gabrieloc/roundrect/43c967fde94290bc371f46a0ba8e24a40d2eda5d/Tests/RoundrectTests/__Snapshots__/ImageGenerationTests/testFilledAndStrokedImage.1.png -------------------------------------------------------------------------------- /Tests/RoundrectTests/__Snapshots__/ImageGenerationTests/testFilledImage.1.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/gabrieloc/roundrect/43c967fde94290bc371f46a0ba8e24a40d2eda5d/Tests/RoundrectTests/__Snapshots__/ImageGenerationTests/testFilledImage.1.png -------------------------------------------------------------------------------- /Tests/RoundrectTests/__Snapshots__/ImageGenerationTests/testGradientImage.1.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/gabrieloc/roundrect/43c967fde94290bc371f46a0ba8e24a40d2eda5d/Tests/RoundrectTests/__Snapshots__/ImageGenerationTests/testGradientImage.1.png -------------------------------------------------------------------------------- /Tests/RoundrectTests/__Snapshots__/ImageGenerationTests/testMultipleConditionalStrokesNoRounding.1.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/gabrieloc/roundrect/43c967fde94290bc371f46a0ba8e24a40d2eda5d/Tests/RoundrectTests/__Snapshots__/ImageGenerationTests/testMultipleConditionalStrokesNoRounding.1.png -------------------------------------------------------------------------------- /Tests/RoundrectTests/__Snapshots__/ImageGenerationTests/testMultipleConditionalStrokesOnFlatEdge.1.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/gabrieloc/roundrect/43c967fde94290bc371f46a0ba8e24a40d2eda5d/Tests/RoundrectTests/__Snapshots__/ImageGenerationTests/testMultipleConditionalStrokesOnFlatEdge.1.png -------------------------------------------------------------------------------- /Tests/RoundrectTests/__Snapshots__/ImageGenerationTests/testRoundedGradientImage.1.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/gabrieloc/roundrect/43c967fde94290bc371f46a0ba8e24a40d2eda5d/Tests/RoundrectTests/__Snapshots__/ImageGenerationTests/testRoundedGradientImage.1.png -------------------------------------------------------------------------------- /Tests/RoundrectTests/__Snapshots__/ImageGenerationTests/testRoundedImage.1.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/gabrieloc/roundrect/43c967fde94290bc371f46a0ba8e24a40d2eda5d/Tests/RoundrectTests/__Snapshots__/ImageGenerationTests/testRoundedImage.1.png -------------------------------------------------------------------------------- /Tests/RoundrectTests/__Snapshots__/ImageGenerationTests/testRoundedStrokedImage.1.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/gabrieloc/roundrect/43c967fde94290bc371f46a0ba8e24a40d2eda5d/Tests/RoundrectTests/__Snapshots__/ImageGenerationTests/testRoundedStrokedImage.1.png -------------------------------------------------------------------------------- /Tests/RoundrectTests/__Snapshots__/ImageGenerationTests/testRoundedThickStrokedImage.1.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/gabrieloc/roundrect/43c967fde94290bc371f46a0ba8e24a40d2eda5d/Tests/RoundrectTests/__Snapshots__/ImageGenerationTests/testRoundedThickStrokedImage.1.png -------------------------------------------------------------------------------- /Tests/RoundrectTests/__Snapshots__/ImageGenerationTests/testSingleConditionalStrokeOnFlatEdge.1.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/gabrieloc/roundrect/43c967fde94290bc371f46a0ba8e24a40d2eda5d/Tests/RoundrectTests/__Snapshots__/ImageGenerationTests/testSingleConditionalStrokeOnFlatEdge.1.png -------------------------------------------------------------------------------- /Tests/RoundrectTests/__Snapshots__/ImageGenerationTests/testStrokedImage.1.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/gabrieloc/roundrect/43c967fde94290bc371f46a0ba8e24a40d2eda5d/Tests/RoundrectTests/__Snapshots__/ImageGenerationTests/testStrokedImage.1.png -------------------------------------------------------------------------------- /Tests/RoundrectTests/__Snapshots__/ImageGenerationTests/testStrokedImageNoLineWidth.1.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/gabrieloc/roundrect/43c967fde94290bc371f46a0ba8e24a40d2eda5d/Tests/RoundrectTests/__Snapshots__/ImageGenerationTests/testStrokedImageNoLineWidth.1.png -------------------------------------------------------------------------------- /Tests/RoundrectTests/__Snapshots__/ImageGenerationTests/testViewRasterization.1.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/gabrieloc/roundrect/43c967fde94290bc371f46a0ba8e24a40d2eda5d/Tests/RoundrectTests/__Snapshots__/ImageGenerationTests/testViewRasterization.1.png -------------------------------------------------------------------------------- /Tests/RoundrectTests/__Snapshots__/SampleSheetTests/testGenerateSampleSheet.1.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/gabrieloc/roundrect/43c967fde94290bc371f46a0ba8e24a40d2eda5d/Tests/RoundrectTests/__Snapshots__/SampleSheetTests/testGenerateSampleSheet.1.png -------------------------------------------------------------------------------- /Tests/RoundrectTests/__Snapshots__/SampleSheetTests/testGenerateSampleSheetLightDark-dark.1.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/gabrieloc/roundrect/43c967fde94290bc371f46a0ba8e24a40d2eda5d/Tests/RoundrectTests/__Snapshots__/SampleSheetTests/testGenerateSampleSheetLightDark-dark.1.png -------------------------------------------------------------------------------- /Tests/RoundrectTests/__Snapshots__/SampleSheetTests/testGenerateSampleSheetLightDark-light.1.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/gabrieloc/roundrect/43c967fde94290bc371f46a0ba8e24a40d2eda5d/Tests/RoundrectTests/__Snapshots__/SampleSheetTests/testGenerateSampleSheetLightDark-light.1.png -------------------------------------------------------------------------------- /sample-dark.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/gabrieloc/roundrect/43c967fde94290bc371f46a0ba8e24a40d2eda5d/sample-dark.png -------------------------------------------------------------------------------- /sample-light.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/gabrieloc/roundrect/43c967fde94290bc371f46a0ba8e24a40d2eda5d/sample-light.png -------------------------------------------------------------------------------- /sample.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/gabrieloc/roundrect/43c967fde94290bc371f46a0ba8e24a40d2eda5d/sample.png --------------------------------------------------------------------------------