Show / Hide Table of Contents

Class BitmapCanvas

Canvas for generating a GDI+ bitmap.

Inheritance
object
AbstractCanvas
SystemDrawingCanvas
BitmapCanvas
PNGCanvas
Implements
ICanvas
IDisposable
Inherited Members
SystemDrawingCanvas.InitGraphics(Graphics, bool, float)
SystemDrawingCanvas.SetOffset(float, float)
SystemDrawingCanvas.Close()
SystemDrawingCanvas.SetTransformation(double, double, double, double, double)
SystemDrawingCanvas.StartPath()
SystemDrawingCanvas.CloseSubpath()
SystemDrawingCanvas.MoveTo(double, double)
SystemDrawingCanvas.LineTo(double, double)
SystemDrawingCanvas.AddRectangle(double, double, double, double)
SystemDrawingCanvas.CubicCurveTo(double, double, double, double, double, double)
SystemDrawingCanvas.FillPath(int, bool)
SystemDrawingCanvas.StrokePath(double, int, LineStyle, bool)
SystemDrawingCanvas.PutText(string, double, double, int, bool)
SystemDrawingCanvas.ToByteArray()
AbstractCanvas.MmToPt
AbstractCanvas.FontMetrics
AbstractCanvas.SetupFontMetrics(string)
AbstractCanvas.PutTextLines(string[], double, double, int, double)
AbstractCanvas.Ascender(int)
AbstractCanvas.Descender(int)
AbstractCanvas.LineHeight(int)
AbstractCanvas.TextWidth(string, int, bool)
AbstractCanvas.SplitLines(string, double, int)
AbstractCanvas.Dispose()
object.Equals(object)
object.Equals(object, object)
object.GetHashCode()
object.GetType()
object.MemberwiseClone()
object.ReferenceEquals(object, object)
object.ToString()
Namespace: Codecrete.SwissQRBill.Windows
Assembly: Codecrete.SwissQRBill.Windows.dll
Syntax
public class BitmapCanvas : SystemDrawingCanvas, ICanvas, IDisposable

Constructors

| Edit this page View Source

BitmapCanvas(int, int, float, string)

Creates a new canvas.

Declaration
public BitmapCanvas(int width, int height, float dpi, string fontFamilyList)
Parameters
Type Name Description
int width

Width of resulting bitmap, in pixels

int height

Height of resulting bitmap, in pixels

float dpi

Resolution of bitmap, in dpi (pixels per inch)

string fontFamilyList

A list font family names, separated by comma (same syntax as for CSS). The first font family will be used.

Methods

| Edit this page View Source

Dispose(bool)

Frees and releases resources.

Declaration
protected override void Dispose(bool disposing)
Parameters
Type Name Description
bool disposing

indicates whether the method is called from a Dispose method (true) or from a finalizer (false).

Overrides
SystemDrawingCanvas.Dispose(bool)
| Edit this page View Source

ToBitmap()

Returns the result as a GDI+ bitmap.

The caller must take ownership of the bitmap and dispose it.

This method can only be called once. Thereafter, it is no longer possible to draw to this canvas or to call this method a second time.

Declaration
public Bitmap ToBitmap()
Returns
Type Description
Bitmap

The bitmap.

Implements

ICanvas
IDisposable
  • Edit this page
  • View Source
In this article
Back to top Generated by DocFX