This method retrieves a list of supported resolutions for the printer designated by the printer name.
Parameters
Name | Explanation |
---|---|
Resolutions | An array containing the list of retrieved
resolutions In C++Builder, pass Resolutions count - 1 into Resolutions_Size |
Return Value
Returns the number of retrieved items. Returns 0 if unsuccessful.
Explanation
The EnumResolutions method retrieves a list of supported resolutions for the printer designated by the printer name. If you need to know the number of elements in the array, the GetArrayNum method can be used to retrieve this. The Resolutions parametercontains the retrieved resolution values in units of dots per inch (dpi)
Sample code:
C++Builder
int Size;
TPoint *Resolutions;
VImageKit1->PrintDraw->PrinterName = "EPSON LP-8200C";
Size =
VImageKit1->PrintDraw->GetArrayNum(vikPrinterResolution);
if (Size < 1) return;
Resolutions = new TPoint[Size];
__try {
VImageKit1->PrintDraw->EnumResolutions(Resolutions,
Size - 1);
// do stuff here
********************
} __finally {
delete[] Resolutions;
}
In Delphi
Size: Integer;
Resolutions: array of TPoint;
VImageKit1.PrintDraw.PrinterName := 'EPSON LP-8200C';
Size := VImageKit1.PrintDraw.GetArrayNum(vikPrinterResolution);
if Size < 1 then Exit;
SetLength(Resolutions, Size);
VImageKit1.PrintDraw.EnumResolutions(Resolutions);
// do stuff here
********************
Differences between the ImageKit7/8/9
The XResolutions, YResolutions has been changed to type
TPoint.
In C++Builder it is necessary to pass in the count of the
Resolutions.