phystricks
Public Member Functions | Public Attributes | Private Member Functions | Private Attributes | List of all members
phystricks.src.ObjectGraph.ObjectGraph Class Reference

This class is supposed to be used to create other "<Foo>Graph" by inheritance. More...

Inheritance diagram for phystricks.src.ObjectGraph.ObjectGraph:
Inheritance graph
[legend]
Collaboration diagram for phystricks.src.ObjectGraph.ObjectGraph:
Collaboration graph
[legend]

Public Member Functions

def __init__ (self, obj)
 
def draw_edges (self)
 
def wave (self, dx, dy)
 
def get_arrow (self, llam)
 
def get_mark (self, dist, angle=None, text=None, mark_point=None, added_angle=None, position=None, pspict=None)
 
def put_mark (self, dist=None, angle=None, text="", mark_point=None, added_angle=None, position=None, pspict=None, pspicts=None)
 put a mark on an object More...
 
def add_option (self, opt)
 
def get_option (opt)
 
def remove_option (opt)
 
def merge_options (self, graph)
 
def conclude_params (self)
 
def params (self, language, refute=[])
 
def bracketAttributesText (self, language, refute=[])
 
def action_on_pspict (self, pspict)
 
def conclude (self, pspict)
 
def bounding_box (self, pspict=None)
 
def math_bounding_box (self, pspict)
 
def latex_code (self, pspict, language=None)
 

Public Attributes

 obj
 
 parameters
 
 wavy
 
 waviness
 
 options
 
 draw_bounding_box
 
 already_computed_BB
 
 already_computed_math_BB
 
 record_add_to_bb
 
 separator_name
 
 in_math_bounding_box
 
 in_bounding_box
 
 added_objects
 
 take_BB
 
 take_math_BB
 
 mark
 
 marque
 

Private Member Functions

def _draw_added_objects (self, pspict)
 

Private Attributes

 _draw_edges
 

Detailed Description

This class is supposed to be used to create other "<Foo>Graph" by inheritance.

Objects that are going to be drawn have to derive from ObjectGraph. When creating you own class,

Constructor & Destructor Documentation

def phystricks.src.ObjectGraph.ObjectGraph.__init__ (   self,
  obj 
)

Member Function Documentation

def phystricks.src.ObjectGraph.ObjectGraph._draw_added_objects (   self,
  pspict 
)
private
def phystricks.src.ObjectGraph.ObjectGraph.action_on_pspict (   self,
  pspict 
)
def phystricks.src.ObjectGraph.ObjectGraph.add_option (   self,
  opt 
)
def phystricks.src.ObjectGraph.ObjectGraph.bounding_box (   self,
  pspict = None 
)
def phystricks.src.ObjectGraph.ObjectGraph.bracketAttributesText (   self,
  language,
  refute = [] 
)
def phystricks.src.ObjectGraph.ObjectGraph.conclude (   self,
  pspict 
)
The `conclude` function allows an object to make its ultimate
settings before to be drawn.
This is used for objects like axes that have a list of added objects
(the graduation bars) that can depend on the other objects in the 
picture.
def phystricks.src.ObjectGraph.ObjectGraph.conclude_params (   self)
However the better way to add something like
linewidth=1mm
to a graph object `seg` is to use
seg.add_option("linewidth=1mm")
def phystricks.src.ObjectGraph.ObjectGraph.draw_edges (   self)
def phystricks.src.ObjectGraph.ObjectGraph.get_arrow (   self,
  llam 
)
return a small arrow at position 'llam'.

This only works if one has a 'get_tangent_vector' method.

- `llam` could be radian, degree or something else, depending on the 
    actual object on which you are using this.
def phystricks.src.ObjectGraph.ObjectGraph.get_mark (   self,
  dist,
  angle = None,
  text = None,
  mark_point = None,
  added_angle = None,
  position = None,
  pspict = None 
)
- `angle` is degree or AngleMeasure

In the internal representation of the mark, 
the angle type will be `AngleMeasure`
def phystricks.src.ObjectGraph.ObjectGraph.get_option (   opt)
def phystricks.src.ObjectGraph.ObjectGraph.latex_code (   self,
  pspict,
  language = None 
)
def phystricks.src.ObjectGraph.ObjectGraph.math_bounding_box (   self,
  pspict 
)
def phystricks.src.ObjectGraph.ObjectGraph.merge_options (   self,
  graph 
)
Take an other object <Foo>Graph and merges the options as explained in the documentation of the class Options. 
That merge takes into account the attributes "color", "style", wavy
def phystricks.src.ObjectGraph.ObjectGraph.params (   self,
  language,
  refute = [] 
)
def phystricks.src.ObjectGraph.ObjectGraph.put_mark (   self,
  dist = None,
  angle = None,
  text = "",
  mark_point = None,
  added_angle = None,
  position = None,
  pspict = None,
  pspicts = None 
)

put a mark on an object

If you want to put a mark on an object P.put_mark(0.1,text="foobar",pspict=pspict,position="N")

   mark_point is a function which returns the position of the mark point.

   If you give no position (i.e. no "S","N", etc.) the position will
  be automatic regarding the angle.

   - ``angle`` is given in degree.

set position to "center" is dangerous because it puts the center of the box at given angle and distance. Thus the text can be ill placed, especially if the given dist is lower than the half of the box size.

center_direction : the mark is placed in such a way that the center is at given angle, and the box's border at given distance.

def phystricks.src.ObjectGraph.ObjectGraph.remove_option (   opt)
def phystricks.src.ObjectGraph.ObjectGraph.wave (   self,
  dx,
  dy 
)

Member Data Documentation

phystricks.src.ObjectGraph.ObjectGraph._draw_edges
private
phystricks.src.ObjectGraph.ObjectGraph.added_objects
phystricks.src.ObjectGraph.ObjectGraph.already_computed_BB
phystricks.src.ObjectGraph.ObjectGraph.already_computed_math_BB
phystricks.src.ObjectGraph.ObjectGraph.draw_bounding_box
phystricks.src.ObjectGraph.ObjectGraph.in_bounding_box
phystricks.src.ObjectGraph.ObjectGraph.in_math_bounding_box
phystricks.src.ObjectGraph.ObjectGraph.mark
phystricks.src.ObjectGraph.ObjectGraph.marque
phystricks.src.ObjectGraph.ObjectGraph.obj
phystricks.src.ObjectGraph.ObjectGraph.options
phystricks.src.ObjectGraph.ObjectGraph.parameters
phystricks.src.ObjectGraph.ObjectGraph.record_add_to_bb
phystricks.src.ObjectGraph.ObjectGraph.separator_name
phystricks.src.ObjectGraph.ObjectGraph.take_BB
phystricks.src.ObjectGraph.ObjectGraph.take_math_BB
phystricks.src.ObjectGraph.ObjectGraph.waviness
phystricks.src.ObjectGraph.ObjectGraph.wavy

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