\ResizedImage
Synopsis
class ResizedImage
extends ViewableData
{
- // members
- private $height;
- private $width;
- private $percentageWidth;
- private $image;
- private $marginRight;
- private $percentageMarginRight;
- private $marginTop;
- private $percentageMarginTop;
- private Image $previewImage;
- // methods
- public void __construct()
- public static int getConfiguredMargin()
- public static int getMaxPreviewHeight()
- public static int getPreviewPadding()
- public int getHeight()
- public int getWidth()
- public void setHeight()
- public void setWidth()
- public void setPercentageWidth()
- public float getPercentageWidth()
- public void addWidth()
- public int getMarginRight()
- public float getPercentageMarginRight()
- public void setMarginRight()
- public int getMarginTop()
- public float getPercentageMarginTop()
- public void setMarginTop()
- public void setPercentageMarginRight()
- public void setPercentageMarginTop()
- public Image getImage()
- public Image getPreviewImage()
- public void setPreviewImage()
- public void changeHeight()
- public void changeWidth()
- public void resize()
- private void correctIllegalSizes()
- public HTMLText forTemplate()
Hierarchy
Extends
- ViewableData
Members
private
- $height — int
- $image — int
- $marginRight — int
- $marginTop — int
- $percentageMarginRight — float
- $percentageMarginTop — float
- $percentageWidth — float
- $previewImage — Image
- $width — int
Methods
private
- correctIllegalSizes() — Set sizes smaller than 1 to 1, because a size of 0 is not allowed.
public
- __construct() — ResizedImage constructor.
- addWidth() — Add width to image. This function does not keep the aspect ratio.
- changeHeight() — Change height by keeping aspect ratio.
- changeWidth() — Change width by keeping aspect ration.
- forTemplate() — This function is called when this object is rendered to a template.
- getConfiguredMargin() — Returns the configured margin of all images.
- getHeight() — Returns the height of this resized image:
- getImage() — Returns the original image object.
- getMarginRight() — Returns the margin at the right side of this image.
- getMarginTop() — Returns the margin at the top of this image.
- getMaxPreviewHeight() — Returns the configured max preview height of all images.
- getPercentageMarginRight() — Returns the right margin in percent of the overlying line.
- getPercentageMarginTop() — Returns the top margin in percentage of the overlying line.
- getPercentageWidth() — Returns the width in percent of the overlying line.
- getPreviewImage() — Returns the preview image.
- getPreviewPadding() — Returns the configured preview padding of all images.
- getWidth() — Returns the width of this resized image:
- resize() — This function resizes the image behind this object, which is stored in $this->image.
- setHeight() — Set the height of the image by hard. This function does not keep the aspect ratio.
- setMarginRight() — Set the margin at the right side of this image.
- setMarginTop() — Set the margin at the top of this image.
- setPercentageMarginRight()
- setPercentageMarginTop()
- setPercentageWidth() — Sets the width of this image in percent of the width of the overlying line.
- setPreviewImage() — Sets the preview image. The preview image should be a larger version of the resized image.
- setWidth() — Set the width of the image by hard. This function does not keep the aspect ratio.