R/RcppExports.R

Defines functions qrencode_raw qrencode_svg

Documented in qrencode_raw qrencode_svg

# Generated by using Rcpp::compileAttributes() -> do not edit by hand
# Generator token: 10BE3573-1514-4C36-9D1C-5A225CD40393

#' @md
#' @title Encodes a string as a QR code
#' @description Encodes a string as a QR coder
#' @param to_encode character string to encode
#' @param version version of the symbol. If `0`, the library chooses the
#'        minimum version for the given input data.
#' @param level error correction level (`0` - `3`, lowest to highest)
#' @param hint tell the library how Japanese Kanji characters should be
#'        encoded:
#' - If "`3`", the library assumes that the given string contains Shift-JIS characters
#'   and encodes them in Kanji-mode.
#' - If "`2`" is given, all of non-alphanumerical characters will be encoded as is.
#'   If you want to embed UTF-8 string, choose this. Trying to encode UTF-8 with modes will cause an error.
#' - "`0`" is "numeric mode",
#' - "`1`" is "alphanumeric mode"
#' - "`5`" is "ECI mode".
#' @param caseinsensitive case-sensitive(\code{1}) or not(\code{0}).
#' @seealso \url{http://www.qrcode.com/en/about/version.html}
#' @export
qrencode_raw <- function(to_encode, version = 0L, level = 0L, hint = 2L, caseinsensitive = 1L) {
    .Call(`_qrencoder_qrencode_raw`, to_encode, version, level, hint, caseinsensitive)
}

#' @md
#' @title Return a QR encoded string as an svg string
#' @description Encodes a string as a QR coder
#' @param to_encode character string to encode
#' @param version version of the symbol. If `0`, the library chooses the
#'        minimum version for the given input data.
#' @param level error correction level (`0` - `3`, lowest to highest)
#' @param hint tell the library how Japanese Kanji characters should be
#'        encoded:
#' - If "`3`", the library assumes that the given string contains Shift-JIS characters
#'   and encodes them in Kanji-mode.
#' - If "`2`" is given, all of non-alphanumerical characters will be encoded as is.
#'   If you want to embed UTF-8 string, choose this. Trying to encode UTF-8 with modes will cause an error.
#' - "`0`" is "numeric mode",
#' - "`1" is "alphanumeric mode"
#' - "`5`" is "ECI mode".
#' @param caseinsensitive case-sensitive(`1`) or not(`0`).
#' @param margin width of the marginsl default is 4
#' @param size  module size in dots (pixels); default is 3
#' @param dpi resolution; default = 72
#' @seealso \url{http://www.qrcode.com/en/about/version.html}
#' @export
qrencode_svg <- function(to_encode, version = 0L, level = 0L, hint = 2L, caseinsensitive = 1L, margin = 0L, size = 3L, dpi = 72L) {
    .Call(`_qrencoder_qrencode_svg`, to_encode, version, level, hint, caseinsensitive, margin, size, dpi)
}
hrbrmstr/qrencoder documentation built on May 17, 2019, 5:12 p.m.