typerig.proxy.objects.shape
typerig.proxy.objects.shape (version 0.26.5)
# MODULE: Typerig / Proxy / Shape (Objects) # ----------------------------------------------------------- # (C) Vassil Kateliev, 2018-2020 (http://www.kateliev.com) # (C) Karandash Type Foundry (http://www.karandash.eu) #------------------------------------------------------------ # www.typerig.com
Modules
- fontgate
- fontlab
- math
- PythonQt
- random
- typerig.core.objects
Classes
- class eShape(pShape)
- Extended representation of the Proxy Shape, adding some advanced functionality. Constructor: eShape(flShape)- Method resolution order:
- eShape
- pShape
- builtin.object
 - Methods- alignTo(self, entity, alignMode='', align=(True, True))
- 
Align current contour. Args: entity () alignMode (String) : L(left), R(right), C(center), T(top), B(bottom), E(vertical center) !ORDER MATTERS
 - contourOrder(self, order=(True, True))
- 
Rearrange shape contours: Args: order (tuple(Bool,Bool)): X (Left(True) to Right(False)) and Y (Bottom(True), Top(False)) order or None to sort on single coordinate. Returns: None
 - getNext(self)
 - getPrev(self)
 - round(self)
 - Methods from pShape- init(self, shape, layer=None, glyph=None)
 - repr(self)
 - builder(self)
- 
Return flShapeBuilder Object 
 - container(self)
- 
Returns a list of flShape Objects that are contained within this shape. 
 - contours(self)
 - copyBuilder(self, source)
- 
# - Complex shapes, builders and etc. --------------------- 
 - data(self)
- 
Return flShapeData Object 
 - decompose(self)
- 
# - Position, composition --------------------------------- 
 - draw(self, pen)
- 
Utilizes the Pen protocol 
 - goBackOf(self, flShape)
 - goDown(self)
 - goFrontOf(self, flShape)
 - goLayerBack(self)
 - goLayerFront(self)
 - goUp(self)
 - info(self)
- 
Return flShapeInfo Object 
 - isChanged(self)
 - nodes(self)
 - reset_transform(self)
- 
# - Transformation ---------------------------------------- 
 - rotate(self, angle, reset=False)
 - scale(self, sx, sy, reset=False)
 - segments(self)
- 
# - Contours, Segmets, Nodes ------------------------------ 
 - setName(self, shape_name)
- 
# - Management --------------------------------- 
 - shear(self, sh, sv, reset=False)
 - shift(self, dx, dy, reset=False)
 - sortContours(self, criteria='y', ascending=True)
 - tag(self, tagString)
 - update(self)
 - Descriptors from pShape- dict
- 
dictionary for instance variables (if defined) 
 - weakref
- 
list of weak references to the object (if defined) 
 
- class pShape(builtin.object)
- Proxy to flShape, flShapeData and flShapeInfo objects Constructor: pShape(flShape) Attributes: .fl (flNode): Original flNode .parent (flContour): parent contour .contour (flContour): parent contour- Methods- init(self, shape, layer=None, glyph=None)
 - repr(self)
 - builder(self)
- 
Return flShapeBuilder Object 
 - container(self)
- 
Returns a list of flShape Objects that are contained within this shape. 
 - contours(self)
 - copyBuilder(self, source)
- 
# - Complex shapes, builders and etc. --------------------- 
 - data(self)
- 
Return flShapeData Object 
 - decompose(self)
- 
# - Position, composition --------------------------------- 
 - draw(self, pen)
- 
Utilizes the Pen protocol 
 - goBackOf(self, flShape)
 - goDown(self)
 - goFrontOf(self, flShape)
 - goLayerBack(self)
 - goLayerFront(self)
 - goUp(self)
 - info(self)
- 
Return flShapeInfo Object 
 - isChanged(self)
 - nodes(self)
 - reset_transform(self)
- 
# - Transformation ---------------------------------------- 
 - rotate(self, angle, reset=False)
 - scale(self, sx, sy, reset=False)
 - segments(self)
- 
# - Contours, Segmets, Nodes ------------------------------ 
 - setName(self, shape_name)
- 
# - Management --------------------------------- 
 - shear(self, sh, sv, reset=False)
 - shift(self, dx, dy, reset=False)
 - sortContours(self, criteria='y', ascending=True)
 - tag(self, tagString)
 - update(self)
 - Descriptors- dict
- 
dictionary for instance variables (if defined) 
 - weakref
- 
list of weak references to the object (if defined) 
 
pShape
typerig.proxy.objects.shape.pShape = class pShape(__builtin__.object)
Proxy to flShape, flShapeData and flShapeInfo objects
Constructor:
        pShape(flShape)
Attributes:
        .fl (flNode): Original flNode 
        .parent (flContour): parent contour
        .contour (flContour): parent contour
Methods
- __init__(self, shape, layer=None, glyph=None)
- __repr__(self)
- builder(self)
- 
Return flShapeBuilder Object 
- container(self)
- 
Returns a list of flShape Objects that are contained within this shape. 
- contours(self)
- copyBuilder(self, source)
- 
# - Complex shapes, builders and etc. --------------------- 
- data(self)
- 
Return flShapeData Object 
- decompose(self)
- 
# - Position, composition --------------------------------- 
- draw(self, pen)
- 
Utilizes the Pen protocol 
- goBackOf(self, flShape)
- goDown(self)
- goFrontOf(self, flShape)
- goLayerBack(self)
- goLayerFront(self)
- goUp(self)
- info(self)
- 
Return flShapeInfo Object 
- isChanged(self)
- nodes(self)
- reset_transform(self)
- 
# - Transformation ---------------------------------------- 
- rotate(self, angle, reset=False)
- scale(self, sx, sy, reset=False)
- segments(self)
- 
# - Contours, Segmets, Nodes ------------------------------ 
- setName(self, shape_name)
- 
# - Management --------------------------------- 
- shear(self, sh, sv, reset=False)
- shift(self, dx, dy, reset=False)
- sortContours(self, criteria='y', ascending=True)
- tag(self, tagString)
- update(self)
Descriptors
- __dict__
- 
dictionary for instance variables (if defined) 
- __weakref__
- 
list of weak references to the object (if defined) 
data
- typerig.proxy.objects.shape.pShape.data = data(self) unbound typerig.proxy.objects.shape.pShape method
- 
Return flShapeData Object 
info
- typerig.proxy.objects.shape.pShape.info = info(self) unbound typerig.proxy.objects.shape.pShape method
- 
Return flShapeInfo Object 
builder
- typerig.proxy.objects.shape.pShape.builder = builder(self) unbound typerig.proxy.objects.shape.pShape method
- 
Return flShapeBuilder Object 
container
- typerig.proxy.objects.shape.pShape.container = container(self) unbound typerig.proxy.objects.shape.pShape method
- 
Returns a list of flShape Objects that are contained within this shape. 
draw
- typerig.proxy.objects.shape.pShape.draw = draw(self, pen) unbound typerig.proxy.objects.shape.pShape method
- 
Utilizes the Pen protocol 
eShape
typerig.proxy.objects.shape.eShape = class eShape(pShape)
Extended representation of the Proxy Shape, adding some advanced functionality.
Constructor:
        eShape(flShape)
- Method resolution order:
- eShape
- pShape
- __builtin__.object
Methods
- alignTo(self, entity, alignMode='', align=(True, True))
- 
Align current contour. Args: entity () alignMode (String) : L(left), R(right), C(center), T(top), B(bottom), E(vertical center) !ORDER MATTERS
- asCoord(self)
- 
Returns Coord object of the Bottom lest corner. 
- contourOrder(self, order=(True, True))
- 
Rearrange shape contours: Args: order (tuple(Bool,Bool)): X (Left(True) to Right(False)) and Y (Bottom(True), Top(False)) order or None to sort on single coordinate. Returns: None
- getNext(self)
- getPrev(self)
- round(self)
Methods from pShape
- __init__(self, shape, layer=None, glyph=None)
- __repr__(self)
- builder(self)
- 
Return flShapeBuilder Object 
- container(self)
- 
Returns a list of flShape Objects that are contained within this shape. 
- contours(self)
- copyBuilder(self, source)
- 
# - Complex shapes, builders and etc. --------------------- 
- data(self)
- 
Return flShapeData Object 
- decompose(self)
- 
# - Position, composition --------------------------------- 
- draw(self, pen)
- 
Utilizes the Pen protocol 
- goBackOf(self, flShape)
- goDown(self)
- goFrontOf(self, flShape)
- goLayerBack(self)
- goLayerFront(self)
- goUp(self)
- info(self)
- 
Return flShapeInfo Object 
- isChanged(self)
- nodes(self)
- reset_transform(self)
- 
# - Transformation ---------------------------------------- 
- rotate(self, angle, reset=False)
- scale(self, sx, sy, reset=False)
- segments(self)
- 
# - Contours, Segmets, Nodes ------------------------------ 
- setName(self, shape_name)
- 
# - Management --------------------------------- 
- shear(self, sh, sv, reset=False)
- shift(self, dx, dy, reset=False)
- sortContours(self, criteria='y', ascending=True)
- tag(self, tagString)
- update(self)
Descriptors from pShape
- __dict__
- 
dictionary for instance variables (if defined) 
- __weakref__
- 
list of weak references to the object (if defined) 
asCoord
- typerig.proxy.objects.shape.eShape.asCoord = asCoord(self) unbound typerig.proxy.objects.shape.eShape method
- 
Returns Coord object of the Bottom lest corner. 
contourOrder
- typerig.proxy.objects.shape.eShape.contourOrder = contourOrder(self, order=(True, True)) unbound typerig.proxy.objects.shape.eShape method
- 
Rearrange shape contours: Args: order (tuple(Bool,Bool)): X (Left(True) to Right(False)) and Y (Bottom(True), Top(False)) order or None to sort on single coordinate. Returns: None
alignTo
- typerig.proxy.objects.shape.eShape.alignTo = alignTo(self, entity, alignMode='', align=(True, True)) unbound typerig.proxy.objects.shape.eShape method
- 
Align current contour. Args: entity () alignMode (String) : L(left), R(right), C(center), T(top), B(bottom), E(vertical center) !ORDER MATTERS