The following example demonstrates how to rotate a drawing 180 degrees.
procedure TForm1.RotateDrawingClick(Sender: TObject);
var
vDrawing: TsgCADImage;
begin
vDrawing := TsgCADDXFImage.Create;
vDrawing.LoadFromFile('Entities.dxf');
vDrawing.Rotate(axisZ, 90); // rotate 90%
vDrawing.GetExtents; // recalculate the extents of the drawing
Image1.Canvas.StretchDraw(Rect(0, 0,
Round(vDrawing.Width * Image1.Height / vDrawing.Height), Image1.Height), vDrawing);
vDrawing.Free;
end;
Without rotation
Rotated 180 degrees
Go to CAD VCL Enterprise