Problem with pens and compound array

I am having trouble with my pens.
Using the Minimal App sample. I created three nodes with three links. Each link had a New pen created. Each pen had a compound array set as follows:
link 1 (first - second) = { 0.0 , 0.5, 0.9, 1}
link 2 (first - third) = {0.0, 0.2, 0.4, 0.6, 0.8, 1.0}
link 3 9second - third) = {0.0, 0.2, 0.4, 0.6, 0.8, 1.0}
For link 1 & 2 I used a pen color of Blue, and link 3 I used Green. It appears that after creating the pen for the link 1, the second pen for link 2 was ignored and it re-used the first pen.
Any ideas why would be grateful considered! I have created this by amending the sub new in the minimal app as follows:
Public Sub New() MyBase.New() Me.Text = "Minimal GoDiagram App" ' create a Go view (a RichControl) and add to the form Dim myView As GoView = New GoView() myView.Dock = DockStyle.Fill Me.Controls.Add(myView) ' create two nodes for fun... Dim node1 As GoBasicNode = New GoBasicNode() ' specify position, label and color node1.Location = New PointF(100, 100) node1.Text = "first" node1.Editable = True ' first node is editable with F2 only node1.Brush = Brushes.Blue ' add to the document, not to the view myView.Document.Add(node1) Dim node2 As GoBasicNode = New GoBasicNode() node2.Location = New PointF(200, 100) node2.Text = "second" node2.Label.Editable = True ' second node is editable by clicking only node2.Brush = Brushes.Magenta myView.Document.Add(node2) Dim node3 As GoBasicNode = New GoBasicNode() node3.Location = New PointF(200, 200) node3.Text = "third" node3.Label.Editable = True ' second node is editable by clicking only node3.Brush = Brushes.Magenta myView.Document.Add(node3) Dim link1 As GoLink = New GoLink link1.FromPort = node1.Port link1.ToPort = node2.Port Dim pen1 As New Pen(Color.Blue, 10) pen1.CompoundArray = New Single() {0.0, 0.5, 0.9, 1} link1.Pen = pen1 myView.Document.Add(link1) Dim link2 As GoLink = New GoLink link2.FromPort = node1.Port link2.ToPort = node3.Port Dim pen2 As New Pen(Color.Blue, 10) pen2.CompoundArray = New Single() {0.0, 0.2, 0.4, 0.6, 0.8, 1} link2.Pen = pen2 myView.Document.Add(link2) Dim link3 As GoLink = New GoLink link3.FromPort = node2.Port link3.ToPort = node3.Port Dim pen3 As New Pen(Color.Green, 10) pen3.CompoundArray = New Single() {0.0, 0.2, 0.4, 0.6, 0.8, 1} link3.Pen = pen3 myView.Document.Add(link3) End Sub

Well, I looked through your code and didn’t see anything, so I tried it (converting to C# code…) … and I get:

which is what you're expecting, isn't it?
(I use http://www.developerfusion.com/tools/convert/csharp-to-vb/ to do quick vb / c# conversions.)

I have reproduced the same problem in c# and I get the same result as my VB output. You wouldn’t have any suggestions if this is something else outside of the go environment that causes the problem. My machine is running Vista Home Premium. The code I used was as follows:

/*
* Copyright © Northwoods Software Corporation, 1998-2007. All Rights
* Reserved.
*
* Restricted Rights: Use, duplication, or disclosure by the U.S.
* Government is subject to restrictions as set forth in subparagraph
* (c) (1) (ii) of DFARS 252.227-7013, or in FAR 52.227-19, or in FAR
* 52.227-14 Alt. III, as applicable.
*/
using System;
using System.Drawing;
using System.Windows.Forms;
using Northwoods.Go;
namespace MinimalApp {
public class MinimalApp : Form {
// constructor
public MinimalApp() {
this.Text = "Minimal GoDiagram App";
// create a Go view (a Control) and add to the form
GoView myView = new GoView();
myView.Dock = DockStyle.Fill;
this.Controls.Add(myView);
// create two nodes for fun...
GoBasicNode node1 = new GoBasicNode();
// specify position, label and color
node1.Location = new PointF(100, 100);
node1.Text = "first";
node1.Editable = true; // first node is editable with F2 only
node1.Brush = Brushes.Blue;
// add to the document, not to the view
myView.Document.Add(node1);
GoBasicNode node2 = new GoBasicNode();
node2.Location = new PointF(200, 100);
node2.Text = "second";
node2.Label.Editable = true; // second node is editable by clicking only
node2.Brush = Brushes.Magenta;
myView.Document.Add(node2);
GoBasicNode node3 = new GoBasicNode();
node3.Location = new PointF(200, 200);
node3.Text = "third";
node3.Label.Editable = true; // second node is editable by clicking only
node3.Brush = Brushes.Yellow;
myView.Document.Add(node3);
GoLink link1 = new GoLink();
link1.FromPort = node1.Port;
link1.ToPort = node2.Port;
Pen pen1 = new Pen(Color.Blue,10);
float[] sa = { 0.0F, 0.5F, 0.9F, 1.0F };
pen1.CompoundArray = sa;
link1.Pen = pen1;
myView.Document.Add(link1);
GoLink link2 = new GoLink();
link2.FromPort = node1.Port;
link2.ToPort = node3.Port;
Pen pen2 = new Pen(Color.Blue, 10);
float[] sa2 = { 0.0F, 0.2F, 0.4F, 0.6F, 0.8F, 1.0F };
pen2.CompoundArray = sa2;
link2.Pen = pen2;
myView.Document.Add(link2);
GoLink link3 = new GoLink();
link3.FromPort = node2.Port;
link3.ToPort = node3.Port;
Pen pen3 = new Pen(Color.Green, 10);
float[] sa3 = { 0.0F, 0.2F, 0.4F, 0.6F, 0.8F, 1.0F };
pen3.CompoundArray = sa3;
link3.Pen = pen3;
myView.Document.Add(link3);

}
[STAThread]
public static void Main(string[] args) {
Application.Run(new MinimalApp());
}
}
}

I was skeptical that is was language. Not sure how it could be a Vista thing either, but we’ll look into it.

I copied my .exe to a Vista system, and it looks like my screenshot above.

Jake
Have you been able to replicate this at all!
I have managed to avoid the issue by making sure that when I use a pen with a differant compound array I make it a pixel wider and therefore this makes the system refresh the pen properly!
I am using version 2.6.2.2
(I have finally managed to renew my subscription!!! )

No, we haven’t been able to reproduce the problem. I’m really hesitant to blame video drivers on problems, but if you could try on different video controlers or check driver versions, that would be helpful.

Jake<?:namespace prefix = o ns = "urn:schemas-microsoft-com:office:office" />

I have run this in VS Studio 2005 on my laptop (still Vista) which still shows the wrong pen strokes! As well as running the compiled app on a windows XP home machine - same wrong results!

The Northwoods component I am using is 2.6.2.2

Please note that this is not critical for me at the moment! I have got around it by changing the widths.

The source code is here: www.shantisoft.com/MinimalApp.zip

Jake

My computer died, and after rebuilding it all I downloaded the latest version of Go.Win (ver 3.0.2.2) instea\d o fusing the existing version and this is now not a problem. So I guess it is just an issue in version 2.6.2.2 and earlier!
Sorry for the time wasted!