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