Free cookie consent management tool by TermsFeed Policy Generator

Ignore:
Timestamp:
11/03/15 17:12:08 (8 years ago)
Author:
jkarder
Message:

#1265: implemented new render stage concept

Location:
branches/HeuristicLab.Visualization/HeuristicLab.Visualization/3.3
Files:
6 added
2 edited

Legend:

Unmodified
Added
Removed
  • branches/HeuristicLab.Visualization/HeuristicLab.Visualization/3.3/Chart.cs

    r13105 r13112  
    3030    private PointD originalUpperRight;
    3131    protected List<Offset> zoomHistory;
     32    protected List<RenderStage> renderStages;
    3233
    3334    private bool enabled;
     
    8889      Scale = 1.0;
    8990      Group = new Group(this);
     91      renderStages = new List<RenderStage> {
     92        new BackgroundColorRenderStage(this),
     93        new GridRenderStage(this),
     94        new GroupRenderStage(this),
     95        new EnabledRenderStage(this)
     96      };
    9097      Group.RedrawRequired += GroupOnRedrawRequired;
    9198      MinimumZoomDistance = 0.01;
     
    239246    public virtual void Render(Graphics graphics, int width, int height) {
    240247      mySizeInPixels = new Size(width, height);
    241       graphics.Clear(backgroundColor);
    242       Group.PreDraw(graphics);
    243       Group.Draw(graphics);
    244       Group.PostDraw(graphics);
    245       if (!enabled) {
    246         var disabledColor = Color.FromArgb(150, SystemColors.Control);
    247         var brush = new SolidBrush(disabledColor);
    248         var rectangle = new System.Drawing.Rectangle(new Point(0, 0), mySizeInPixels);
    249         graphics.FillRectangle(brush, rectangle);
    250       }
     248      foreach (var renderStage in renderStages)
     249        renderStage.Render(graphics);
    251250    }
    252251
  • branches/HeuristicLab.Visualization/HeuristicLab.Visualization/3.3/HeuristicLab.Visualization-3.3.csproj

    r13105 r13112  
    139139    </Compile>
    140140    <Compile Include="ChartModes\SelectChartMode.cs" />
     141    <Compile Include="RenderStage.cs" />
     142    <Compile Include="RenderStages\BackgroundColorRenderStage.cs" />
     143    <Compile Include="RenderStages\EnabledRenderStage.cs" />
     144    <Compile Include="RenderStages\GridRenderStage.cs" />
     145    <Compile Include="RenderStages\GroupRenderStage.cs" />
    141146    <Compile Include="Trees\LayoutEngines\BoxesLayoutEngine.cs" />
    142147    <Compile Include="Trees\LayoutEngines\ILayoutEngine.cs" />
Note: See TracChangeset for help on using the changeset viewer.