Changeset 2782
- Timestamp:
- 02/11/10 17:44:21 (15 years ago)
- Location:
- trunk/sources/HeuristicLab.ExtLibs/HeuristicLab.Netron/3.0.2672.12446
- Files:
-
- 3 added
- 5 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/sources/HeuristicLab.ExtLibs/HeuristicLab.Netron/3.0.2672.12446/HeuristicLab.Netron-3.0.2672.12446/Controller.cs
r2781 r2782 19 19 TextEditor.Show(); 20 20 return true; 21 } 21 } 22 23 public ILayout StandardTreeLayout { 24 get { 25 return (ILayout)this.FindActivity("Standard TreeLayout"); 26 } 27 } 22 28 } 23 29 } -
trunk/sources/HeuristicLab.ExtLibs/HeuristicLab.Netron/3.0.2672.12446/HeuristicLab.Netron-3.0.2672.12446/HeuristicLab.Netron-3.0.2672.12446.csproj
r2781 r2782 50 50 </ItemGroup> 51 51 <ItemGroup> 52 <Compile Include="NetronForm.cs"> 53 <SubType>Form</SubType> 54 </Compile> 55 <Compile Include="NetronForm.Designer.cs"> 56 <DependentUpon>NetronForm.cs</DependentUpon> 57 </Compile> 58 <Compile Include="NetronTestApplication.cs" /> 52 59 <Compile Include="NetronVisualization.cs"> 53 60 <SubType>Component</SubType> -
trunk/sources/HeuristicLab.ExtLibs/HeuristicLab.Netron/3.0.2672.12446/HeuristicLab.Netron-3.0.2672.12446/NetronVisualization.cs
r2781 r2782 13 13 [ToolboxItem(true)] 14 14 public partial class NetronVisualization : DiagramControlBase { 15 private static Size INVALID_SIZE = new Size(-1,-1); 16 private Size oldSize; 15 17 public NetronVisualization() 16 18 : base() { 17 19 InitializeComponent(); 20 this.oldSize = INVALID_SIZE; 18 21 19 22 SetStyle(ControlStyles.AllPaintingInWmPaint, true); … … 34 37 View.OnBackColorChange += new EventHandler<ColorEventArgs>(View_OnBackColorChange); 35 38 36 this.SizeChanged += new EventHandler( AlgorithmVisualization_SizeChanged);39 this.SizeChanged += new EventHandler(NetronVisualization_SizeChanged); 37 40 this.AllowDrop = true; 38 41 } 39 42 } 40 43 41 void AlgorithmVisualization_SizeChanged(object sender, EventArgs e) { 42 Size newSize = new Size((int) (this.Size.Width * this.View.Magnification.Width), 43 (int) (this.Size.Height * this.View.Magnification.Height)); 44 this.View.PageSize = newSize; 44 private void NetronVisualization_SizeChanged(object sender, EventArgs e) { 45 if (this.oldSize == INVALID_SIZE) { 46 this.View.PageSize = new Size((int)(this.Size.Width * this.Magnification.Width), (int)(this.Size.Height * this.Magnification.Height)); 47 oldSize = this.Size; 48 return; 49 } 50 51 SizeF magnificationChanges = new SizeF(); 52 magnificationChanges.Width = ((float)this.Size.Width) / oldSize.Width; 53 magnificationChanges.Height = ((float)this.Size.Height) / oldSize.Height; 54 55 SizeF newMagnification = new SizeF(); 56 newMagnification.Width = this.View.Magnification.Width * magnificationChanges.Width; 57 newMagnification.Height = this.View.Magnification.Height * magnificationChanges.Height; 58 59 this.Magnification = newMagnification; 60 this.oldSize = this.Size; 45 61 } 46 62 … … 53 69 Origin = new Point(Origin.X, se.NewValue); 54 70 //System.Diagnostics.Trace.WriteLine(se.NewValue); 55 } 71 } 56 72 } 57 73 -
trunk/sources/HeuristicLab.ExtLibs/HeuristicLab.Netron/3.0.2672.12446/Netron.Diagramming.Core-3.0.2672.12446/Core/Scene graph/Page.cs
r2768 r2782 169 169 170 170 // Offset the upper-left corner by 1 inch. 171 float x = 1F * Display.DpiX; 172 float y = 1F * Display.DpiY; 171 //float x = 1F * Display.DpiX; 172 //float y = 1F * Display.DpiY; 173 174 //inserted to remove margin around the drawi-ng aera 175 float x = 0; 176 float y = 0; 173 177 174 178 RectangleF bounds = new RectangleF(x, y, width, height); -
trunk/sources/HeuristicLab.ExtLibs/HeuristicLab.Netron/3.0.2672.12446/Netron.Diagramming.Core-3.0.2672.12446/Layout/StandardTreeLayout.cs
r2768 r2782 186 186 get 187 187 { 188 if (m_anchor != null)189 {190 return m_anchor;191 }188 //if (m_anchor != null) 189 //{ 190 // return m_anchor; 191 //} 192 192 193 193 m_tmpa = PointF.Empty;
Note: See TracChangeset
for help on using the changeset viewer.