C# Class Sample.DrawingTools

Show file Open project: abbyysdk/ocrsdk.com Class Usage Examples

Public Methods

Method Description
CreateImage ( Size size, Brush brush ) : Image
DrawBarChart ( Bitmap bitmap, Rectangle rect, Font font, BarData bars, string xLabel, string yLabel, string comment ) : void
DrawNamedValue ( Graphics g, string name, string value, Font font, PointF point ) : SizeF
DrawScaledImage ( Image image, Image imageToScale, Rectangle rect ) : void
LoadScaledImage ( string filePath, Size size ) : Image
ScaleImage ( Image original, Size size ) : Image
ScaleToFit ( Size objectSize, Size viewSize ) : float
TransparentColor ( Color c ) : Color

Method Details

CreateImage() public static method

public static CreateImage ( Size size, Brush brush ) : Image
size System.Drawing.Size
brush System.Drawing.Brush
return Image

DrawBarChart() public static method

public static DrawBarChart ( Bitmap bitmap, Rectangle rect, Font font, BarData bars, string xLabel, string yLabel, string comment ) : void
bitmap System.Drawing.Bitmap
rect System.Drawing.Rectangle
font System.Drawing.Font
bars BarData
xLabel string
yLabel string
comment string
return void

DrawNamedValue() public static method

public static DrawNamedValue ( Graphics g, string name, string value, Font font, PointF point ) : SizeF
g System.Drawing.Graphics
name string
value string
font System.Drawing.Font
point System.Drawing.PointF
return System.Drawing.SizeF

DrawScaledImage() public static method

public static DrawScaledImage ( Image image, Image imageToScale, Rectangle rect ) : void
image Image
imageToScale Image
rect System.Drawing.Rectangle
return void

LoadScaledImage() public static method

public static LoadScaledImage ( string filePath, Size size ) : Image
filePath string
size System.Drawing.Size
return Image

ScaleImage() public static method

public static ScaleImage ( Image original, Size size ) : Image
original Image
size System.Drawing.Size
return Image

ScaleToFit() public static method

public static ScaleToFit ( Size objectSize, Size viewSize ) : float
objectSize System.Drawing.Size
viewSize System.Drawing.Size
return float

TransparentColor() public static method

public static TransparentColor ( Color c ) : Color
c Color
return Color