User Guide
Ruby Component
Texture Brushes
A TextureBrush is defined by a bitmap. When you fill an area with a TextureBrush the bitmap is used repeatedly to tile the area you want to
fill.
You can create an instance as follows:
b = TextureBrush.new bitmap
The bitmap input parameter needs to be a Bitmap object. You need to pass a Bitmap object into your Ruby component so that you can use it
in your TextureBrush.
The example below shows how a TextureBrush is created and used.
Wrapping
When filling an area TextureBrush tiles are placed next to each other. However, you could choose to flip the tiles alternately as you pave
vertically or horizontally to create a more fluid pattern. To do this you need to use the setWrapMode method.
setWrapMode mode
Here are the options for the mode input value:
0 or “tile” Normal tiling is performed – this is the default option
1 or “flipx” Tiling is performed with alternate tiles flipped in the x direction
2 or “flipy” Tiling is performed with alternate tiles flipped in the y direction
3 or “flipxy” Tiling is performed with alternate tiles flipped in the x and y directions
139 of 212