| @@ 134-151 (lines=18) @@ | ||
| 131 | * |
|
| 132 | * @return int |
|
| 133 | */ |
|
| 134 | public function widthTopLeft() { |
|
| 135 | $o = $this->getOrientation(); |
|
| 136 | $this->logger->debug('OC_Image->widthTopLeft() Orientation: ' . $o, array('app' => 'core')); |
|
| 137 | switch ($o) { |
|
| 138 | case -1: |
|
| 139 | case 1: |
|
| 140 | case 2: // Not tested |
|
| 141 | case 3: |
|
| 142 | case 4: // Not tested |
|
| 143 | return $this->width(); |
|
| 144 | case 5: // Not tested |
|
| 145 | case 6: |
|
| 146 | case 7: // Not tested |
|
| 147 | case 8: |
|
| 148 | return $this->height(); |
|
| 149 | } |
|
| 150 | return $this->width(); |
|
| 151 | } |
|
| 152 | ||
| 153 | /** |
|
| 154 | * Returns the height when the image orientation is top-left. |
|
| @@ 158-175 (lines=18) @@ | ||
| 155 | * |
|
| 156 | * @return int |
|
| 157 | */ |
|
| 158 | public function heightTopLeft() { |
|
| 159 | $o = $this->getOrientation(); |
|
| 160 | $this->logger->debug('OC_Image->heightTopLeft() Orientation: ' . $o, array('app' => 'core')); |
|
| 161 | switch ($o) { |
|
| 162 | case -1: |
|
| 163 | case 1: |
|
| 164 | case 2: // Not tested |
|
| 165 | case 3: |
|
| 166 | case 4: // Not tested |
|
| 167 | return $this->height(); |
|
| 168 | case 5: // Not tested |
|
| 169 | case 6: |
|
| 170 | case 7: // Not tested |
|
| 171 | case 8: |
|
| 172 | return $this->width(); |
|
| 173 | } |
|
| 174 | return $this->height(); |
|
| 175 | } |
|
| 176 | ||
| 177 | /** |
|
| 178 | * Outputs the image. |
|