Learn R Programming

bpmnVisualizationR (version 0.5.0)

create_shape_style: Create the style for BPMN shape

Description

Use this function to create the correct style structure for the shape.

Usage

create_shape_style(
  elementIds,
  stroke_color = NULL,
  stroke_width = NULL,
  stroke_opacity = NULL,
  font_color = NULL,
  font_family = NULL,
  font_size = NULL,
  font_bold = NULL,
  font_italic = NULL,
  font_strike_through = NULL,
  font_underline = NULL,
  font_opacity = NULL,
  opacity = NULL,
  fill_color = NULL,
  fill_opacity = NULL
)

Value

A list representing the style for the BPMN shape.

Arguments

elementIds

The IDs of the BPMN elements to style.

stroke_color

The stroke color for the element. It can be any HTML color name or HEX code, or special keywords.

stroke_width

The stroke width for the element, in pixels (1 to 50).

  • If the set value is less than 1, the used value is 1.

  • If the set value is greater than 50, the used value is 50.

  • To hide the stroke, set the stroke_color property to none.

stroke_opacity

The stroke opacity for the element, ranging from 0 to 100.

font_color

The font color for the element. It can be any HTML color name or HEX code, or special keywords.

font_family

The font family for the element.

font_size

The font size for the element, in pixels.

font_bold

Should the font be bold? (default: FALSE)

font_italic

Should the font be italic? (default: FALSE)

font_strike_through

Should the font have a strike-through style? (default: FALSE)

font_underline

Should the font be underlined? (default: FALSE)

font_opacity

The font opacity for the element, ranging from 0 to 100.

opacity

The opacity for the element, ranging from 0 to 100.

fill_color

The fill color for the shape It can be any HTML color name or HEX code, special keywords, or a gradient create with create_gradient_fill.

fill_opacity

The fill opacity for the shape, ranging from 0 to 100.

Special keywords

default
  • This keyword allows you to reset a style property of the BPMN element to its initial value.

  • When applied to color properties, it bypasses the color specified in the 'BPMN' source if 'BPMN in Color' support is enabled. Instead, it uses the color defined in the default style of the 'BPMN' element..

inherit

Applies the value from the immediate parent element.

none

No color (used to hide strokes). Not available for font_color.

swimlane

Applies the value from the nearest parent element with type ShapeBpmnElementKind.LANE or ShapeBpmnElementKind.POOL.

See Also

create_gradient_fill

Examples

Run this code
# Create a style with a blue stroke, red font, and green fill color.
shape_style <- create_shape_style(
  elementIds = list('id_1', 'id_2'),
  stroke_color = "blue",
  stroke_width = 2,
  font_color = "red",
  fill_color = "green"
)

Run the code above in your browser using DataLab