Package 'minixcali'

Title: Excalidraw Document Builder
Description: Build Excalidraw documents with R.
Authors: Baptiste Auguie [aut, cre]
Maintainer: Baptiste Auguie <[email protected]>
License: MIT + file LICENSE
Version: 0.0.1
Built: 2025-02-26 05:17:08 UTC
Source: https://github.com/baptiste/minixcali

Help Index


Excali_doc

Description

Create a new ExcaliDocument

Usage

Excali_doc()

Value

An ExcaliDocument class object.


xkd_arrow

Description

xkd_arrow

Usage

xkd_arrow(
  x = 0,
  y = 0,
  width = 100,
  height = 100,
  angle = 0L,
  strokeColor = "#000000",
  backgroundColor = "#868e96",
  fillStyle = c("solid", "hachure", "cross-hatch"),
  strokeWidth = 1L,
  strokeStyle = c("solid", "dashed", "dotted"),
  roughness = 0L,
  opacity = 100L,
  groupIds = list(),
  strokeSharpness = c("round", "sharp"),
  isDeleted = FALSE,
  boundElementIds = NA,
  points = list(list(0L, 0L), list(100, 0L)),
  lastCommittedPoint = NA,
  startBinding = NA,
  endBinding = NA,
  startArrowhead = NA,
  endArrowhead = NA,
  version = 1,
  versionNonce = 12345
)

Arguments

x

x position of glyph in px

y

y position of glyph in px

width

glyph width in px

height

glyph height in px

angle

in radians

strokeColor

HTML colour code

backgroundColor

HTML colour code

fillStyle

"solid" or "hachure" or "cross-hatch"

strokeWidth

1 or 2 or 4

strokeStyle

"solid" or "dashed" or "dotted"

roughness

degree of wiggliness, 0 or 1 or 2

opacity

0 to 100

groupIds

list of strings indicating groupings

strokeSharpness

"sharp" or "round"

isDeleted

tag for collaboration

boundElementIds

list of IDs used for connectors

points

of glyph

lastCommittedPoint

of glyph

startBinding

of glyph

endBinding

of glyph

startArrowhead

NA or "arrow"

endArrowhead

NA or "arrow"

version

of glyph for collaboration

versionNonce

of glyph for collaboration


xkd_draw

Description

xkd_draw

Usage

xkd_draw(
  x = 0,
  y = 0,
  width = 100,
  height = 100,
  angle = 0L,
  strokeColor = "#000000",
  backgroundColor = "#868e96",
  fillStyle = c("solid", "hachure", "cross-hatch"),
  strokeWidth = 1L,
  strokeStyle = c("solid", "dashed", "dotted"),
  roughness = 0L,
  opacity = 100L,
  groupIds = list(),
  strokeSharpness = c("round", "sharp"),
  isDeleted = FALSE,
  boundElementIds = NA,
  points = list(list(0L, 0L), list(100, 0L)),
  lastCommittedPoint = NA,
  startBinding = NA,
  endBinding = NA,
  startArrowhead = NA,
  endArrowhead = NA,
  version = 1,
  versionNonce = 12345
)

Arguments

x

x position of glyph in px

y

y position of glyph in px

width

glyph width in px

height

glyph height in px

angle

in radians

strokeColor

HTML colour code

backgroundColor

HTML colour code

fillStyle

"solid" or "hachure" or "cross-hatch"

strokeWidth

1 or 2 or 4

strokeStyle

"solid" or "dashed" or "dotted"

roughness

degree of wiggliness, 0 or 1 or 2

opacity

0 to 100

groupIds

list of strings indicating groupings

strokeSharpness

"sharp" or "round"

isDeleted

tag for collaboration

boundElementIds

list of IDs used for connectors

points

of glyph

lastCommittedPoint

of glyph

startBinding

of glyph

endBinding

of glyph

startArrowhead

of glyph

endArrowhead

of glyph

version

of glyph for collaboration

versionNonce

of glyph for collaboration


xkd_element

Description

xkd_element

Usage

xkd_element(
  type = "rectangle",
  x = 0,
  y = 0,
  width = 100,
  height = 100,
  angle = 0L,
  strokeColor = "#000000",
  backgroundColor = "#868e96",
  fillStyle = c("solid", "hachure", "cross-hatch"),
  strokeWidth = 2L,
  strokeStyle = c("solid", "dashed", "dotted"),
  roughness = 0L,
  opacity = 100L,
  groupIds = list(),
  strokeSharpness = c("sharp", "round"),
  isDeleted = FALSE,
  boundElementIds = NA,
  version = 1,
  versionNonce = 12345,
  ...
)

Arguments

type

Element type

x

x position of glyph in px

y

y position of glyph in px

width

glyph width in px

height

glyph height in px

angle

in radians

strokeColor

HTML colour code

backgroundColor

HTML colour code

fillStyle

"solid" or "hachure" or "cross-hatch"

strokeWidth

1 or 2 or 4

strokeStyle

"solid" or "dashed" or "dotted"

roughness

degree of wiggliness, 0 or 1 or 2

opacity

0 to 100

groupIds

list of strings indicating groupings

strokeSharpness

"sharp" or "round"

isDeleted

tag for collaboration

boundElementIds

list of IDs used for connectors

version

of glyph for collaboration

versionNonce

of glyph for collaboration

...

Unused


xkd_ellipse

Description

xkd_ellipse

Usage

xkd_ellipse(
  x = 0,
  y = 0,
  width = 100,
  height = 100,
  angle = 0L,
  strokeColor = "#000000",
  backgroundColor = "#868e96",
  fillStyle = c("solid", "hachure", "cross-hatch"),
  strokeWidth = 2L,
  strokeStyle = c("solid", "dashed", "dotted"),
  roughness = 0L,
  opacity = 100L,
  groupIds = list(),
  strokeSharpness = c("sharp", "round"),
  isDeleted = FALSE,
  boundElementIds = NA,
  version = 1,
  versionNonce = 12345
)

Arguments

x

x position of glyph in px

y

y position of glyph in px

width

glyph width in px

height

glyph height in px

angle

in radians

strokeColor

HTML colour code

backgroundColor

HTML colour code

fillStyle

"solid" or "hachure" or "cross-hatch"

strokeWidth

1 or 2 or 4

strokeStyle

"solid" or "dashed" or "dotted"

roughness

degree of wiggliness, 0 or 1 or 2

opacity

0 to 100

groupIds

list of strings indicating groupings

strokeSharpness

"sharp" or "round"

isDeleted

tag for collaboration

boundElementIds

list of IDs used for connectors

version

of glyph for collaboration

versionNonce

of glyph for collaboration


xkd_math

Description

xkd_math

Usage

xkd_math(
  x = 0,
  y = 0,
  width = 100,
  height = 100,
  angle = 0,
  text = "\\nabla\\cdot\\mathbf{E}",
  strokeColor = "#000000",
  backgroundColor = "#868e96",
  fillStyle = "solid",
  strokeWidth = 2L,
  strokeStyle = "solid",
  roughness = 0L,
  opacity = 100L,
  groupIds = list(),
  strokeSharpness = c("sharp", "round"),
  boundElementIds = NA,
  fontSize = 28L,
  fontFamily = 1L,
  textAlign = "left",
  verticalAlign = "top",
  baseline = fontSize,
  version = 300,
  versionNonce = 12345,
  isDeleted = FALSE,
  subtype = "math",
  containerId = NA,
  customData = list(useTex = TRUE, mathOnly = TRUE)
)

Arguments

x

x position of glyph in px

y

y position of glyph in px

width

glyph width in px

height

glyph height in px

angle

in radians

text

text string

strokeColor

HTML colour code

backgroundColor

HTML colour code

fillStyle

"solid" or "hachure" or "cross-hatch"

strokeWidth

1 or 2 or 4

strokeStyle

"solid" or "dashed" or "dotted"

roughness

degree of wiggliness, 0 or 1 or 2

opacity

0 to 100

groupIds

list of strings indicating groupings

strokeSharpness

"sharp" or "round"

boundElementIds

list of IDs used for connectors

fontSize

in pts

fontFamily

1, 2, 3 (FG_Virgil,Cascadia,?)

textAlign

"left", "center", "right"

verticalAlign

"bottom", "center", "top"

baseline

offset in pts?

version

of glyph for collaboration

versionNonce

of glyph for collaboration

isDeleted

tag for collaboration

subtype

Subtype

containerId

Container ID

customData

List of custom data


Read an Excalidraw file

Description

Read an Excalidraw file from a file or URL. If simplifyVector = TRUE, the the diagram elements are returned as a data frame instead of a list. This option makes the returned object is incompatible with the R6 methods in this package.

Usage

xkd_read(file, excalidoc = FALSE, simplifyVector = FALSE)

Arguments

file

A file path or URL for an Excalidraw file with a JSON or excalidraw file extension.

excalidoc

Default FALSE. If TRUE, return a R6 ExcaliDoc class object.

simplifyVector

simplifies nested lists into vectors and data frames. See fromJSON().

Value

A named list or ExcaliDoc object


xkd_rectangle

Description

xkd_rectangle

Usage

xkd_rectangle(
  x = 0,
  y = 0,
  width = 100,
  height = 100,
  angle = 0L,
  strokeColor = "#000000",
  backgroundColor = "#868e96",
  fillStyle = c("solid", "hachure", "cross-hatch"),
  strokeWidth = 2L,
  strokeStyle = c("solid", "dashed", "dotted"),
  roughness = 0L,
  opacity = 100L,
  groupIds = list(),
  strokeSharpness = c("sharp", "round"),
  isDeleted = FALSE,
  boundElementIds = NA,
  version = 1,
  versionNonce = 12345
)

Arguments

x

x position of glyph in px

y

y position of glyph in px

width

glyph width in px

height

glyph height in px

angle

in radians

strokeColor

HTML colour code

backgroundColor

HTML colour code

fillStyle

"solid" or "hachure" or "cross-hatch"

strokeWidth

1 or 2 or 4

strokeStyle

"solid" or "dashed" or "dotted"

roughness

degree of wiggliness, 0 or 1 or 2

opacity

0 to 100

groupIds

list of strings indicating groupings

strokeSharpness

"sharp" or "round"

isDeleted

tag for collaboration

boundElementIds

list of IDs used for connectors

version

of glyph for collaboration

versionNonce

of glyph for collaboration


xkd_text

Description

xkd_text

Usage

xkd_text(
  x = 0,
  y = 0,
  width = 100,
  height = 100,
  angle = 0,
  strokeColor = "#000000",
  backgroundColor = "#868e96",
  fillStyle = "solid",
  strokeWidth = 2L,
  strokeStyle = "solid",
  roughness = 0L,
  opacity = 100L,
  groupIds = list(),
  strokeSharpness = c("sharp", "round"),
  isDeleted = FALSE,
  boundElementIds = NA,
  text = "text",
  fontSize = 36L,
  fontFamily = 1L,
  textAlign = "left",
  verticalAlign = "top",
  baseline = 32L,
  version = 1,
  versionNonce = 12345
)

Arguments

x

x position of glyph in px

y

y position of glyph in px

width

glyph width in px

height

glyph height in px

angle

in radians

strokeColor

HTML colour code

backgroundColor

HTML colour code

fillStyle

"solid" or "hachure" or "cross-hatch"

strokeWidth

1 or 2 or 4

strokeStyle

"solid" or "dashed" or "dotted"

roughness

degree of wiggliness, 0 or 1 or 2

opacity

0 to 100

groupIds

list of strings indicating groupings

strokeSharpness

"sharp" or "round"

isDeleted

tag for collaboration

boundElementIds

list of IDs used for connectors

text

text string

fontSize

in pts

fontFamily

1, 2, 3 (FG_Virgil,Cascadia,?)

textAlign

"left", "center", "right"

verticalAlign

"bottom", "center", "top"

baseline

offset in pts?

version

of glyph for collaboration

versionNonce

of glyph for collaboration