Developer

API Reference

BGImageTiledBorder

Brew Release
Brew MP 1.0.2
See Also
Border Background Events IWidget_SetBGImageTiledBorder IWidget_GetBGImageTiledBorder
Description
Structure used to specify the size of each region in a tiled background image.
Members
  • left   : Padding that will occur on the left of a tile
  • top    : Padding that will occur on the top of a tile
  • right  : Padding that will occur on the right of a tile
  • bottom : Padding that will occur on the bottom of a tile
    
Definition
typedef struct {
   uint16   left;
   uint16   top;
   uint16   right;
   uint16   bottom;
} BGImageTiledBorder;
Comment
It is recommended you interact with this structure through the IWidget_SetBGImageTiledBorder function because it will automatically pack up the data for you and report any error conditions.
All values are specified such that the offset given will be with respect to their given side and increase inwards such that a value of zero would represent the far edge and a value equal to half the total size of the image in a direction would be the center of the widget.
These four dimensions will then create up to 9 distinct regions in the tiled image. By setting one or more of the parameters to zero, you can change the tiling based on your needs. For example, if you specify that both the left and right regions have a size of 0 pixels, you will end up with only 3 regions: a top, middle, and bottom region.
   |--------------------------------------------------|
   |        |             ^                 |         |
   |        |             |                 |         |
   |   1    |            top      2         |    3    |
   |        |             |                 |         |
   |        |             v                 |         |
   |--------|-------------------------------|---------|
   |        |                               |         |
   |        |                               |         |
   |<-left->|             5                 |<-right->|
   |        |                               |         |
   |   4    |                               |    6    |
   |--------|-------------------------------|---------|
   |        |             ^                 |         |
   |        |             |                 |         |
   |   7    |       8   bottom              |   9     |
   |        |             |                 |         |
   |        |             v                 |         |
   |--------------------------------------------------|
  • Follow