[Bf-blender-cvs] [1fd9485a51c] functions: set dot background color utility

Jacques Lucke noreply at git.blender.org
Tue Dec 17 13:53:46 CET 2019


Commit: 1fd9485a51c67f59dc1c4ab4ebbaeeff94bcddbe
Author: Jacques Lucke
Date:   Tue Dec 17 11:12:19 2019 +0100
Branches: functions
https://developer.blender.org/rB1fd9485a51c67f59dc1c4ab4ebbaeeff94bcddbe

set dot background color utility

===================================================================

M	source/blender/blenlib/BLI_dot_export.h

===================================================================

diff --git a/source/blender/blenlib/BLI_dot_export.h b/source/blender/blenlib/BLI_dot_export.h
index d0fa5b6fe82..cf081ec9763 100644
--- a/source/blender/blenlib/BLI_dot_export.h
+++ b/source/blender/blenlib/BLI_dot_export.h
@@ -147,6 +147,13 @@ class Node {
     this->set_attribute("shape", Attr_shape::to_string(shape));
   }
 
+  /* See https://www.graphviz.org/doc/info/attrs.html#k:color. */
+  void set_background_color(StringRef name)
+  {
+    this->set_attribute("fillcolor", name);
+    this->set_attribute("style", "filled");
+  }
+
   void export__as_id(std::stringstream &ss) const;
 
   void export__as_declaration(std::stringstream &ss) const;



More information about the Bf-blender-cvs mailing list