yana

Description
  Class trees
  Index of elements
  Todo List
core
  Classes
    FormCreator
    Index
    Language
    Object
    Plugin
    PluginManager
    Singleton
    SmartTemplate
    SmartView
    Utility
    Yana
database
  Classes
    DbBlob
    DbCreator
    DbDesigner4
    DbExtractor
    DbQuery
    DbQueryParser
    DbServer
    DbStream
    DbStructure
    FileDb
error_reporting
  Classes
    Alert
    Error
    ErrorUtility
    Log
    Message
    Report
    Warning
file_system
  Classes
    DatFile
    Dir
    Executeable
    File
    FileReadonly
    FileSystemResource
    SML
javascript
  Classes
    AjaxRequest
  Functions
    preview
    yanaAddEventListener
    yanaAddIcon
    yanaCheckEmbTags
    yanaCloseAll
    yanaGetCookie
    yanaGetElementsByClassName
    yanaMaxLength
    yanaMenu
    yanaMenuCookie
    yanaSetCookie
mail
  Classes
    FormMailer
    Mailer
plugins
  Classes
    plugin_blog
    plugin_check
    plugin_db_admin
    plugin_db_tools
    plugin_default_library
    plugin_diagnostics
    plugin_guestbook
    plugin_guestbook_admin
    plugin_ipblock
    plugin_ipblock_admin
    plugin_rss
    plugin_rss_admin
    plugin_sdk
    plugin_search
    plugin_search_admin
    plugin_user
    plugin_user_admin
utilities
  Classes
    Brush
    Counter
    Hashtable
    Image
    Microsummary
    RSS
    RSSitem
    String
  Functions
    checkArgumentList
    cloneArray
    dirlist
    qSearchArray
    untaintInput
    XMLencode
vdrive
  Classes
    Registry
    VDrive
zip
  Classes
    PclZip

phpDocumentor v 1.4.0

YANA Framework for PHPDocs For Class Brush

### Class Brush

#### Description

Brush wrapper class
This class is meant as an add-on to the framework's Image class. It is intended to handle predefined brushes in PNG format, which reside in the directory "common_files/brush/*.png" to ease work with images.
Brush images need to be 2-colored black/white images with color index 0 being black and index 1 being the transparent color and width == height.

- see: Image
- since: 2.8.7
- access: public

    Object
       |
       --Brush

##### Method Summary

- Brush Brush ([string $brushname = null])
- Object cloneObject ()
- bool equals (object $anotherObject)
- array getColor ()
- string getName ()
- int|bool(false) getSize ()
- string setColor (int $r, int $g, int $b)
- bool setSize (int $size)
- bool setSourceDirectory (string $directory)
- string toString ()

#### Methods

##### create a new instance of this class

Brush Brush (
[string $brushname = null]
)

###### List of parameters:

Name | Type | Description
--- | --- | ---
$brushname | string | see list

###### Description:

The argument $brushname determines wich brush to take the input from. If $brushname is not provided, a 1px square is used.
The brush name can be any name of an existing PNG image (without the file extension), that must reside in the "common_files/brush/*.png" directory.
Here are some examples:

- airbrush
- small circle
- circle
- dot
- small star
- star
- square
- point (default)

##### clone this object

Object cloneObject ()

###### Description:

Creates a copy of this object. You are encouraged to reimplement this for each subclass.

- access: public

Redefinition of: Object::cloneObject()

##### compare with another object

bool equals (
object $anotherObject
)

###### List of parameters:

Name | Type | Description
--- | --- | ---
$anotherObject | object | any var to compare this object with

###### Description:

Returns bool(true) if this object and $anotherObject are the booth object which have an image resource that is the same, or $anotherObject is an image resource and identical to the one of this object.
Returns bool(false) otherwise.

- access: public

Redefinition of: Object::equals()

##### get the color of this brush

array getColor ()

###### Description:

Returns an associative array of the red, green and blue values of the current brush color. Returns bool(false) on error.

- access: public

##### get name of this brush

string getName ()

###### Description:

Returns bool(false) on error.

- access: public

##### get brush size

int|bool(false) getSize ()

###### Description:

Returns the brush's dimension in pixel or bool(false) on error.

- access: public

##### set the color of this brush

string setColor (
int $r, int $g, int $b
)

###### List of parameters:

Name | Type | Description
--- | --- | ---
$r | int | red value
$g | int | green value
$b | int | blue value

###### Description:

This function sets the color of the brush to a certain value, where the input is the red, green and blue values of this color.
The arguments $r, $g and $b need to be integer values between 0 and 255. For example, $r = 0 is interpreted as "0% red" and $r = 255 is interpreted as "100% red".

- access: public

##### Resize the brush

bool setSize (
int $size
)

###### List of parameters:

Name | Type | Description
--- | --- | ---
$size | int | brush size in pixel

###### Description:

This resizes the brush.
The argument $size is the new size in pixel.
Returns bool(false) on error.

- access: public

##### set the directory that contains the brushes

bool setSourceDirectory (
string $directory
)

###### List of parameters:

Name | Type | Description
--- | --- | ---
$directory | string | new source directory

###### Description:

This function will set the source directory for brushes. The next time you create a Brush object, the png image will automatically be searched for in the directory you provided here.
Returns bool(true) on success and bool(false) on error.

- since: 2.8.8
- access: public

##### get a string representation of this object

string toString ()

###### Description:

This function is intended to be called when the object is used in a string context.

- access: public

Redefinition of: Object::toString()

##### inherited from base classes

Inherited From Object

- Object::cloneObject()
- Object::equals()
- Object::getClass()
- Object::serialize()
- Object::toString()

Documentation generated on Sun, 04 Jan 2009 03:49:05 +0100 by phpDocumentor 1.4.0

yana author: Thomas Meyerwww.yanaframework.net