# Transforms

## Activity - toggle, toggleHidden, switch
``` plantuml
@startuml
!define STYLE_RG
!includeurl https://raw.githubusercontent.com/raumgleiter/PlantUML-Style/master/PlantUML_Style.puml
!include <tupadr3/common>
!include <tupadr3/font-awesome/rocket>
!include <tupadr3/font-awesome-5/user>

' All Skinparams: https://plantuml-documentation.readthedocs.io/en/latest/formatting/all-skin-params.html
' skinparam defaultTextAlignment center

' allowmixing
' skinparam ClassAttributeIconSize 0.1
' skinparam CircledCharacterRadius 0
' skinparam CircledCharacterFontSize 0

'-----------------------------------------------------------------------------

left to right direction

'******************************************************************************
state LEGEND {
  state INIT_ONLY <<Green>>
  state UPDATE <<Orange>>
}

state imageGenerator {
  state composeLayeredImageForScene <<Green>>
  state composeLayeredImage <<Orange>>
  state composeLayeredImage2 : neverUsed
}

state eventHandler {
  state onClickStart <<Green>>
  state onClickOption <<Orange>>

  state updateGroupVisibility {
    state toggle
    state toggleHidden
    state switch
  }
  state updateGroupVisibility : applies a transform from parent to one child
  state updateGroupVisibility : ---
  state updateGroupVisibility : transform: the applied transform
  state updateGroupVisibility : parent: the window?
  state updateGroupVisibility : child: a group of the transforms data field
  state updateGroupVisibility : target: the option of the transforms resource field

  state setOptionValues <<Orange>>
  state setSelectionsForConfig <<Green>>
  state retrieveTransform <<Green>>
  state retrieveTransform : splits data of transforms into children

  state transformOthers <<Orange>>
  state transformOthers : find the relevant transforms

  onClickOption --> setOptionValues

  transformOthers --> updateGroupVisibility
  retrieveTransform --> updateGroupVisibility
  onClickStart --> setSelectionsForConfig

}


composeLayeredImageForScene --> retrieveTransform
setSelectionsForConfig --> composeLayeredImageForScene

composeLayeredImage --> transformOthers
composeLayeredImage2 --> transformOthers
setOptionValues --> composeLayeredImage
setSelectionsForConfig --> setOptionValues

'-----------------------------------------------------------------------------
'-----------------------------------------------------------------------------

'******************************************************************************

@enduml
```

## Activity - append
``` plantuml
@startuml
!define STYLE_RG
!includeurl https://raw.githubusercontent.com/raumgleiter/PlantUML-Style/master/PlantUML_Style.puml
!include <tupadr3/common>
!include <tupadr3/font-awesome/rocket>
!include <tupadr3/font-awesome-5/user>

' All Skinparams: https://plantuml-documentation.readthedocs.io/en/latest/formatting/all-skin-params.html
' skinparam defaultTextAlignment center

' allowmixing
' skinparam ClassAttributeIconSize 0.1
' skinparam CircledCharacterRadius 0
' skinparam CircledCharacterFontSize 0

'-----------------------------------------------------------------------------

left to right direction

'******************************************************************************
state LEGEND {
  state INIT_ONLY <<Green>>
  state UPDATE <<Orange>>
}

state imageGenerator {
  state composeLayeredImageForScene
}

state eventHandler {
  state getTransformedImagePath {
    state append
  }

  composeLayeredImageForScene --> getTransformedImagePath
  retrieveTransform --> applyOptionOverride
}



'-----------------------------------------------------------------------------
'-----------------------------------------------------------------------------

'******************************************************************************

@enduml
```
