Namespace: Consultingwerk.Util
Class 
ImageHelper Copy to Clipboard
Parent classes:
Inherits: Progress.Lang.Object

Purpose: Disallow instance creation
Notes:



Top Method Summary
Options Name Purpose
+ System.Drawing.Bitmap BuildTextImage (integer, integer, character, integer, character) Returns a System.Drawing.Bitmap that has been rendered from the passed in text
+ System.Drawing.Image ConcatenateImages (Image, Image, integer) Concatenates two images horizontally
+ System.Drawing.Bitmap FromBLOB (handle, character) Converts a BLOB field from a Buffer handle into a System.Drawing.Bitmap
+ System.Drawing.Bitmap FromByteArray (Byte[]) Returns the Bitmap stored in the Byte[]
+ LOGICAL HasOleContainerHeader (Byte[]) Returns true when the Byte[] contains an OLE Image Header
+ System.Drawing.Bitmap Load (character) Loads an Image
+ System.Drawing.Icon LoadIcon (character) Loads an Icon
+ System.Drawing.Icon LoadIcon (character, Size) Loads an Icon
+ System.Drawing.Bitmap MakeTransparent (Bitmap) Adds transparency to a non transparent Bitmap

Top Constructor Summary
Options Name Purpose
# ImageHelper () Disallow instance creation


Method Detail
Top

PUBLIC System.Drawing.Bitmap BuildTextImage (integer, integer, character, integer, character)

Purpose: Returns a System.Drawing.Bitmap that has been rendered from the
passed in text
Notes: Useful for creating text-images for a Ribbon etc.

Parameters:
piImageWidth INTEGER
The width of the Image in pixels
piImageHeight INTEGER
The height of the Image in pixels
pcFontName CHARACTER
The name of the font to use for the Text
piFontSize INTEGER
The font size in Point
pcText CHARACTER
The text to render as a Bitmap
Returns System.Drawing.Bitmap
The Bitmap that has been rendered from the Text
Top

PUBLIC System.Drawing.Image ConcatenateImages (Image, Image, integer)

Purpose: Concatenates two images horizontally
Notes: The width of the new image will be the sum of the two widths plus piGap, the height will be the higher of the two images.

Parameters:
poImage1 System.Drawing.Image
First image that is to be concatenated, will be on the left side of the new image
poImage2 System.Drawing.Image
Second image that is to be concatenated, will be on the right side of the new image
piGap INTEGER
Gap between the two images in the new image
Returns System.Drawing.Image
Concatenation of the two input images
Top

PUBLIC System.Drawing.Bitmap FromBLOB (handle, character)

Purpose: Converts a BLOB field from a Buffer handle into a System.Drawing.Bitmap
Notes: Creates a temporary Progress.Data.BindingSource to do the conversion
Verifies that a record is available in the buffer first

Parameters:
phBufferHandle HANDLE
The Buffer handle that contains the BLOB field
pcBufferField CHARACTER
The name of the BLOB field that contains the image data
Returns System.Drawing.Bitmap
The System.Drawing.Bitmap created from the BLOB data
Top

PUBLIC System.Drawing.Bitmap FromByteArray (Byte[])

Purpose: Returns the Bitmap stored in the Byte[]
Notes:

Parameters:
poImageData System.Byte[]
The Image data
Returns System.Drawing.Bitmap
The System.Drawing.Bitmap representing the Image
Top

PUBLIC LOGICAL HasOleContainerHeader (Byte[])

Purpose: Returns true when the Byte[] contains an OLE Image Header
Notes:

Parameters:
poImageData System.Byte[]
The Image data
Returns LOGICAL
Logical value indicating if the Byte[] contains an OLE Image Header
Top

PUBLIC System.Drawing.Bitmap Load (character)

Purpose: Loads an Image
Notes: Performs Propath lookup and loads the image without locking it
When the image name is not qualified with a file extension, we attempt
to load a .ico and .bmp (similar to the ABL behavior).
This routine cannot load images from procedure libraries!

Parameters:
pcFileName CHARACTER
The image file name
Returns System.Drawing.Bitmap
The System.Drawing.Bitmap
Top

PUBLIC System.Drawing.Icon LoadIcon (character)

Purpose: Loads an Icon
Notes: Performs Propath lookup and loads the icon without locking it
When the icon name is not qualified with a file extension, we attempt
to load a .ico (similar to the ABL behavior).
When no Size or an invalid size is given, we load the first Icon

Parameters:
pcFileName CHARACTER
The icon file name
Returns System.Drawing.Icon
The System.Drawing.Icon created
Top

PUBLIC System.Drawing.Icon LoadIcon (character, Size)

Purpose: Loads an Icon
Notes: Performs Propath lookup and loads the icon without locking it
When the icon name is not qualified with a file extension, we attempt
to load a .ico (similar to the ABL behavior).
When no Size or an invalid size is given, we load the first Icon

Parameters:
pcFileName CHARACTER
The icon file name
poSize System.Drawing.Size
The preferred icon size to be returned
Returns System.Drawing.Icon
The System.Drawing.Icon created
Top

PUBLIC System.Drawing.Bitmap MakeTransparent (Bitmap)

Purpose: Adds transparency to a non transparent Bitmap
Notes: http://www.dotnet247.com/247reference/msgs/40/202528.aspx

Parameters:
poImage System.Drawing.Bitmap
The System.Drawing.Bitmap to make transparent
Returns System.Drawing.Bitmap
The reference to the generated transparent System.Drawing.Bitmap


Constructor Detail
Top

PROTECTED ImageHelper ()

Purpose: Disallow instance creation
Notes:



©2006-2023 Consultingwerk Ltd.         info@consultingwerk.de         http://www.consultingwerk.de       08.12.2024 13:23:43