fenfire-dev
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [Fenfire-dev] Positioning transclusion buois


From: Matti Katila
Subject: Re: [Fenfire-dev] Positioning transclusion buois
Date: Wed, 10 Dec 2003 11:24:36 +0200 (EET)

On Fri, 5 Dec 2003, Asko Soukka wrote:

> Hi,
> 
> Is it so that a buoy is optimally positioned for the top left corner
> (0,0) of a transclusion? I mean that, when I move to the top left
> corner of the transclusion, the buoy is shown just on the right
> side. Althought, the connector line is drawn from the center of the
> transclusion to the buoy.

For example this patch fixes the problem.

--- orig/org/fenfire/view/buoy/TransclusionConnector.java
+++ mod/org/fenfire/view/buoy/TransclusionConnector.java
@@ -169,6 +169,19 @@
                int culledCS = m.getCS(cs, "CULL");
                if(culledCS > 0) cs = culledCS;
 
+                org.nongnu.libvob.lava.placeable.Placeable p = 
+                    
(org.nongnu.libvob.lava.placeable.Placeable)nodeView.f(
+                        fen.constgraph, node);
+                float w,h;
+                if(p != null) {
+                    w = p.getWidth();
+                    h = p.getHeight();
+                } else {
+                    w = 0;
+                    h = 0;
+                }
+                cs = vs.translateCS(cs, "shift to center", w/2.0f, 
h/2.0f);
+


   -Matti





reply via email to

[Prev in Thread] Current Thread [Next in Thread]