phystricks
Public Member Functions | Public Attributes | Private Attributes | List of all members
phystricks.src.parameters.Parameters.Parameters Class Reference
Inheritance diagram for phystricks.src.parameters.Parameters.Parameters:
Inheritance graph
[legend]
Collaboration diagram for phystricks.src.parameters.Parameters.Parameters:
Collaboration graph
[legend]

Public Member Functions

def __init__ (self, graph=None)
 
def bracketAttributesDictionary (self)
 
def copy (self)
 
def filled (self)
 
def hatched (self)
 
def add_option (self, key, value)
 
def add_to_options (self, opt)
 
def add_to (self, parameters, force=False)
 
def replace_to (self, parameters)
 

Public Attributes

 color
 
 symbol
 
 style
 
 dotangle
 
 linewidth
 
 bracket_attributes
 
 fill
 
 hatch
 
 other_options
 
 visual
 
 trivial
 
 graph
 

Private Attributes

 _filled
 
 _hatched
 

Constructor & Destructor Documentation

def phystricks.src.parameters.Parameters.Parameters.__init__ (   self,
  graph = None 
)

Member Function Documentation

def phystricks.src.parameters.Parameters.Parameters.add_option (   self,
  key,
  value 
)
Add options that will be added to to code.

    sage: from phystricks.BasicGeometricObjects import *
    sage: seg=Segment(Point(0,0),Point(1,1))
    sage: seg.parameters.add_option("linewidth","1mm")

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.parameters.Parameters.Parameters.add_to (   self,
  parameters,
  force = False 
)
Add `self` to `parameters`.

Where `self` has non-trivial or non-default values, put these values to `parameters`

By default, it only fills the "empty" slots (None and False). 
If `force` is True, it fills all.
def phystricks.src.parameters.Parameters.Parameters.add_to_options (   self,
  opt 
)
Add to the object `opt` (type Option) the different options that correspond to the parameters.

In an imaged way, this method adds `self` to the object `opt`.
def phystricks.src.parameters.Parameters.Parameters.bracketAttributesDictionary (   self)
Return a dictionary for the bracket attributes and their values.
See also the position 1935811332
def phystricks.src.parameters.Parameters.Parameters.copy (   self)
def phystricks.src.parameters.Parameters.Parameters.filled (   self)
def phystricks.src.parameters.Parameters.Parameters.hatched (   self)
def phystricks.src.parameters.Parameters.Parameters.replace_to (   self,
  parameters 
)
The same as :func:`add_to`, but replace also non-trivial parameters

EXAMPLES::

    sage: from phystricks.BasicGeometricObjects import *
    sage: p1=Parameters()
    sage: p1.color="red"
    sage: p1.symbol="A"

    sage: p2=Parameters()
    sage: p2.style="solid"
    sage: p2.symbol="B"
    sage: p2.filled()
    sage: p2.fill.color="cyan"

    sage: p2.replace_to(p1)
    sage: print p1.color,p1.style,p1.symbol,p1._filled,p1.fill.color
    red solid B True cyan

Notice that here `p1.style` is replace while it was not replaced by the function 
:func:`add_to`.

Member Data Documentation

phystricks.src.parameters.Parameters.Parameters._filled
private
phystricks.src.parameters.Parameters.Parameters._hatched
private
phystricks.src.parameters.Parameters.Parameters.bracket_attributes
phystricks.src.parameters.Parameters.Parameters.color
phystricks.src.parameters.Parameters.Parameters.dotangle
phystricks.src.parameters.Parameters.Parameters.fill
phystricks.src.parameters.Parameters.Parameters.graph
phystricks.src.parameters.Parameters.Parameters.hatch
phystricks.src.parameters.Parameters.Parameters.linewidth
phystricks.src.parameters.Parameters.Parameters.other_options
phystricks.src.parameters.Parameters.Parameters.style
phystricks.src.parameters.Parameters.Parameters.symbol
phystricks.src.parameters.Parameters.Parameters.trivial
phystricks.src.parameters.Parameters.Parameters.visual

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