//-------------------------------------------------
// TenCentimeterRuler.cs ?2001 by Charles Petzold
//-------------------------------------------------
using System;
using System.Drawing;
using System.Windows.Forms;
class TenCentimeterRuler: PrintableForm
{
public new static void Main()
{
Application.Run(new TenCentimeterRuler());
}
public TenCentimeterRuler()
{
Text = "Ten-Centimeter Ruler";
}
protected override void DoPage(Graphics grfx, Color clr, int cx, int cy)
{
Pen pen = new Pen(clr);
Brush brush = new SolidBrush(clr);
const int xOffset = 10;
const int yOffset = 10;
grfx.DrawPolygon(pen, new PointF[]
{
MMConv(grfx, new PointF(xOffset, yOffset)),
MMConv(grfx, new PointF(xOffset + 100, yOffset