function awsGroupToSubgraphAtts()

in packages/cdk-graph-plugin-diagram/src/internal/graphviz/theme/index.ts [430:454]


function awsGroupToSubgraphAtts(
  group: aws_arch.GroupFormat,
  ignoreStyle: boolean = false
): Dot.SubgraphAttributesObject {
  const attributes: Dot.SubgraphAttributesObject = {};

  if (!ignoreStyle) {
    if (group.borderStyle === "none") {
      attributes.style = "solid";
      attributes.penwidth = 0;
    } else {
      attributes.style = group.borderStyle;
    }
  }

  attributes.color = group.color || "transparent";
  attributes.bgcolor = group.bgcolor || "transparent";
  attributes.fillcolor = group.bgcolor || "transparent";
  attributes.pencolor = (group.borderColor || "transparent") as Dot.Color;
  if (group.color && group.color !== "transparent") {
    attributes.fontcolor = group.color as Dot.Color;
  }

  return attributes;
}