create_shape_style {bpmnVisualizationR}R Documentation

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
)

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.

Value

A list representing the style for the BPMN shape.

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.

Note

Opacity properties

Warning: stroke_width property

Changing the stroke width of Activities may be misleading, as the default stroke widths have a meaning according to the 'BPMN' Specification.
For example, updating the stroke width of a task using the same value as the default stroke width of a Call Activity can be confusing.
In this case, you should also change another property, such as the stroke color, to allow the user to differentiate between them.

See Also

create_gradient_fill

Examples

# 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"
)

[Package bpmnVisualizationR version 0.5.0 Index]