Learn R Programming

waiter (version 0.2.5.1)

garcon: Garcon

Description

Create a garcon to animate images on the waiter.

Usage

useGarcon()

use_garcon()

Arguments

Methods


Method new()

Usage

Garcon$new(
  image,
  bg_color = "#FFFFFF",
  opacity = 0.5,
  direction = c("bt", "tb", "lr", "rl"),
  filter = NULL
)

Arguments

image

The CSS id of the image tag.

bg_color

Background overlay color in hexadecimal or RGB.

opacity

Overlay transparency.

direction

Animation direction. Possible values: `lr` (left to right), `rl` (right to left), `bt` (bottom to top), `tb` (top to bottom).

filter

Filter to apply, options are `blur`, `grayscale`, `sepia`, `hue-rotate`, `invert`, `opacity`.

Details

Initialise the garçon.

Examples

\dontrun{Garcon$new("img")$set(30)}


Method set()

Usage

Garcon$set(value)

Arguments

value

Percentage to set to.

Details

Value to set the garçon to.

Examples

\dontrun{Garcon$new("img")$set(30)}


Method inc()

Usage

Garcon$inc(value)

Arguments

value

Percentage to increase to.

Details

Value to increase the garçon to.

Examples

\dontrun{Garcon$new("img")$inc(30)}


Method reset()

Usage

Garcon$reset(value)

Arguments

value

Percentage to set to.

Details

Reset the garçon to.

Examples

\dontrun{Garcon$new("img")$set(30)$reset()}


Method destroy()

Usage

Garcon$destroy()

Details

Kill the garçon to.

Examples

\dontrun{Garcon$new("img")$set(30)$destroy()}


Method print()

Usage

Garcon$print()

Details

print the garcon


Method close()

Usage

Garcon$close()

Details

Close the garçon.

Examples

\dontrun{Garcon$new("img")$set(30)$close()}


Method clone()

The objects of this class are cloneable with this method.

Usage

Garcon$clone(deep = FALSE)

Arguments

deep

Whether to make a deep clone.

Examples

Run this code

## ------------------------------------------------
## Method `Garcon$new`
## ------------------------------------------------

if (FALSE) Garcon$new("img")$set(30)

## ------------------------------------------------
## Method `Garcon$set`
## ------------------------------------------------

if (FALSE) Garcon$new("img")$set(30)

## ------------------------------------------------
## Method `Garcon$inc`
## ------------------------------------------------

if (FALSE) Garcon$new("img")$inc(30)

## ------------------------------------------------
## Method `Garcon$reset`
## ------------------------------------------------

if (FALSE) Garcon$new("img")$set(30)$reset()

## ------------------------------------------------
## Method `Garcon$destroy`
## ------------------------------------------------

if (FALSE) Garcon$new("img")$set(30)$destroy()

## ------------------------------------------------
## Method `Garcon$close`
## ------------------------------------------------

if (FALSE) Garcon$new("img")$set(30)$close()

Run the code above in your browser using DataLab