Free cookie consent management tool by TermsFeed Policy Generator

Changeset 7092 for trunk


Ignore:
Timestamp:
11/29/11 10:14:06 (13 years ago)
Author:
abeham
Message:

#1541

  • Clearing the graphics with white color solves the text rendering problem
File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/sources/HeuristicLab.Problems.QuadraticAssignment.Views/3.3/QAPVisualizationControl.cs

    r5933 r7092  
    2222using System;
    2323using System.Drawing;
    24 using System.Drawing.Drawing2D;
    25 using System.Drawing.Text;
    2624using System.Globalization;
    2725using System.Text;
     
    173171      if (bitmap == null) return;
    174172      using (Graphics g = Graphics.FromImage(bitmap)) {
    175         g.TextRenderingHint = TextRenderingHint.AntiAlias;
    176         g.SmoothingMode = SmoothingMode.AntiAlias;
     173        g.Clear(Color.White);
    177174
    178175        Font font = new Font(FontFamily.GenericSansSerif, 12, FontStyle.Regular);
     
    304301        Random rand = new Random();
    305302        using (Graphics graphics = Graphics.FromImage(newBitmap)) {
    306           graphics.SmoothingMode = SmoothingMode.AntiAlias;
    307           graphics.TextRenderingHint = TextRenderingHint.AntiAlias;
     303          graphics.Clear(Color.White);
    308304          graphics.DrawString("Showing locations spaced out according to their distances", Font, Brushes.Black, 5, 2);
    309305
     
    394390        Random rand = new Random();
    395391        using (Graphics graphics = Graphics.FromImage(newBitmap)) {
    396           graphics.SmoothingMode = SmoothingMode.AntiAlias;
    397           graphics.TextRenderingHint = TextRenderingHint.AntiAlias;
     392          graphics.Clear(Color.White);
    398393          graphics.DrawString("Showing facilities spaced out according to their weights", Font, Brushes.Black, 5, 2);
    399394
     
    490485        Random rand = new Random();
    491486        using (Graphics graphics = Graphics.FromImage(newBitmap)) {
    492           graphics.SmoothingMode = System.Drawing.Drawing2D.SmoothingMode.AntiAlias;
    493           graphics.TextRenderingHint = System.Drawing.Text.TextRenderingHint.AntiAlias;
    494 
     487          graphics.Clear(Color.White);
    495488          for (int i = 0; i < assignment.Length - 1; i++) {
    496489            for (int j = i + 1; j < assignment.Length; j++) {
Note: See TracChangeset for help on using the changeset viewer.