VCL
[ class tree: VCL ] [ index: VCL ] [ all elements ]

Class: Pen

Source Location: /graphics.inc.php

Class Overview

Object
   |
   --Persistent
      |
      --Pen

Pen is used to draw lines or outline shapes on a canvas.


Author(s):

Variables

Methods


Inherited Variables

Inherited Methods

Class: Persistent

Persistent::allowserialize()
This method provides an opportunity for the component developer to prevent the serialization/unserialization of a property.
Persistent::assign()
Assigns the source properties to this object.
Persistent::assignError()
Raises an assignation error.
Persistent::assignTo()
Assigns this object to another object.
Persistent::inSession()
This method determines if this object exists in the current session.
Persistent::readNamePath()
Used to serialize/unserialize. It returns the full path to identify this component.
Persistent::readOwner()
Owner of the component.
Persistent::serialize()
Stores this object into the session.
Persistent::unserialize()
This method uses PHP reflection to iterate through published properties (the ones starting with get) and retrieve the properties stored by a previous serialize() call.

Class: Object

Object::__construct()
Constructs an object and initializes its data before the object is first used.
Object::className()
Returns a string indicating the type of the object instance (as opposed to the type of the variable passed as an argument).
Object::classNameIs()
Determines whether an object is of a specific type.
Object::classParent()
Returns the type of the immediate ancestor of a class.
Object::inheritsFrom()
Determines the relationship of two object types.
Object::methodExists()
Check if a method exists declared on this object instance.
Object::readProperty()
Reads a property from the streams
Object::__get()
To virtualize properties
Object::__set()
To virtualize properties

Class Details

[line 1037]
Pen is used to draw lines or outline shapes on a canvas.

Use Pen to describe the attributes of a pen when drawing something to a canvas (Canvas). Pen encapsulates the pen properties that are selected into the canvas.

  1.  <?php
  2.    function PaintBox1Paint($sender$params)
  3.    {
  4.     $this->PaintBox1->Canvas->Pen->Color="#FF0000";
  5.     $this->PaintBox1->Canvas->Line(0,0,100,100);
  6.  
  7.     $this->PaintBox1->Canvas->Brush->Color="#00FF00";
  8.     $this->PaintBox1->Canvas->Rectangle(100,100,200,200);
  9.  
  10.     $this->PaintBox1->Canvas->TextOut(50,50"VCL for PHP Canvas");
  11.    }
  12.  ?>




Tags:



[ Top ]


Class Variables

$_color = "#000000"

[line 1039]



Tags:

access:  protected

Type:   mixed


[ Top ]

$_control = null

[line 1043]



Tags:

access:  public

Type:   mixed


[ Top ]

$_modified = 0

[line 1042]



Tags:

access:  protected

Type:   mixed


[ Top ]

$_width = "1"

[line 1040]



Tags:

access:  protected

Type:   mixed


[ Top ]



Class Methods


method assignTo [line 1050]

void assignTo( $dest)



Overrides Persistent::assignTo() (Assigns this object to another object.)

Parameters:

   $dest  

[ Top ]

method defaultColor [line 1083]

void defaultColor( )



[ Top ]

method defaultWidth [line 1095]

void defaultWidth( )



[ Top ]

method getColor [line 1081]

string getColor( )

Determines the color used to draw lines on the canvas.

Set Color to change the color used to draw lines or outline shapes.




[ Top ]

method getWidth [line 1093]

integer getWidth( )

Specifies the width of the pen in pixels.

Use Width to give the line greater weight. If you attempt to set Width to a value less than 0, the new value is ignored.




[ Top ]

method isModified [line 1067]

boolean isModified( )

Returns true if the properties of the Pen has been modified



[ Top ]

method modified [line 1060]

void modified( )

Set this Pen as being modified



[ Top ]

method readOwner [line 1045]

void readOwner( )



Overrides Persistent::readOwner() (Owner of the component.)

[ Top ]

method resetModified [line 1072]

void resetModified( )

Sets the modified flag to 0



[ Top ]

method setColor [line 1082]

void setColor( $value)



Parameters:

   $value  

[ Top ]

method setWidth [line 1094]

void setWidth( $value)



Parameters:

   $value  

[ Top ]


Documentation generated on Sat, 13 Jun 2009 10:51:44 -0700 by phpDocumentor 1.4.1