get_polylines: Get outputs polylines (supported format svg, json, csv, etc.)

Description Usage Arguments Value Author(s) Examples

View source: R/fishdraw.R

Description

Get outputs polylines (supported format svg, json, csv, etc.)

Usage

1
2
3
4
5
6
7
get_polylines(
  path = "./fishdraw.js",
  name = NULL,
  format = "svg",
  output = "output.svg",
  draw_type = "random"
)

Arguments

path

Path for fishdraw.js or customs.js via custom_params

name

The name string is used as the name of the fish (printed in the drawing). If unspecified, a random pseudo-Latin name will be auto generated.

format

Format options: svg (regular svg), smil (animated svg), csv (each polyline on a comma-separated line) and json.

output

Outputs polylines (supported format svg, json, csv, etc.)

draw_type

Draw_type options: random(by design fishdraw.js program is for randomly generated fishes),custom(by create and implement a custom customs.js for your favorite fish).

Value

Get outputs fish drawings polylines (in format .svg, .json and .csv).

Author(s)

Liuyong Ding ly_ding@126.com

Examples

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
## Not run: 
# Get outputs polylines in svg
get_polylines(path = "inst/fishdraw.js",
              format = "svg",
              output = "output.svg",
              draw_type = "random")

# Get outputs polylines in json
get_polylines(path = "inst/fishdraw.js",
              format = "json",
              output = "output.json",
              draw_type = "random")

# Get outputs polylines in smil
get_polylines(path = "inst/fishdraw.js",
              format = "smil",
              output = "output.svg",
              draw_type = "random")

# browse animated svg
browseURL("inst/animated.svg")

## End(Not run)

rfishdraw documentation built on Sept. 8, 2021, 5:08 p.m.