Minor updates.

This commit is contained in:
wo80
2022-03-04 13:24:51 +01:00
parent ee6f03d5ce
commit 43b424e62d
36 changed files with 198 additions and 327 deletions
+1 -2
View File
@@ -6,7 +6,6 @@
namespace TriangleNet.Rendering.GDI
{
using System;
using System.Drawing;
using System.Drawing.Drawing2D;
using System.Drawing.Text;
@@ -158,7 +157,7 @@ namespace TriangleNet.Rendering.GDI
{
Graphics g = e.Graphics;
g.TextRenderingHint = TextRenderingHint.ClearTypeGridFit;
g.DrawString(coordinate, this.Font, Brushes.White, 10, 10);
TextRenderer.DrawText(g, coordinate, Font, new Point(10, 10), Color.White);
}
}
+5 -2
View File
@@ -24,7 +24,7 @@ namespace TriangleNet.Rendering
/// </para>
/// <para>
/// Since the upper-left corner of the display is usually the screen coordinate origin
/// (0,0), the project will automatically invert the y-axis.
/// (0,0), the projection will automatically invert the y-axis.
/// </para>
/// </remarks>
public class Projection
@@ -63,13 +63,16 @@ namespace TriangleNet.Rendering
world = viewport = new RectangleF(screen.X, screen.Y, screen.Width, screen.Height);
world_ = new TRectangle();
scale_ = 0;
Level = 1;
}
/// <summary>
/// Initialize the projection.
/// </summary>
/// <param name="nworld">The world that should be transformed to screen coordinates.</param>
/// <param name="world">The world that should be transformed to screen coordinates.</param>
public void Initialize(TRectangle world)
{
Level = 1;