| @@ 116-133 (lines=18) @@ | ||
| 113 | * |
|
| 114 | * @return int |
|
| 115 | */ |
|
| 116 | public function widthTopLeft() { |
|
| 117 | $o = $this->getOrientation(); |
|
| 118 | $this->logger->debug('OC_Image->widthTopLeft() Orientation: ' . $o, array('app' => 'core')); |
|
| 119 | switch ($o) { |
|
| 120 | case -1: |
|
| 121 | case 1: |
|
| 122 | case 2: // Not tested |
|
| 123 | case 3: |
|
| 124 | case 4: // Not tested |
|
| 125 | return $this->width(); |
|
| 126 | case 5: // Not tested |
|
| 127 | case 6: |
|
| 128 | case 7: // Not tested |
|
| 129 | case 8: |
|
| 130 | return $this->height(); |
|
| 131 | } |
|
| 132 | return $this->width(); |
|
| 133 | } |
|
| 134 | ||
| 135 | /** |
|
| 136 | * Returns the height when the image orientation is top-left. |
|
| @@ 140-157 (lines=18) @@ | ||
| 137 | * |
|
| 138 | * @return int |
|
| 139 | */ |
|
| 140 | public function heightTopLeft() { |
|
| 141 | $o = $this->getOrientation(); |
|
| 142 | $this->logger->debug('OC_Image->heightTopLeft() Orientation: ' . $o, array('app' => 'core')); |
|
| 143 | switch ($o) { |
|
| 144 | case -1: |
|
| 145 | case 1: |
|
| 146 | case 2: // Not tested |
|
| 147 | case 3: |
|
| 148 | case 4: // Not tested |
|
| 149 | return $this->height(); |
|
| 150 | case 5: // Not tested |
|
| 151 | case 6: |
|
| 152 | case 7: // Not tested |
|
| 153 | case 8: |
|
| 154 | return $this->width(); |
|
| 155 | } |
|
| 156 | return $this->height(); |
|
| 157 | } |
|
| 158 | ||
| 159 | /** |
|
| 160 | * Outputs the image. |
|