1 31 package org.pdfbox.pdmodel.interactive.documentnavigation.destination; 32 33 import org.pdfbox.cos.COSArray; 34 import org.pdfbox.cos.COSBase; 35 36 44 public class PDPageXYZDestination extends PDPageDestination 45 { 46 49 protected static final String TYPE = "XYZ"; 50 51 55 public PDPageXYZDestination() 56 { 57 super(); 58 array.growToSize(5); 59 array.setName( 1, TYPE ); 60 61 } 62 63 68 public PDPageXYZDestination( COSArray arr ) 69 { 70 super( arr ); 71 } 72 73 79 public int getLeft() 80 { 81 return array.getInt( 2 ); 82 } 83 84 89 public void setLeft( int x ) 90 { 91 array.growToSize( 3 ); 92 if( x == -1 ) 93 { 94 array.set( 2, (COSBase)null ); 95 } 96 else 97 { 98 array.setInt( 2, x ); 99 } 100 } 101 102 108 public int getTop() 109 { 110 return array.getInt( 3 ); 111 } 112 113 118 public void setTop( int y ) 119 { 120 array.growToSize( 4 ); 121 if( y == -1 ) 122 { 123 array.set( 3, (COSBase)null ); 124 } 125 else 126 { 127 array.setInt( 3, y ); 128 } 129 } 130 131 137 public int getZoom() 138 { 139 return array.getInt( 4 ); 140 } 141 142 147 public void setZoom( int zoom ) 148 { 149 array.growToSize( 5 ); 150 if( zoom == -1 ) 151 { 152 array.set( 4, (COSBase)null ); 153 } 154 else 155 { 156 array.setInt( 4, zoom ); 157 } 158 } 159 } 160 | Popular Tags |