PLEASE RELOAD
Advanced Brushes



Info

Here's two other ways to use brushes; IMG_COLOR_BRUSHED and IMG_COLOR_STYLEDBRUSHED.

These require an array or sequence of A color ending in a different color, to function. A color is assigned i.e. white; and made transparent. Only the png part of the image will draw and be seen.

The array determines how much of the image will be the brush. The more you add to the array the more of the image is used to draw.

IMG_COLOR_BRUSHED

We then draw the shapes as regular but instead of designating the color variable at the end we designate brush. Here's an example:
//imageEllipse($im, 60, 200, 100, 50, IMG_COLOR_BRUSHED);

We have not directed the brush to have style so the lines are the png color of the image and are very smooth. At the end of the draw the total image is seen.

Here's an Example


IMG_COLOR_STYLEDBRUSHED

For this command we are designating the style which is the image. In this case pieces of the image are used; not just the color and is written like this:

//imageEllipse($im, 60, 200, 100, 50, IMG_COLOR_STYLEDBRUSHED);

At the end of the draw again the total image is seen.

Here's an Example


Styled Brushed can be used to show the movement of your graphic. In this example, our friend Mr. Toast seems to be flying through the air.

Different graphics will give different results..and one good graphic can give you multiple images; or you can use pieces of the graphic to show it's movement. The length of the array plays a pivotal role in these commands.



http://www.simplysally.com/GD/lessons/lesson11.zip


GD BasicsHome