## Apache Zeta Components Manual :: File Source for watermark.php

## Source for file watermark.php

Documentation is available at watermark.php

1. <?php
2. /**
3. * File containing the ezcImageWatermarkFilters interface.
4. *
5. * Licensed to the Apache Software Foundation (ASF) under one
6. * or more contributor license agreements. See the NOTICE file
7. * distributed with this work for additional information
8. * regarding copyright ownership. The ASF licenses this file
9. * to you under the Apache License, Version 2.0 (the
10. * "License"); you may not use this file except in compliance
11. * with the License. You may obtain a copy of the License at
12. *
13. * http://www.apache.org/licenses/LICENSE-2.0
14. *
15. * Unless required by applicable law or agreed to in writing,
16. * software distributed under the License is distributed on an
17. * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
18. * KIND, either express or implied. See the License for the
19. * specific language governing permissions and limitations
20. * under the License.
21. *
22. * @package ImageConversion
23. * @version //autogentag//
24. * @license http://www.apache.org/licenses/LICENSE-2.0 Apache License, Version 2.0
25. * @filesource
26. */
28. /**
29. * This interface has to implemented by ezcImageFilters classes to
30. * support watermark filters.
31. *
32. * @see ezcImageHandler
33. * @see ezcImageTransformation
34. * @see ezcImageFiltersInterface
35. *
36. * @package ImageConversion
37. * @version //autogentag//
38. */
39. interface ezcImageWatermarkFilters
40. {
41. /**
42. * Watermark filter.
43. * Places a watermark on the image. The file to use as the watermark image
44. * is given as $image. The $posX, $posY and $size values are given in
45. * percent, related to the destination image. A $size value of 10 will make
46. * the watermark appear in 10% of the destination image size.
47. * $posX = $posY = 10 will make the watermark appear in the top left corner
48. * of the destination image, 10% of its size away from its borders. If
49. * $size is ommitted, the watermark image will not be resized.
50. *
51. * @param string $image The image file to use as the watermark
52. * @param int $posX X position in the destination image in percent.
53. * @param int $posY Y position in the destination image in percent.
54. * @param int|bool$size Percentage size of the watermark, false for none.
55. * @return void
56. *
57. * @throws ezcImageInvalidReferenceException
58. * If no valid resource for the active reference could be found.
59. * @throws ezcImageFilterFailedException
60. * If the operation performed by the the filter failed.
61. * @throws ezcBaseValueException
62. * If a submitted parameter was out of range or type.
63. */
64. public function watermarkPercent ( $image, $posX, $posY, $size = false );
66. /**
67. * Watermark filter.
68. * Places a watermark on the image. The file to use as the watermark image
69. * is given as $image. The $posX, $posY and $size values are given in
70. * pixel. The watermark appear at $posX, $posY in the destination image
71. * with a size of $size pixel. If $size is ommitted, the watermark image
72. * will not be resized.
73. *
74. * @param string $image The image file to use as the watermark
75. * @param int $posX X position in the destination image in pixel.
76. * @param int $posY Y position in the destination image in pixel.
77. * @param int|bool$width Pixel size of the watermark, false to keep size.
78. * @param int|bool$height Pixel size of the watermark, false to keep size.
79. * @return void
80. *
81. * @throws ezcImageInvalidReferenceException
82. * If no valid resource for the active reference could be found.
83. * @throws ezcImageFilterFailedException
84. * If the operation performed by the the filter failed.
85. * @throws ezcBaseValueException
86. * If a submitted parameter was out of range or type.
87. */
88. public function watermarkAbsolute ( $image, $posX, $posY, $width = false, $height = false );
89. }
90. ?>

Documentation generated by phpDocumentor 1.4.3