Float[] viewParams
)
{
super(
context.getFile(),
new PdfArray()
);
PdfArray destinationObject = getBaseDataObject();
destinationObject.add(pageObject);
switch(mode)
{
case Fit:
destinationObject.add(PdfName.Fit);
break;
case FitBoundingBox:
destinationObject.add(PdfName.FitB);
break;
case FitBoundingBoxHorizontal:
destinationObject.add(PdfName.FitBH);
destinationObject.add(PdfReal.get(viewParams[0]));
break;
case FitBoundingBoxVertical:
destinationObject.add(PdfName.FitBV);
destinationObject.add(PdfReal.get(viewParams[0]));
break;
case FitHorizontal:
destinationObject.add(PdfName.FitH);
destinationObject.add(PdfReal.get(viewParams[0]));
break;
case FitRectangle:
destinationObject.add(PdfName.FitR);
destinationObject.add(PdfReal.get(viewParams[0]));
destinationObject.add(PdfReal.get(viewParams[1]));
destinationObject.add(PdfReal.get(viewParams[2]));
destinationObject.add(PdfReal.get(viewParams[3]));
break;
case FitVertical:
destinationObject.add(PdfName.FitV);
destinationObject.add(PdfReal.get(viewParams[0]));
break;
case XYZ:
destinationObject.add(PdfName.XYZ);
destinationObject.add(PdfReal.get(viewParams[0]));
destinationObject.add(PdfReal.get(viewParams[1]));
destinationObject.add(PdfReal.get(viewParams[2]));
break;
}
}