Page Index Toggle Pages: 1 Send TopicPrint
Normal Topic BpmnEndTerminate coloring (Read 1597 times)
Sim
YaBB Newbies
*
Offline


I Love MindFusion!

Posts: 10
Joined: Oct 8th, 2014
BpmnEndTerminate coloring
Oct 8th, 2014 at 10:14am
Print Post  
Hi,

I am trying to change the way my nodes are being displayed. I am running into an issue when trying to change the BpmnEndTerminate shape. I am able to change the background color as well as the border color but not the rest of the node.

My current code for changing the colors is:

Code
Select All
Node.Brush = new MindFusion.Drawing.SolidBrush(Color.White);
Node.Pen = new MindFusion.Drawing.Pen(Color.Yellow);
 



I have attached an image of the result that I'm having right now and the result I would expect. How can I achieve my expected result?
  

shapes.png (Attachment deleted)
Back to top
 
IP Logged
 
Stoyo
God Member
*****
Offline


MindFusion support

Posts: 13230
Joined: Jul 20th, 2005
Re: BpmnEndTerminate coloring
Reply #1 - Oct 8th, 2014 at 10:42am
Print Post  
Hi,

Colors of shape's filled decorations can be set only through the Shape class, and you can specify that all BpmnEndTerminate nodes should be yellow like this:

Code
Select All
var yellow = new SolidBrush(Color.Yellow);

var innerCircle = Shapes.BpmnEndTerminate.ShapeDecorations[0];
innerCircle.Brush = yellow;
innerCircle.Pen = new Pen(yellow);

var outerCircle = Shapes.BpmnEndTerminate.ShapeDecorations[1];
outerCircle.Brush = yellow;
outerCircle.Pen = new Pen(yellow); 



At this time it's not possible to set these colors to different values for different nodes, unless you clone the shape for each node (or for each color if using only a few colors, e.g. create YellowBpmnEnd, RedBpmnEnd, etc. shapes). You can also implement that using custom drawing, setting the specific colors as above from DrawNode event handler, and calling the Shape.Draw method.

I hope that helps,
Stoyan
  
Back to top
 
IP Logged
 
Sim
YaBB Newbies
*
Offline


I Love MindFusion!

Posts: 10
Joined: Oct 8th, 2014
Re: BpmnEndTerminate coloring
Reply #2 - Oct 8th, 2014 at 11:15am
Print Post  
This worked perfectly, thank you very much!
  
Back to top
 
IP Logged
 
Page Index Toggle Pages: 1
Send TopicPrint