Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/slheavner/rounded-rect-9patch
Rounded rectangle 9patch generator with Roku in mind
https://github.com/slheavner/rounded-rect-9patch
Last synced: 4 days ago
JSON representation
Rounded rectangle 9patch generator with Roku in mind
- Host: GitHub
- URL: https://github.com/slheavner/rounded-rect-9patch
- Owner: slheavner
- License: mit
- Created: 2020-04-29T07:01:57.000Z (over 4 years ago)
- Default Branch: master
- Last Pushed: 2024-06-18T05:58:32.000Z (5 months ago)
- Last Synced: 2024-10-03T12:48:42.804Z (about 2 months ago)
- Language: JavaScript
- Size: 28.3 KB
- Stars: 6
- Watchers: 2
- Forks: 3
- Open Issues: 4
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
- awesome-roku - rounded-rect-9patch - CLI for generating rounded rectangle 9patches, create with Roku in mind (Build Tools)
README
# Rounded Rect 9patch
Simple tool to generate 9patches for rounded rectangle, created for Roku development# Usage
```
rounded-rect-9patch --helpUsage: rounded-rect RADIUS... [options]
RADIUS: list of radius values
Options: default desc
--extraRadius 1 space between the corner and stretch line
--stretchWidth 4 width of black stretch lines (left, top)
--borderColor white hex color of border, alpha optional (#AABBCCDD)
--fillColor white hex color of fill, alpha optional (#AABBCCDD)
--borderWidth 2 width of border, mostly for border-only rectangles where it needs to be > radius
--paddingHeight 0 height of "height" padding block (right)
--paddingWidth 0 width of "length" padding block (bottom)
--paddingX 0 offset of "length" padding block
--paddingY 0 offset of "height" padding block
--res fhd base resolution name (fhd, hd) of radius
--fhd fhd value to use for fhd resolution name
--hd fhd value to use for hd resolution name
--output rounded-rectangle-{res}-{radius}px.9.png
filename template, must include {res} and {radius} if noScale=true
--noScale false if true, ignore res option, create a single image
```## Suggested usage
- leave `--borderColor` and `--fillColor` as white and use the `Poster` field `blendColor` when you can
- leave `--res` to your main ui resolution and set `--fhd` and `--hd` to your corresponding values in your manifest field `uri_resolution_autosub`
- fhd is a 1.5 scale of hd, only the radius changes
- make sure your `RADIUS` values are divisible by 2/3 if `--res=fhd`
- make sure to wrap colors in quotes from the command line, like `--borderColor '#AABBCC'`
- if you want only a border and no fille, set `--fillColor` to be transparent and make sure `RADIUS < --borderWidth`## Make a simple rectangle with 10px radius to file image.9.png
`rounded-rect-9patch 10 --noScale --output image`## Make a simple rectangle with 6px, 9px, and 15px radius, but scale to image-fhd-{radius}px.9.png and image-hd-{radius}px.9.png
`rounded-rect-9patch 6 9 15 --output image-{res}-{radius}px.9.png`