Page Index Toggle Pages: 1 Send TopicPrint
Normal Topic How to use shape designer to do decoration ? (Read 4831 times)
chieh
Junior Member
**
Offline


I love YaBB 1G - SP1!

Posts: 64
Joined: Aug 18th, 2010
How to use shape designer to do decoration ?
Sep 8th, 2010 at 2:51pm
Print Post  
Hi,

I am using the latest trial version of netdiagram for ASP.NET V3.1.1,

How to use shape designer tool to do decoration on different shape's objects?

So is there any tutorial to fill colour into object?

Many thanks,
  
Back to top
 
IP Logged
 
Stoyo
God Member
*****
Offline


MindFusion support

Posts: 13230
Joined: Jul 20th, 2005
Re: How to use shape designer to do decoration ?
Reply #1 - Sep 8th, 2010 at 4:36pm
Print Post  
Hi,

You can right-click and select "insert decoration" or "insert filled decoration". You can set the color for a filled decoration from its own context menu. As for the whole shape, you can change its fill color by setting ShapeNode.Brush, e.g. to a MindFusion.Drawing.SolidBrush instance.

I hope that helps,
Stoyan
  
Back to top
 
IP Logged
 
chieh
Junior Member
**
Offline


I love YaBB 1G - SP1!

Posts: 64
Joined: Aug 18th, 2010
Re: How to use shape designer to do decoration ?
Reply #2 - Sep 9th, 2010 at 9:15am
Print Post  
Hi,
Thanks for your suggestion, can fill different colours on different shapes now. In terms of colour, is it possible to have fade effect for fill colour? Any ways to define two colours, for an example black and white, to have fade effect?
Many thanks
  
Back to top
 
IP Logged
 
Stoyo
God Member
*****
Offline


MindFusion support

Posts: 13230
Joined: Jul 20th, 2005
Re: How to use shape designer to do decoration ?
Reply #3 - Sep 9th, 2010 at 11:18am
Print Post  
Hi,

You can assign a LinearGradientBrush to ShapeNode.Brush or Shape.Brush by code. The designer tool only supports solid brushes at this time.

Stoyan
  
Back to top
 
IP Logged
 
chieh
Junior Member
**
Offline


I love YaBB 1G - SP1!

Posts: 64
Joined: Aug 18th, 2010
Re: How to use shape designer to do decoration ?
Reply #4 - Sep 9th, 2010 at 1:04pm
Print Post  
Hi Stoyan,
Thanks for fast response, I will change fade effect by code, however, I have a problem in text area on shape, once I defined shape’s outline and filled the colour to the shape, I cannot define text area on shape, even use it as template in web application. User cannot see what text he types, maybe ShapeDecoration’s layer cover this text area, so is there any ways to put text area in upper layer or how to solve the problem?

Above it is a simple shape for this problem:
new Shape( _
new ElementTemplate() _
{ _
new LineTemplate(0, 10, 100, 10), _
new LineTemplate(100, 10, 100, 90), _
new LineTemplate(100, 90, 0, 90), _
new LineTemplate(0, 90, 0, 10) _
}, _
Nothing, _
new ElementTemplate() _
{ _
new LineTemplate(-15, 30, 115, 30), _
new LineTemplate(115, 30, 115, 70), _
new LineTemplate(115, 70, -15, 70), _
new LineTemplate(-15, 70, -15, 30) _
}, _
FillMode.Winding,"test", _
new ShapeDecoration() _
{ _
new ShapeDecoration( _
new ElementTemplate() _
{ _
new LineTemplate(0, 10, 100, 10), _
new LineTemplate(100, 10, 100, 90), _
new LineTemplate(100, 90, 0, 90), _
new LineTemplate(0, 90, 0, 10) _
}, _
new MindFusion.Drawing.SolidBrush(Color.FromArgb(255, 128, 128, 128)), _
FillMode.Winding, _
new MindFusion.Drawing.Pen(Color.FromArgb(0, 0, 0, 0), 0.1f) _
),new ShapeDecoration( _
new ElementTemplate() _
{ _
new LineTemplate(10, 20, 90, 20), _
new LineTemplate(90, 20, 90, 80), _
new LineTemplate(90, 80, 10, 80), _
new LineTemplate(10, 80, 10, 20) _
}, _
new MindFusion.Drawing.SolidBrush(Color.FromArgb(255, 255, 255, 255)), _
FillMode.Winding, _
new MindFusion.Drawing.Pen(Color.FromArgb(0, 0, 0, 0), 0.1f) _
) _
} _
)
Many thanks
  
Back to top
 
IP Logged
 
Stoyo
God Member
*****
Offline


MindFusion support

Posts: 13230
Joined: Jul 20th, 2005
Re: How to use shape designer to do decoration ?
Reply #5 - Sep 9th, 2010 at 3:25pm
Print Post  
Hi,

Yes, it seems decorations are drawn after the text, and hide it in your case. We'll change the drawing order next week.

Stoyan
  
Back to top
 
IP Logged
 
chieh
Junior Member
**
Offline


I love YaBB 1G - SP1!

Posts: 64
Joined: Aug 18th, 2010
Re: How to use shape designer to do decoration ?
Reply #6 - Sep 9th, 2010 at 3:32pm
Print Post  
Hi again,

I defined a circle and its background is grey and it has 4 stripes in circle. The shape can been seen in shape designer perfectly, however user cannot see 4 stripes in circle on website, it is just a grey circle.Is there any solutions?

This is my shape’s definition:
new Shape( _
new ElementTemplate() _
{ _
new ArcTemplate(0, 0, 100, 100, -217.5348f, 510.1547f) _
}, _
Nothing, _
new ElementTemplate() _
{ _
new LineTemplate(100, 130, 100, 105), _
new LineTemplate(100, 105, 0, 105), _
new LineTemplate(0, 105, 0, 130), _
new LineTemplate(0, 130, 100, 130) _
}, _
FillMode.Winding,"test", _
new ShapeDecoration() _
{ _
new ShapeDecoration( _
new ElementTemplate() _
{ _
new ArcTemplate(0, 0, 100, 95, 62.10273f, 360.6555f) _
}, _
new MindFusion.Drawing.SolidBrush(Color.FromArgb(255, 128, 128, 128)), _
FillMode.Winding, _
new MindFusion.Drawing.Pen(Color.FromArgb(0, 0, 0, 0), 0.1f) _
),new ShapeDecoration( _
new ElementTemplate() _
{ _
new ArcTemplate(0, 0, 100, 100, -90.59066f, 271.748f), _
new LineTemplate(0, 48, 49, 0) _
}, _
new MindFusion.Drawing.SolidBrush(Color.FromArgb(255, 128, 128, 128)), _
FillMode.Winding, _
new MindFusion.Drawing.Pen(Color.FromArgb(0, 0, 0, 0), 0.1f) _
),new ShapeDecoration( _
new ElementTemplate() _
{ _
new LineTemplate(4, 71, 74, 6), _
new ArcTemplate(0, 0, 100, 100, -60.32692f, 214.5576f) _
}, _
new MindFusion.Drawing.SolidBrush(Color.FromArgb(255, 128, 128, 128)), _
FillMode.Winding, _
new MindFusion.Drawing.Pen(Color.FromArgb(0, 0, 0, 0), 0.1f) _
),new ShapeDecoration( _
new ElementTemplate() _
{ _
new LineTemplate(19, 89, 91, 22), _
new ArcTemplate(0, 0, 100, 100, -33.85711f, 162.0775f) _
}, _
new MindFusion.Drawing.SolidBrush(Color.FromArgb(255, 128, 128, 128)), _
FillMode.Winding, _
new MindFusion.Drawing.Pen(Color.FromArgb(0, 0, 0, 0), 0.1f) _
),new ShapeDecoration( _
new ElementTemplate() _
{ _
new ArcTemplate(0, 0, 100, 100, -5.142765f, 103.7584f), _
new LineTemplate(42, 99, 99, 45) _
}, _
new MindFusion.Drawing.SolidBrush(Color.FromArgb(255, 128, 128, 128)), _
FillMode.Winding, _
new MindFusion.Drawing.Pen(Color.FromArgb(0, 0, 0, 0), 0.1f) _
) _
} _
)

Many thanks
  
Back to top
 
IP Logged
 
Stoyo
God Member
*****
Offline


MindFusion support

Posts: 13230
Joined: Jul 20th, 2005
Re: How to use shape designer to do decoration ?
Reply #7 - Sep 10th, 2010 at 11:39am
Print Post  
Color.FromArgb(0, 0, 0, 0) is completely transparent, so if that color is for the stripes, they won't be visible. Try changing the alpha value to 255.
  
Back to top
 
IP Logged
 
Stoyo
God Member
*****
Offline


MindFusion support

Posts: 13230
Joined: Jul 20th, 2005
Re: How to use shape designer to do decoration ?
Reply #8 - Sep 15th, 2010 at 5:45pm
Print Post  
This version of the applet changes the drawing order of filled decorations and text:
https://mindfusion.eu/_beta/netdiag312_applet.zip

Let me know if you need updated .NET assemblies too (for ImageMap mode). We've implemented something like layers in ShapeNodes and will make their order customizable through the Shape class for the released version.
  
Back to top
 
IP Logged
 
chieh
Junior Member
**
Offline


I love YaBB 1G - SP1!

Posts: 64
Joined: Aug 18th, 2010
Re: How to use shape designer to do decoration ?
Reply #9 - Sep 17th, 2010 at 9:16am
Print Post  
Hi Stoyan,

I can see text area on node now, it works!!

Thanks for your latest jar.





  
Back to top
 
IP Logged
 
Page Index Toggle Pages: 1
Send TopicPrint