Back to index

python3.2  3.2.2
Public Member Functions | Public Attributes | Private Member Functions | Private Attributes
turtle._TurtleImage Class Reference
Inheritance diagram for turtle._TurtleImage:
Inheritance graph
[legend]
Collaboration diagram for turtle._TurtleImage:
Collaboration graph
[legend]

List of all members.

Public Member Functions

def __init__

Public Attributes

 screen
 shapeIndex
_PyObject_HEAD_EXTRA Py_ssize_t ob_refcnt
struct _typeobjectob_type

Private Member Functions

def _setshape

Private Attributes

 _type
 _item

Detailed Description

Helper class: Datatype to store Turtle attributes

Definition at line 2481 of file turtle.py.


Constructor & Destructor Documentation

def turtle._TurtleImage.__init__ (   self,
  screen,
  shapeIndex 
)

Definition at line 2485 of file turtle.py.

02485 
02486     def __init__(self, screen, shapeIndex):
02487         self.screen = screen
02488         self._type = None
02489         self._setshape(shapeIndex)

Here is the caller graph for this function:


Member Function Documentation

def turtle._TurtleImage._setshape (   self,
  shapeIndex 
) [private]

Definition at line 2490 of file turtle.py.

02490 
02491     def _setshape(self, shapeIndex):
02492         screen = self.screen
02493         self.shapeIndex = shapeIndex
02494         if self._type == "polygon" == screen._shapes[shapeIndex]._type:
02495             return
02496         if self._type == "image" == screen._shapes[shapeIndex]._type:
02497             return
02498         if self._type in ["image", "polygon"]:
02499             screen._delete(self._item)
02500         elif self._type == "compound":
02501             for item in self._item:
02502                 screen._delete(item)
02503         self._type = screen._shapes[shapeIndex]._type
02504         if self._type == "polygon":
02505             self._item = screen._createpoly()
02506         elif self._type == "image":
02507             self._item = screen._createimage(screen._shapes["blank"]._data)
02508         elif self._type == "compound":
02509             self._item = [screen._createpoly() for item in
02510                                           screen._shapes[shapeIndex]._data]
02511 


Member Data Documentation

Definition at line 2504 of file turtle.py.

Definition at line 2487 of file turtle.py.

Definition at line 107 of file object.h.

struct _typeobject* _object::ob_type [inherited]

Definition at line 108 of file object.h.

Definition at line 2486 of file turtle.py.

Definition at line 2492 of file turtle.py.


The documentation for this class was generated from the following file: