Ejemplo n.º 1
0
 public static RectangleF AsWinFormsRectangleF(this PointGrid.Block block, CellMetrics cellMetrics)
 {
     return(new RectangleF(block.UpperLeftCorner.AsWinFormsPointF(cellMetrics), block.Dimensions.AsWinFormsSizeF(cellMetrics)));
 }
Ejemplo n.º 2
0
 public static PointF AsWinFormsPointF(this PointGrid.Point point, CellMetrics cellMetrics)
 {
     return(new PointF(Convert.ToSingle(point.X * cellMetrics.Width), Convert.ToSingle(point.Y * cellMetrics.Height)));
 }
Ejemplo n.º 3
0
 public static SizeF AsWinFormsSizeF(this PointGrid.Dimensions size, CellMetrics cellMetrics)
 {
     return(new SizeF(Convert.ToSingle(size.Width * cellMetrics.Width), Convert.ToSingle(size.Height * cellMetrics.Height)));
 }
Ejemplo n.º 4
0
 public static Point AsWinFormsPoint(this PointGrid.Point point, CellMetrics cellMetrics)
 {
     return(new Point(point.X * cellMetrics.Width, point.Y * cellMetrics.Height));
 }
Ejemplo n.º 5
0
 public static Size AsWinFormsSize(this PointGrid.Dimensions size, CellMetrics cellMetrics)
 {
     return(new Size(size.Width * cellMetrics.Width, size.Height * cellMetrics.Height));
 }
Ejemplo n.º 6
0
 public static Size AsWinFormsSize(this CellGrid.Dimensions size, CellMetrics cellMetrics)
 {
     return(new Size(size.Columns * cellMetrics.Width, size.Rows * cellMetrics.Height));
 }
Ejemplo n.º 7
0
 public WinFormsArtist(Graphics graphics, Font font, CellMetrics cellMetrics)
 {
     _graphics    = graphics;
     _font        = font;
     _cellMetrics = cellMetrics;
 }
Ejemplo n.º 8
0
 private void SetFontBySize(int size)
 {
     _font        = new Font(FontFamily.GenericMonospace, size);
     _cellMetrics = new CellMetrics(_font.Height, MeasureFontWidth());
 }