GDI Plus Bitmap Foundation Class
The gpBitmap class encapsulates a GDI+ bitmap, which consists of the pixel data for a graphics image and its attributes. A Bitmap object is an object used to work with images defined by pixel data.
Category | Reporting |
---|---|
Default Catalog |
Visual FoxPro Catalog\Foundation Classes\Output\GDIplus |
Class |
gpBitmap |
Base Class |
Custom |
Class Library |
_GDIPLUS.vcx |
Parent Class |
gpImage (GDI Plus Image Foundation Class) |
Remarks
The following table lists public properties and methods added by this class to its parent class, gpImage.
Properties and methods | Description |
---|---|
Create Method |
Creates a bitmap object. Syntax: Return Values: Logical, representing success or failure. Parameters: tnWidth, required, width of the new bitmap in pixels. tnHeight, required, height of the new bitmap in pixels. tnPixelFormat, optional, one of GDIPLUS_PIXELFORMAT_* constants, defaults to Remarks: This method is equivalent to the .NET constructor |
CreateFromFile Method |
Creates a bitmap object by loading from a file. Syntax: Return Values: Logical, representing success or failure. Parameters: tcFileName, required, the name of the file to read. tlUseEmbeddedColorMgmt, optional, indicates whether the color management info embedded in the file, rather than defaults, should be used for the resulting bitmap object. Remarks: This method is equivalent to the .NET constructor |
CreateFromGraphics Method |
Creates a bitmap object from a graphics object specifying the bitmap's properties. Syntax: Return Values: Logical, representing success or failure. Parameters: toGraphics, required, instance of gpGraphics or GDI+ Graphics handle, from which to create the bitmap. tnWidth, required, width of the new bitmap in pixels. tnHeight, required, height of the new bitmap in pixels. Remarks: This method is equivalent to the .NET constructor The pixel format of the bitmap cannot be set; it will default to |
GetPixel Method |
Gets the color value of an individual pixel. Syntax: Return Values: Integer, ARGB color value of the pixel. Returns null ( Parameters: tX, required, integer X-coordinate of pixel to get. tY, required, integer X-coordinate of pixel to get. Remarks: This method is equivalent to the .NET |
SetPixel Method |
Sets the color value of an individual pixel. Syntax: Return Values: Logical, representing success or failure. Parameters: tX, required, integer X-coordinate of pixel to get. tY, required, integer X-coordinate of pixel to get. tvColor, required, GDI Plus Color Foundation Class object (gpColor) or integer ARGB color value. Remarks: This method is equivalent to the .NET |
SetResolution Method |
Sets the resolution of the Bitmap in dots per inch. Syntax: Return Values: Logical, representing success or failure. Parameters: tnDPIx, the horizontal resolution, in dots per inch, of the bitmap. tnDPIy, the vertical resolution, in dots per inch, of the bitmap. Remarks: This method is equivalent to the .NET |
See Also
Reference
Visual FoxPro Foundation Classes A-Z
GDI Plus API Wrapper Foundation Classes