PDF Creator Pilot documentation |
Download CHM version of this manual. |
|
![]() ![]() Collapse AllThis method shifts the PDF document page coordinates.
|
| HRESULT TranslateCoords ( FLOAT x, FLOAT y ) |
Parameters
x
X distance
y
Y distance
Return value
If successful, this method returns S_OK. If it fails, this method should return one of the error values.
Remarks
This method shifts the coordinate system by distances supplied for x and y. The startup value of translation is (0, 0).
Example
Shifting Coordinates
Delphi
[copy to clipboard]
{ PDF object is supposed to be created }
PDF.DrawRectangle(10, 10, 200, 100, 0);
PDF.Stroke;
PDF.TranslateCoords(50, 50);
PDF.DrawRectangle(10, 10, 200, 100, 0);
PDF.Stroke;
PDF.SaveToFile('test.pdf', true);
C/C++
[copy to clipboard]
// PDF object is supposed to be created
PDF->DrawRectangle(10, 10, 200, 100, 0);
PDF->Stroke();
PDF->TranslateCoords(50, 50);
PDF->DrawRectangle(10, 10, 200, 100, 0);
PDF->Stroke();
PDF->SaveToFile("test.pdf", true);
C#
[copy to clipboard]
// PDF object is supposed to be created
PDF.DrawRectangle(10, 10, 200, 100, 0);
PDF.Stroke();
PDF.TranslateCoords(50, 50);
PDF.DrawRectangle(10, 10, 200, 100, 0);
PDF.Stroke();
PDF.SaveToFile("test.pdf", true);
Visual Basic
[copy to clipboard]
' PDF object is supposed to be created PDF.DrawRectangle 10, 10, 200, 100, 0 PDF.Stroke PDF.TranslateCoords 50, 50 PDF.DrawRectangle 10, 10, 200, 100, 0 PDF.Stroke PDF.SaveToFile "test.pdf", true
See Also
Reference


