# GraffitiRectangle
Class Inherits GraffitiWebUIControl
## About
A simple, customizable, decorative component with support custom image embedding and display.
## Compatibility
### Framework API Version
| 1.0 | 2.0 |
| :---: | :---: |
| True | True |
### Web
| 32-Bit | 64-Bit |
| :---: | :---: |
| True | True |
## Enumerations
| Name | Value | Description |
| --- | :---: | --- |
| AttachmentValues | Default <br> Fixed <br> Local <br> Scroll | Supported background image attachment values. |
| BlendModes | Default <br> Multiply <br> Screen <br> Overlay <br> Darken <br> Lighten <br> Dodge <br> Saturation <br> Color <br> Luminosity | Supported background blending modes. |
| BoundaryValues | Default <br> PaddingBox <br> BorderBox <br> ContentBox | Supported image clipping values. |
| PositionValues | Default <br> LeftTop <br> LeftCenter <br> LeftBottom <br> RightTop <br> RightCenter <br> RightBottom <br> CenterTop <br> Center <br> CenterBottom <br> Raw | Supported image origin values. |
| RepeatValues | Default <br> Repeat <br> RepeatX <br> RepeatY <br> NoRepeat | Supported image repetition values. |
| SizeValues | Default <br> Cover <br> Contain <br> Raw | Supported image sizing values. |
## Event Definitions
| Name | Parameters | Return Type | Description |
| --- | :---: | :---: | --- |
| MouseEnter | (None) | (None) | Raised when the user's mouse enters the display area. |
| MouseExit | (None) | (None) | Raised when the user's mouse exits the display area. |
| Open | (None) | (None) | |
| Pressed | X as Integer <br> Y as Integer | (None) | Raised when the user left-clicks or touches the control. |
| PressedRight | X as Integer <br> Y as Integer | (None) | Raised when the user right-clicks or long-presses the control. |
| Shown | (None) | (None) | |
## Methods
| Name | Parameters | Return Type | Description |
| --- | :---: | :---: | --- |
| SetBackgroundImage | p as Picture | (None) | Sets the background image of the rectangle to the specified Picture object. |
| SetBackgroundImage | p as WebFile | (None) | Sets the background image of the rectangle to the specified Picture object. |
| SetBackgroundImage | p as WebPicture | (None) | Sets the background image of the rectangle to the specified Picture object. |
## Properties
| Name | Type | Default Value | Description |
| --- | :---: | :---: | --- |
| BorderBottom | Boolean | Nil | Determines whether the rectangle has a bottom border. |
| BorderBottomLeftRadius | Integer | Nil | Radius of the bottom left corner. |
| BorderBottomRightRadius | Integer | Nil | Radius of the bottom right corner. |
| BorderBottomRounded | Boolean | Nil | If True, corners at the bottom will be rounded. Also relies on each side having their Rounded property set to True. |
| BorderBottomSize | Integer | Nil | Size of the border along the bottom side. |
| BorderLeft | Boolean | Nil | Determines whether the rectangle has a left border. |
| BorderLeftRounded | Boolean | Nil | If True, corners on the left will be rounded. Also relies on top and/or bottom having their Rounded property set to True. |
| BorderLeftSize | Integer | Nil | Size of the border along the left side. |
| BorderRight | Boolean | Nil | Determines whether the rectangle has a right border. |
| BorderRightRounded | Boolean | Nil | If True, corners on the right will be rounded. Also relies on top and/or bottom having their Rounded property set to True. |
| BorderRightSize | Integer | Nil | Size of the border along the right side. |
| BorderTop | Boolean | Nil | Determines whether the rectangle has a top border. |
| BorderTopLeftRadius | Integer | Nil | Radius of the top left corner. |
| BorderTopRightRadius | Integer | Nil | Radius of the top right corner. |
| BorderTopRounded | Boolean | Nil | If True, corners at the top will be rounded. Also relies on each side having their Rounded property set to True. |
| BorderTopSize | Integer | Nil | Size of the border along the top side. |
| ColorBackground | Color | Nil | Custom background color. |
| ColorBorder | Color | Nil | Custom border color. |
| CustomBackground | Boolean | Nil | When True, ColorBackground is applied to the rectangle. |
| CustomBorder | Boolean | Nil | When True, ColorBorder is applied to the rectangle. |
| ImageAttachment | AttachmentValues | Nil | Sets whether a background image scrolls with the rest of the page, or is fixed. |
| ImageBackgroundURL | String | Nil | URL to an image to set as the background. The SetBackgroundImage methods populate this property. |
| ImageBlendMode | BlendModes | Nil | Sets how the background image should blend with each other and with the element's background color. |
| ImageClip | BoundaryValues | Nil | Sets whether an element's background extends underneath its border box, padding box, or content box. |
| ImageOrigin | BoundaryValues | Nil | Sets the background's origin: from the border start, inside the border, or inside the padding. |
| ImagePosition | PositionValues | Nil | Sets the initial position for each background image. The position is relative to the position layer set by ImageOrigin. |
| ImagePositionRaw | String | Nil | Custom position value. See here for more information. |
| ImageRepeat | RepeatValues | Nil | Sets whether the image will repeat along X, Y, both, or none axes. |
| ImageSize | SizeValues | Nil | Sets the size of the element's background image. The image can be left to its natural size, stretched, or constrained to fit the available space. |
| ImageSizeRaw | String | Nil | Custom size values. See here for more information. |
| IndicatorBackground | WebUIControl.Indicators | Nil | Bootstrap indicator to apply to the rectangle's background. It is not recommended that you mix IndicatorBackground with ColorBackground. |
| IndicatorBorder | WebUIControl.Indicators | Nil | Bootstrap indicator to apply to the rectangle's border. It is not recommended that you mix IndicatorBorder with ColorBorder. |
| IsOval | Boolean | Nil | When set to True the control will draw as an oval and override the Border*Rounded properties. |