From 8836b5fd99a3e97234153420870ea253a35eb593 Mon Sep 17 00:00:00 2001 From: Marko Luukkainen Date: Wed, 16 Sep 2020 18:44:10 +0300 Subject: [PATCH] Change G2D.Color specification to RGBA (was BGRA) Pretty much all the implementation assumes RGBA. Connection colors defined in ontologies must be fixed. gitlab #606 Change-Id: I62fa43c62421db66e6e18b34202be0ced0be6a24 --- .../simantics/diagram/connection/ConnectionVisuals.java | 4 ++-- .../graph/ConnectionPoints.pgraph | 8 ++++---- bundles/org.simantics.g2d.ontology/graph/G2D.pgraph | 2 +- 3 files changed, 7 insertions(+), 7 deletions(-) diff --git a/bundles/org.simantics.diagram/src/org/simantics/diagram/connection/ConnectionVisuals.java b/bundles/org.simantics.diagram/src/org/simantics/diagram/connection/ConnectionVisuals.java index 802881e16..d89c07c4f 100644 --- a/bundles/org.simantics.diagram/src/org/simantics/diagram/connection/ConnectionVisuals.java +++ b/bundles/org.simantics.diagram/src/org/simantics/diagram/connection/ConnectionVisuals.java @@ -46,8 +46,8 @@ public class ConnectionVisuals { if (color == null) return null; if (color.length == 3) - return new Color(color[2], color[1], color[0]); - return new Color(color[2], color[1], color[0], color[3]); + return new Color(color[0], color[1], color[2]); + return new Color(color[0], color[1], color[2], color[3]); } @Override diff --git a/bundles/org.simantics.document.base.ontology/graph/ConnectionPoints.pgraph b/bundles/org.simantics.document.base.ontology/graph/ConnectionPoints.pgraph index 73b795343..01d730c0c 100644 --- a/bundles/org.simantics.document.base.ontology/graph/ConnectionPoints.pgraph +++ b/bundles/org.simantics.document.base.ontology/graph/ConnectionPoints.pgraph @@ -14,7 +14,7 @@ DOC.Document.ChildRelation