|
Re: Connections stop one pixel short of node [message #198755 is a reply to message #198714] |
Wed, 12 October 2005 17:14 |
Eclipse User |
|
|
|
Originally posted by: none.us.ibm.com
Does this happen at the source/origin of the connection, or only at the
target end?
"Felix L J Mayer" <felix.mayer@objectaid.com> wrote in message
news:dijei3$8i1$1@news.eclipse.org...
> Since release 3.1, I have seen a strange anomaly in my diagrams:
> connections that touch my node on the top or left side stop one pixel
> short of the node itself. This does not happen if there is a decoration on
> that connection end or if the connection has a very shallow angle to the
> node. What could be the cause of this?
>
|
|
|
|
Re: Connections stop one pixel short of node [message #198809 is a reply to message #198794] |
Wed, 12 October 2005 17:35 |
Eclipse User |
|
|
|
Originally posted by: none.us.ibm.com
On win32, we used to paint an extra dot at the end of the connection. This
was done in SWTGraphics#drawPolyline(PointList).
SWT fixed this inconsistency and we removed our workaround.
You should try reproducing in the logic example, and/or post a snippet
showing the problem.
"Felix L J Mayer" <felix.mayer@objectaid.com> wrote in message
news:dijh3p$btd$1@news.eclipse.org...
> It does happen at the source of the connection, but I cannot immediately
> day if it happens at the target also because at the target there is
> usually a decoration. Also I saw that one connection which did not have
> any decoration did touch the source and target nodes properly without the
> 1-pixel gap. And once the angle between the top of the node and the
> connection becomes 45 degrees or less, the gap vanishes also.
> Do you need me to look for the target end specifically?
>
> "Randy Hudson" <none@us.ibm.com> wrote in message
> news:dijg9e$as1$1@news.eclipse.org...
>> Does this happen at the source/origin of the connection, or only at the
>> target end?
>>
>> "Felix L J Mayer" <felix.mayer@objectaid.com> wrote in message
>> news:dijei3$8i1$1@news.eclipse.org...
>>> Since release 3.1, I have seen a strange anomaly in my diagrams:
>>> connections that touch my node on the top or left side stop one pixel
>>> short of the node itself. This does not happen if there is a decoration
>>> on that connection end or if the connection has a very shallow angle to
>>> the node. What could be the cause of this?
>>>
>>
>>
>
>
|
|
|
|
Re: Connections stop one pixel short of node [message #199339 is a reply to message #199130] |
Fri, 14 October 2005 14:46 |
Eclipse User |
|
|
|
Originally posted by: none.us.ibm.com
Are you sure that the node to which the connection is attached is entirely
filling its own bounds?
Which connection anchor class are you using?
Here is what I am referring to by a Snippet:
public class ConnectionSnippet {
public static void main(String[] args) {
Display d = new Display();
Shell shell = new Shell(d);
shell.setLayout(new FillLayout());
FigureCanvas canvas = new FigureCanvas(shell);
Figure connectionPanel = new Figure();
RectangleFigure
node1 = new RectangleFigure(),
node2 = new RectangleFigure();
node1.setBackgroundColor(ColorConstants.red);
node1.setOutline(false);
node1.setBounds(new Rectangle(40,40, 50, 30));
node2.setBackgroundColor(ColorConstants.blue);
node2.setOutline(false);
node2.setBounds(new Rectangle(100, 140, 50, 30));
PolylineConnection conn = new PolylineConnection();
conn.setSourceAnchor(new ChopboxAnchor(node1));
conn.setTargetAnchor(new ChopboxAnchor(node2));
connectionPanel.add(node1);
connectionPanel.add(node2);
connectionPanel.add(conn);
canvas.setContents(connectionPanel);
shell.open();
while (!shell.isDisposed())
while (!d.readAndDispatch())
d.sleep();
}
}
|
|
|
Re: Connections stop one pixel short of node [message #199371 is a reply to message #199339] |
Fri, 14 October 2005 15:19 |
Felix L J Mayer Messages: 202 Registered: July 2009 |
Senior Member |
|
|
Well, I hope I didn't make a stupid mistake somewhere, but here is my little
project.
I run it in the debugger as an Eclipse application, all you need is a file
with the extension .diagram to open the editor.
There are 3 hardcoded nodes with connections between them. When the diagram
opens, you should see a gap in the connection between Node3 and Node1 where
it goes into Node3, which is the source. The same is true for the connection
from Node2 to Node3. There is no gap in the connection from Node1 to Node2
because it leaves Node1 at an angle where the gap doesn't occur. When you
move Node2 to the left, the gap in the connection from Node2 to Node3
disappears when the angle becomes 45 degrees or when Node2 is directly
underneath Node1. You have to deselect Node2 to see the effect.
"Randy Hudson" <none@us.ibm.com> wrote in message
news:diogcm$eqp$1@news.eclipse.org...
> Are you sure that the node to which the connection is attached is entirely
> filling its own bounds?
> Which connection anchor class are you using?
>
> Here is what I am referring to by a Snippet:
>
> public class ConnectionSnippet {
>
> public static void main(String[] args) {
>
> Display d = new Display();
> Shell shell = new Shell(d);
> shell.setLayout(new FillLayout());
> FigureCanvas canvas = new FigureCanvas(shell);
>
> Figure connectionPanel = new Figure();
>
> RectangleFigure
> node1 = new RectangleFigure(),
> node2 = new RectangleFigure();
> node1.setBackgroundColor(ColorConstants.red);
> node1.setOutline(false);
> node1.setBounds(new Rectangle(40,40, 50, 30));
> node2.setBackgroundColor(ColorConstants.blue);
> node2.setOutline(false);
> node2.setBounds(new Rectangle(100, 140, 50, 30));
>
> PolylineConnection conn = new PolylineConnection();
> conn.setSourceAnchor(new ChopboxAnchor(node1));
> conn.setTargetAnchor(new ChopboxAnchor(node2));
> connectionPanel.add(node1);
> connectionPanel.add(node2);
> connectionPanel.add(conn);
>
> canvas.setContents(connectionPanel);
>
> shell.open();
> while (!shell.isDisposed())
> while (!d.readAndDispatch())
> d.sleep();
>
> }
>
> }
>
>
-
Attachment: testGEF.zip
(Size: 89.55KB, Downloaded 130 times)
|
|
|
Re: Connections stop one pixel short of node [message #200147 is a reply to message #199371] |
Thu, 20 October 2005 20:39 |
Felix L J Mayer Messages: 202 Registered: July 2009 |
Senior Member |
|
|
Were you able to reproduce the problem with this?
"Felix L J Mayer" <felix.mayer@objectaid.com> wrote in message
news:dioia2$hhi$1@news.eclipse.org...
> Well, I hope I didn't make a stupid mistake somewhere, but here is my
> little project.
> I run it in the debugger as an Eclipse application, all you need is a file
> with the extension .diagram to open the editor.
>
> There are 3 hardcoded nodes with connections between them. When the
> diagram opens, you should see a gap in the connection between Node3 and
> Node1 where it goes into Node3, which is the source. The same is true for
> the connection from Node2 to Node3. There is no gap in the connection from
> Node1 to Node2 because it leaves Node1 at an angle where the gap doesn't
> occur. When you move Node2 to the left, the gap in the connection from
> Node2 to Node3 disappears when the angle becomes 45 degrees or when Node2
> is directly underneath Node1. You have to deselect Node2 to see the
> effect.
>
> "Randy Hudson" <none@us.ibm.com> wrote in message
> news:diogcm$eqp$1@news.eclipse.org...
>> Are you sure that the node to which the connection is attached is
>> entirely
>> filling its own bounds?
>> Which connection anchor class are you using?
>>
>> Here is what I am referring to by a Snippet:
>>
>> public class ConnectionSnippet {
>>
>> public static void main(String[] args) {
>>
>> Display d = new Display();
>> Shell shell = new Shell(d);
>> shell.setLayout(new FillLayout());
>> FigureCanvas canvas = new FigureCanvas(shell);
>>
>> Figure connectionPanel = new Figure();
>>
>> RectangleFigure
>> node1 = new RectangleFigure(),
>> node2 = new RectangleFigure();
>> node1.setBackgroundColor(ColorConstants.red);
>> node1.setOutline(false);
>> node1.setBounds(new Rectangle(40,40, 50, 30));
>> node2.setBackgroundColor(ColorConstants.blue);
>> node2.setOutline(false);
>> node2.setBounds(new Rectangle(100, 140, 50, 30));
>>
>> PolylineConnection conn = new PolylineConnection();
>> conn.setSourceAnchor(new ChopboxAnchor(node1));
>> conn.setTargetAnchor(new ChopboxAnchor(node2));
>> connectionPanel.add(node1);
>> connectionPanel.add(node2);
>> connectionPanel.add(conn);
>>
>> canvas.setContents(connectionPanel);
>>
>> shell.open();
>> while (!shell.isDisposed())
>> while (!d.readAndDispatch())
>> d.sleep();
>>
>> }
>>
>> }
>>
>>
>
>
>
|
|
|
|
|
|
|
Powered by
FUDForum. Page generated in 0.05750 seconds