This function displays the image in the device context. (the screen or the printer).
Parameters
Name | Explanation |
---|---|
hDC | The device context (The screen or the printer) |
Handle | The image handle of the raster or vector image |
PrintRect | A structure containing the coordinates specifying the display area |
Aspect | Maintains the height to width ratio [True (nonzero): Ratio maintained, False (0): Ratio not maintained] |
DXFBlack | In DXF images only, this sets black to white and white to black. [True (nonzero): Black and white are exchanged, False (0): Black and white are not exchanged] |
DeviceMode | The designated object where the image is displayed(0: Screen, 1: Printer) |
Return Value
Returns True (nonzero) if successful. Returns False (0) if unsuccessful. Returns False (0) if the cancel button is clicked in the "Print" dialog box.)
Explanation
The IKGetImageOut function displays the image in the device context (the screen or the printer). The PrintRect member variables determine the location of the rectangle in which the image is displayed. If the image does not fit within the specified rectangle, it will be scaled to fit. If the Aspect parameter is False, the image will be stretched to fill the specified rectangle, i.e. the height to width ratio will not be maintained. If the Aspect parameter is True, the image will be displayed within the specified rectangle with the height to width ratio maintained.
This function can draw in the following designated objects: screen or printer.
If the DeviceMode parameter is 0 (the designated object is the screen) then the PrintRect member variables are in pixel units.
If the DeviceMode parameter is 1 (the designated object is the printer) then the PrintRect member variables are in 0.1mm units.
Sample Code in Delphi:
Ret: LongBool
Rect1: TRect;
Rect2: TRect;
Width: Longint;
Height: Longint
//Retrieving the paper size and specified printing area
Ret := IKGetPaperSize(DC, Rect1, Width, Height, 1);
Rect2.Left := 0;
Rect2.Top := 0;
Rect2.Right := Rect1.Right - Rect1.Left;
Rect2.Bottom := Rect1.Bottom - Rect1.Top;
Ret := IKImageOut(DC, ImgHandle, Rect2, False, True, 1);
)
[The differences from the ImageKit5]
Function Name | Parameters |
---|---|
IK5ImageOut: | hDC, Handle, PrintRect, Aspect |
IKImageOut: | hDC, Handle, PrintRect, Aspect, DXFBlack, DeviceMode |
If you set the DXFBlack parameter to False and then set the DeviceMode parameter to the value that you used in the ImageKit5 IKSetDeviceMode, then there is no difference between this function in the ImageKit6 and the ImageKit5.