npm package discovery and stats viewer.

Discover Tips

  • General search

    [free text search, go nuts!]

  • Package details

    pkg:[package-name]

  • User packages

    @[username]

Sponsor

Optimize Toolset

I’ve always been into building performant and accessible sites, but lately I’ve been taking it extremely seriously. So much so that I’ve been building a tool to help me optimize and monitor the sites that I build to make sure that I’m making an attempt to offer the best experience to those who visit them. If you’re into performant, accessible and SEO friendly sites, you might like it too! You can check it out at Optimize Toolset.

About

Hi, 👋, I’m Ryan Hefner  and I built this site for me, and you! The goal of this site was to provide an easy way for me to check the stats on my npm packages, both for prioritizing issues and updates, and to give me a little kick in the pants to keep up on stuff.

As I was building it, I realized that I was actually using the tool to build the tool, and figured I might as well put this out there and hopefully others will find it to be a fast and useful way to search and browse npm packages as I have.

If you’re interested in other things I’m working on, follow me on Twitter or check out the open source projects I’ve been publishing on GitHub.

I am also working on a Twitter bot for this site to tweet the most popular, newest, random packages from npm. Please follow that account now and it will start sending out packages soon–ish.

Open Software & Tools

This site wouldn’t be possible without the immense generosity and tireless efforts from the people who make contributions to the world and share their work via open source initiatives. Thank you 🙏

© 2024 – Pkg Stats / Ryan Hefner

rounded-rect-9patch

v1.0.1

Published

Command line rounded rectangle 9patch generator, created with Roku in mind

Downloads

51

Readme

Rounded Rect 9patch

Simple tool to generate 9patches for rounded rectangle, created for Roku development

Usage

rounded-rect-9patch --help

    Usage: 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