GetAsName() публичный Метод

public GetAsName ( int idx ) : PdfName
idx int
Результат PdfName
Пример #1
0
 virtual public void TransformDestination(float a, float b, float c, float d, float e, float f)
 {
     if (!IsInternal())
     {
         throw new ArgumentException(MessageLocalization.GetComposedMessage("cannot.change.destination.of.external.link"));
     }
     if (destination.GetAsName(1).Equals(PdfName.XYZ))
     {
         float x  = destination.GetAsNumber(2).FloatValue;
         float y  = destination.GetAsNumber(3).FloatValue;
         float xx = x * a + y * c + e;
         float yy = x * b + y * d + f;
         destination.ArrayList[2] = new PdfNumber(xx);
         destination.ArrayList[3] = new PdfNumber(yy);
     }
 }
Пример #2
0
 public void TransformDestination(float a, float b, float c, float d, float e, float f)
 {
     if (!IsInternal())
     {
         throw new ArgumentException("Cannot change destination of external link");
     }
     if (destination.GetAsName(1).Equals(PdfName.XYZ))
     {
         float x  = destination.GetAsNumber(2).FloatValue;
         float y  = destination.GetAsNumber(3).FloatValue;
         float xx = x * a + y * c + e;
         float yy = x * b + y * d + f;
         destination.ArrayList[2] = new PdfNumber(xx);
         destination.ArrayList[3] = new PdfNumber(yy);
     }
 }
Пример #3
0
 private PdfObject SimplifyColorspace(PdfArray obj) {
     if (obj == null)
         return null;
     PdfObject first = obj.GetAsName(0);
     if (PdfName.CALGRAY.Equals(first))
         return PdfName.DEVICEGRAY;
     else if (PdfName.CALRGB.Equals(first))
         return PdfName.DEVICERGB;
     else
         return obj;
 }