tileimg

command module
v1.0.0 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Sep 6, 2020 License: MIT Imports: 10 Imported by: 0

README

= tileimg
:toc: left
:sectnums:

image::https://codecov.io/gh/jiro4989/tileimg/branch/master/graph/badge.svg[codecov, link="https://codecov.io/gh/jiro4989/tileimg"]

tileimg draws tile rectangle to image.

== Usage

[source,bash]
----
tileimg -o out.png 0,0 1,0 1,1
----

image::https://user-images.githubusercontent.com/13825004/92319924-69245b00-f058-11ea-833a-97b77aaae220.png[out.png]

[source,bash]
----
$ tileimg -o out.png 0-2,0 3,0-1
----

image::https://user-images.githubusercontent.com/13825004/92319932-848f6600-f058-11ea-8e60-661d79ba24b3.png[out.png]

[source,bash]
----
$ tileimg -o out.png -s none red:0,0 green:1,0 blue:2,0
----

image::https://user-images.githubusercontent.com/13825004/92319948-9cff8080-f058-11ea-8dc0-12bc74b2e2ba.png[out.png]

[source,bash]
----
$ tileimg -o out.png -s none 75,0,0:0,0-4 150,0,0:1,0-4 225,0,0:2,0-4
----

image::https://user-images.githubusercontent.com/13825004/92319962-b6083180-f058-11ea-8d15-023a436c26a8.png[out.png]

== Installation

[source,bash]
----
$ go get -u github.com/jiro4989/tileimg
----

== Help

[source,text]
----
tileimg draws tile rectangle to image.

Usage:
  tileimg [options] <args>...
  tileimg -h | --help
  tileimg --version

Examples:
  $ tileimg -o out.png 0,0 1,0 1,1

  $ tileimg -o out.png 0-2,0 3,0-1

  $ tileimg -o out.png -s none red:0,0 green:1,0 blue:2,0

  $ tileimg -o out.png -s none 75,0,0:0,0-4 150,0,0:1,0-4 225,0,0:2,0-4

Description:
  <args> is a axis of tile rectangle. 1 args format is X,Y. Default tile column
  of image is 4. and Default tile row of image is 4. If x is 1 and y is 2 then,
  tileimg draws rectangle to:

    +-----+-----+-----+-----+
    | 0,0 | 1,0 | 2,0 | 3,0 |
    +-----+-----+-----+-----+
    | 0,1 |     | 2,1 | 3,1 |
    +-----+-----+-----+-----+
    | 0,2 | 1,2 | 2,2 | 3,2 |
    +-----+-----+-----+-----+
    | 0,3 | 1,3 | 2,3 | 3,3 |
    +-----+-----+-----+-----+

  tileimg joins multiple tile rectangles if <args> is 'BEGIN-END'
  if x is 1-2 and y 0-3 then, tileimg draws rectangle to:

    +-----+-----+-----+-----+
    | 0,0 |           | 3,0 |
    +-----+           +-----+
    | 0,1 |           | 3,1 |
    +-----+           +-----+
    | 0,2 |           | 3,2 |
    +-----+-----+-----+-----+
    | 0,3 | 1,3 | 2,3 | 3,3 |
    +-----+-----+-----+-----+

  tleimg fills COLOR to rectangle if <args> is 'COLOR:x,y'.

Options:
  -h, --help                                   print this help
      --version                                print version
  -W, --width=<width>                          image rectangle width [default: 200]
  -H, --height=<height>                        image rectangle height [default: 200]
  -c, --column=<column>                        image tile columns count [default: 4]
  -r, --row=<row>                              image tile rows count [default: 4]
  -p, --pad=<pad>                              image tile padding width [default: 5]
  -b, --background-color=<background-color>    image background color [default: white]
  -s, --stroke-color=<stroke-color>            image stroke color [default: black]
  -f, --fill-color=<fill-color>                image file color [default: none]
  -l, --line-width=<line-width>                image line width [default: 2]
  -o, --out=<path>                             out file path
----

== LICENSE

MIT

== Development

=== Build

[source,bash]
----
go build
----

=== Test

[source,bash]
----
go test
----

Documentation

The Go Gopher

There is no documentation for this package.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL