]> gerrit.simantics Code Review - simantics/district.git/commit
First prototype of HSV color space based dynamic DN element coloring 41/2341/1
authorTuukka Lehtonen <tuukka.lehtonen@semantum.fi>
Sat, 20 Oct 2018 22:59:48 +0000 (01:59 +0300)
committerTuukka Lehtonen <tuukka.lehtonen@semantum.fi>
Sat, 20 Oct 2018 22:59:48 +0000 (01:59 +0300)
commit2cf7ae447c79df6240b67fd3ca4f0338bdae8c00
treecd4605a8444a0be169d2ca75f302e42407037a08
parent15c720d419c1139942790dc12acb6936e75b1568
First prototype of HSV color space based dynamic DN element coloring

Both VertexNode and EdgeNode support a new property 'dynamicColor' that
can be set to either a Color or null.

DN.Diagram has three new properties:
* Element Color Hue
* Element Color Saturation
* Element Color Brightness Function

where the first two are constants and the last one is a (Resource ->
<ReadGraph> Double) function that is expected to return a value in [0,1]
which is then used to get the final element color from the HSV gradient.
The Resource argument is the DN diagram element.

The function allows users to define any complex functions in SCLMain to
perform the evaluation for the DN element.

gitlab #2

Change-Id: Ia8dbe0df9400242670949da91e373d68cf7ff758
15 files changed:
org.simantics.district.network.ontology/graph/DistrictNetwork.pgraph
org.simantics.district.network.ontology/graph/DistrictNetworkDiagramSettings.pgraph
org.simantics.district.network.ontology/graph/DistrictNetworkProfiles.pgraph
org.simantics.district.network.ontology/scl/Simantics/District/SCLMain.scl
org.simantics.district.network.ontology/src/org/simantics/district/network/ontology/DistrictNetworkResource.java
org.simantics.district.network.ui/src/org/simantics/district/network/ui/function/Functions.java
org.simantics.district.network.ui/src/org/simantics/district/network/ui/nodes/DistrictNetworkEdgeNode.java
org.simantics.district.network.ui/src/org/simantics/district/network/ui/nodes/DistrictNetworkVertexNode.java
org.simantics.district.network/adapters.xml
org.simantics.district.network/scl/Simantics/District.scl
org.simantics.district.network/src/org/simantics/district/network/profile/ColorGradient.java [new file with mode: 0644]
org.simantics.district.network/src/org/simantics/district/network/profile/Colors.java [new file with mode: 0644]
org.simantics.district.network/src/org/simantics/district/network/profile/DNElementColorStyle.java [new file with mode: 0644]
org.simantics.district.network/src/org/simantics/district/network/profile/DiagramSettings.java
org.simantics.district.network/src/org/simantics/district/network/profile/DiagramSettingsRequest.java