LineDisplayBase.DisplayBitmap Method (String, Int32, Int32)
2/27/2008
Displays the bitmap with the specified alignment.
Namespace: Microsoft.PointOfService.BaseServiceObjects
Assembly: Microsoft.PointOfService.ControlBase (in microsoft.pointofservice.controlbase.dll)
Syntax
'Declaration
Public Overrides Sub DisplayBitmap ( _
fileName As String, _
alignmentX As Integer, _
alignmentY As Integer _
)
public override void DisplayBitmap (
string fileName,
int alignmentX,
int alignmentY
)
public:
virtual void DisplayBitmap (
String^ fileName,
int alignmentX,
int alignmentY
) override
public void DisplayBitmap (
String fileName,
int alignmentX,
int alignmentY
)
public override function DisplayBitmap (
fileName : String,
alignmentX : int,
alignmentY : int
)
Parameters
- fileName
File name or URL of the bitmap file.
- alignmentX
Horizontal placement of the bitmap to be displayed.
- alignmentY
Vertical placement of the bitmap to be displayed.
Remarks
The alignmentX parameter has one of the following values:
Value |
Meaning |
DisplayBitmapLeft |
Align the bitmap’s left edge with the leftmost pixel of the current character position, as specified by the CursorColumn property setting. |
DisplayBitmapCenter |
Align the bitmap in the horizontal center of the current character position, as specified by the CursorColumn property setting. |
DisplayBitmapRight |
Align the bitmap’s right edge with the rightmost pixel of the current character position, as specified by the CursorColumn property setting. |
Other values |
Distance from the window’s leftmost pixel column to the left edge of the bitmap, expressed in number of pixels. |
The alignmentY parameter has one of the following values:
Value |
Meaning |
DisplayBitmapTop |
Align the bitmap’s top edge with the topmost pixel of the current character position, as specified by the CursorRow property setting. |
DisplayBitmapCenter |
Align the bitmap in the vertical center of the current character position, as specified by the CursorRow property setting. |
DisplayBitmapBottom |
Align the bitmap’s bottom edge with the bottommost pixel of the current character position, as specified by the CursorRow property setting. |
Other values |
Distance from the window’s topmost pixel row to the start of the bitmap, expressed in number of pixels. |
The application calls DisplayBitmap to display a bitmap on the line display device. The bitmap is displayed within the current window’s viewport.
If the values specified for the alignmentX and alignmentY are the values defined by the DisplayBitmapf constants, then the bitmap is displayed in relation to the character positions specified by the CursorColumn and CursorRow properties. In addition, if the CursorUpdate property is set to TRUE, then CursorColumn and CursorRow are updated to point to the first character position following the bitmap.
If the bitmap doesn’t exactly occupy a multiple of rows and columns, then the unoccupied pixels of those character positions that are partially occupied are displayed with the background color. In other words, the service object will fill all character positions partially or completely occupied by the bitmap with the background color before drawing the bitmap.
Bitmap display has the following restrictions:
Bitmap display is only legal when in Immediate mode;
The window size must match the window’s viewport size;
The bitmap must be displayable within the window, after consideration of the function parameters. For example, if alignmentX specifies a pixel near the bottom of the window and the bitmap height (after bitmap transformation, if required) exceeds the distance from alignmentX to the window bottom, then the bitmap isn’t displayed.
The LineDisplayBase class ensures that the line display device has been opened, claimed, and enabled.
DisplayBitmap may throw a PosControlException with the following ErrorCodes:
Value |
Meaning |
Illegal |
One of the following errors occurred:The line display device doesn’t support bitmap display (the CapBitmap property is set to false;The alignmentX/alignmentY parameters are invalid or too big;The window is not in Immediate Mode;The window size doesn’t match its viewport size;The bitmap is either too wide to display without transformation, or it is too big to transform; orThe specified file is either not a bitmap file or it is in an unsupported format. |
NoExist |
The specified fileName was not found. |
Thread Safety
Any public static (Shared in Visual Basic) members of this type are thread-safe. Any instance members are not guaranteed to be thread-safe.
See Also
Reference
LineDisplayBase Class
LineDisplayBase Members
Microsoft.PointOfService.BaseServiceObjects Namespace
LineDisplay.DisplayBitmap Method
LineDisplay.CapBitmap Property