Page Index Toggle Pages: 1 Send TopicPrint
Hot Topic (More than 10 Replies) Overlapping dashed lines may appear as solid (Read 7272 times)
Peter
YaBB Newbies
*
Offline


I love YaBB 1G - SP1!

Posts: 24
Joined: Nov 14th, 2005
Overlapping dashed lines may appear as solid
Jan 12th, 2006 at 2:40pm
Print Post  
Hi,

I am having tough time getting two dashed lines, that are drawn on top of one another, appear properly on the diagram. Ideally, the appearance of overlapping dashed lines should still be dashed, but it doesn't seem to happen and sometimes the line may appear as solid or only partially dashed.
Is there a way to work around this?
Thanks
  
Back to top
 
IP Logged
 
Stoyo
God Member
*****
Offline


MindFusion support

Posts: 13230
Joined: Jul 20th, 2005
Re: Overlapping dashed lines may appear as solid
Reply #1 - Jan 12th, 2006 at 3:06pm
Print Post  
Hi,

That could be fixed by setting the Pen.DashOffset property so the dashes start from the same pixel on the screen. But probably that will help only when the lines stay fixed, it will be hard to coordinate the DashOffsets say while users draw dashed arrows.

Stoyan
  
Back to top
 
IP Logged
 
Peter
YaBB Newbies
*
Offline


I love YaBB 1G - SP1!

Posts: 24
Joined: Nov 14th, 2005
Re: Overlapping dashed lines may appear as solid
Reply #2 - Jan 12th, 2006 at 3:27pm
Print Post  
Setting the DashOffset does not seem to have any effect. Do I need to create a new instance of the Pen class and assign it to the Pen property of the Arrow object?
« Last Edit: Jan 12th, 2006 at 4:47pm by Peter »  
Back to top
 
IP Logged
 
Stoyo
God Member
*****
Offline


MindFusion support

Posts: 13230
Joined: Jul 20th, 2005
Re: Overlapping dashed lines may appear as solid
Reply #3 - Jan 12th, 2006 at 5:38pm
Print Post  
You might have to call Invalidate, because changing the Pen properties does not automatically redraws an object:

    Private Sub Button1_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button1.Click
       flcMain.Arrows(0).Pen.DashOffset += 0.5
       flcMain.invalidate()
    End Sub
  
Back to top
 
IP Logged
 
Peter
YaBB Newbies
*
Offline


I love YaBB 1G - SP1!

Posts: 24
Joined: Nov 14th, 2005
Re: Overlapping dashed lines may appear as solid
Reply #4 - Jan 12th, 2006 at 6:44pm
Print Post  
Nope, still no luck.
I am using the version 4.0.2.20026 of the FlowChart control, and .NET runtime v1.1.4322.

The saved xml seems correct, ie:

     <Pen>
       <Color>#FF000000</Color>
       <DashOffset>1</DashOffset>
       <DashStyle>Dash</DashStyle>
       <LineJoint>Miter</LineJoint>
       <MiterLimit>0</MiterLimit>
       <Width>0</Width>
     </Pen>

     <Pen>
       <Color>#FF000000</Color>
       <DashOffset>0.5</DashOffset>
       <DashStyle>Dash</DashStyle>
       <LineJoint>Miter</LineJoint>
       <MiterLimit>0</MiterLimit>
       <Width>0</Width>
     </Pen>
  
Back to top
 
IP Logged
 
Stoyo
God Member
*****
Offline


MindFusion support

Posts: 13230
Joined: Jul 20th, 2005
Re: Overlapping dashed lines may appear as solid
Reply #5 - Jan 12th, 2006 at 6:57pm
Print Post  
what measure units are you using ? clicking several times the button with the code above shifts the dashes on my machine, have you tried that on yours ?
  
Back to top
 
IP Logged
 
Peter
YaBB Newbies
*
Offline


I love YaBB 1G - SP1!

Posts: 24
Joined: Nov 14th, 2005
Re: Overlapping dashed lines may appear as solid
Reply #6 - Jan 12th, 2006 at 6:58pm
Print Post  
I am using millimeters.
  
Back to top
 
IP Logged
 
Stoyo
God Member
*****
Offline


MindFusion support

Posts: 13230
Joined: Jul 20th, 2005
Re: Overlapping dashed lines may appear as solid
Reply #7 - Jan 12th, 2006 at 7:14pm
Print Post  
what kind of object you are changing the pen of ?
  
Back to top
 
IP Logged
 
Peter
YaBB Newbies
*
Offline


I love YaBB 1G - SP1!

Posts: 24
Joined: Nov 14th, 2005
Re: Overlapping dashed lines may appear as solid
Reply #8 - Jan 12th, 2006 at 7:15pm
Print Post  
An arrow object. To test the problem, I have created a new solution with a flowchart control, two boxes and an arrow connecting them.

==========
Private Sub Form1_Load(ByVal sender As Object, ByVal e As System.EventArgs) Handles MyBase.Load
Dim b As New MindFusion.FlowChartX.Box(Me.FlowChart1)
b.BoundingRect = New RectangleF(10, 10, 40, 25)
Me.FlowChart1.Add(b)

Dim b1 As New MindFusion.FlowChartX.Box(Me.FlowChart1)
b1.BoundingRect = New RectangleF(10, 50, 40, 25)
Me.FlowChart1.Add(b1)

Dim arrow As MindFusion.FlowChartX.Arrow = Me.FlowChart1.CreateArrow(b, b1)
arrow.Style = MindFusion.FlowChartX.ArrowStyle.Cascading

arrow.PenDashStyle = Drawing2D.DashStyle.Dash


End Sub

Private Sub Button1_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button1.Click
Me.FlowChart1.Arrows(0).Pen.DashOffset += 0.5
Me.FlowChart1.Invalidate()
End Sub

=========

Cllicking on the button does not seem to have any effect whatsoever. Am I doing something wrong here?
  
Back to top
 
IP Logged
 
Stoyo
God Member
*****
Offline


MindFusion support

Posts: 13230
Joined: Jul 20th, 2005
Re: Overlapping dashed lines may appear as solid
Reply #9 - Jan 12th, 2006 at 7:27pm
Print Post  
Can you email me the diagram containing that arrow so I test it with the same settings as yours?
  
Back to top
 
IP Logged
 
Stoyo
God Member
*****
Offline


MindFusion support

Posts: 13230
Joined: Jul 20th, 2005
Re: Overlapping dashed lines may appear as solid
Reply #10 - Jan 12th, 2006 at 7:33pm
Print Post  
it does not have an effect on my PC too when the pen width == 0, can you try that with width > 0 ?
  
Back to top
 
IP Logged
 
Peter
YaBB Newbies
*
Offline


I love YaBB 1G - SP1!

Posts: 24
Joined: Nov 14th, 2005
Re: Overlapping dashed lines may appear as solid
Reply #11 - Jan 12th, 2006 at 7:36pm
Print Post  
It works with PenWidth >= 1. Is there a way to make it work with PenWidth = 0?
  
Back to top
 
IP Logged
 
Stoyo
God Member
*****
Offline


MindFusion support

Posts: 13230
Joined: Jul 20th, 2005
Re: Overlapping dashed lines may appear as solid
Reply #12 - Jan 12th, 2006 at 7:46pm
Print Post  
It works with values in the (0,1] interval too, however it is a little hard to see the effect with antialiasing enabled.

Still the dash offset does not seem to have any effect when pen.Width is 0. I am afraid the MindFusion.Pen merely wraps the System.Graphics.Pen, so we cannot do much about that.
  
Back to top
 
IP Logged
 
Peter
YaBB Newbies
*
Offline


I love YaBB 1G - SP1!

Posts: 24
Joined: Nov 14th, 2005
Re: Overlapping dashed lines may appear as solid
Reply #13 - Jan 12th, 2006 at 8:48pm
Print Post  
Thanks for the help.
  
Back to top
 
IP Logged
 
Page Index Toggle Pages: 1
Send TopicPrint