Package wx :: Package lib :: Package ogl :: Class Shape

[frames | no frames]

## Type Shape

         object --+
                  |
    ShapeEvtHandler --+
                      |
                     Shape

Known Subclasses:
  `EllipseShape`, `LineShape`, `PolygonShape`, `RectangleShape`

OGL base class

Shape(canvas = None)

The wxShape is the top-level, abstract object that all other objects are derived from. All common functionality is represented by wxShape's members, and overriden members that appear in derived classes and have behaviour as documented for wxShape, are not documented separately.

Method Summary
| `__init__(self, canvas)`
| `__str__(self)`
| ``AddLine`(self, line, other, attachFrom, attachTo, positionFrom, positionTo)` Add a line between this shape and the given other shape, at the specified attachment points.
| ``AddRegion`(self, region)` Add a region to the shape.
| ``AddText`(self, string)` Add a line of text to the shape's default text region.
| ``AddToCanvas`(self, theCanvas, addAfter)` Add the shape to the canvas's shape list.
| ``AncestorSelected`(self)` TRUE if the shape's ancestor is currently selected.
| ``ApplyAttachmentOrdering`(self, linesToSort)` Apply the line ordering in linesToSort to the shape, to reorder the way lines are attached.
| ``AssignNewIds`(self)` Assign new ids to this image and its children.
| ``Attach`(self, can)` Set the shape's internal canvas pointer to point to the given canvas.
| ``AttachmentIsValid`(self, attachment)` TRUE if attachment is a valid attachment point.
| ``AttachmentSortTest`(self, attachmentPoint, pt1, pt2)` Return TRUE if pt1 is less than or equal to pt2, in the sense that one point comes before another on an edge of the shape.
| ``CalcSimpleAttachment`(self, pt1, pt2, nth, noArcs, line)` Assuming the attachment lies along a vertical or horizontal line, calculate the position on that point.
| ``ClearAttachments`(self)` Clear internal custom attachment point shapes (of class wxAttachmentPoint).
| ``ClearRegions`(self)` Clear the ShapeRegions from the shape.
| ``ClearText`(self, regionId)` Clear the text from the specified text region.
| ``Delete`(self)` Fully disconnect this shape from parents, children, the canvas, etc.
| ``DeleteControlPoints`(self, dc)` Delete the control points (or handles) for the shape.
| ``Detach`(self)` Disassociates the shape from its canvas.
| ``Draggable`(self)` TRUE if the shape may be dragged by the user.
| ``Draw`(self, dc)` Draw the whole shape and any lines attached to it.
| ``DrawContents`(self, dc)` Draw the internal graphic of the shape (such as text).
| ``DrawLinks`(self, dc, attachment, recurse)` Draws any lines linked to this shape.
| ``Erase`(self, dc)` Erase the shape.
| ``EraseContents`(self, dc)` Erase the shape contents, that is, the area within the shape's minimum bounding box.
| ``EraseLinks`(self, dc, attachment, recurse)` Erase links attached to this shape, but do not repair damage caused to other shapes.
| ``FindRegion`(self, name)` Find the actual image ('this' if non-composite) and region id for the given region name.
| ``FindRegionNames`(self)` Get a list of all region names for this image (composite or simple).
| ``Flash`(self)` Flash the shape.
| ``FormatText`(self, dc, s, i)` Reformat the given text region; defaults to formatting the default region.
| ``GetAttachmentLineCount`(self, attachment)` Get the number of lines at this attachment position.
| ``GetAttachmentMode`(self)` Return the attachment mode.
| ``GetAttachmentPosition`(self, attachment, nth, no_arcs, line)` Get the position at which the given attachment point should be drawn.
| ``GetAttachmentPositionEdge`(self, attachment, nth, no_arcs, line)` Only get the attachment position at the _edge_ of the shape, ignoring branching mode.
| ``GetBackgroundBrush`(self)` Return brush of the right colour for the background.
| ``GetBackgroundPen`(self)` Return pen of the right colour for the background.
| ``GetBoundingBoxMax`(self)` Get the maximum bounding box for the shape, taking into account external features such as shadows.
| ``GetBoundingBoxMin`(self)` Get the minimum bounding box for the shape, that defines the area available for drawing the contents (such as text).
| ``GetBranchingAttachmentInfo`(self, attachment)` Get information about where branching connections go.
| `GetBranchingAttachmentPoint(self, attachment, n)`
| ``GetBranchingAttachmentRoot`(self, attachment)` Get the root point at the given attachment.
| `GetBranchStyle(self)`
| ``GetBrush`(self)` Return the brush used for filling the shape.
| ``GetCanvas`(self)` Get the internal canvas.
| ``GetCentreResize`(self)` TRUE if the shape is to be resized from the centre (the centre stands still), or FALSE if from the corner or side being dragged (the other corner or side stands still)
| ``GetChildren`(self)` Return the list of children for this shape.
| `GetClassName(self)`
| ``GetDisableLabel`(self)` TRUE if the default region will not be shown, FALSE otherwise.
| ``GetDrawHandles`(self)` Return the list of drawhandles.
| ``GetEventHandler`(self)` Return the event handler for this shape.
| ``GetFixedHeight`(self)` TRUE if the shape cannot be resized in the vertical plane.
| ``GetFixedSize`(self)` Return flags indicating whether the shape is of fixed size in either direction.
| ``GetFixedWidth`(self)` TRUE if the shape cannot be resized in the horizontal plane.
| ``GetFont`(self, regionId)` Get the font for the specified text region.
| `GetFormatMode(self, regionId)`
| ``GetId`(self)` Return the integer identifier for this shape.
| ``GetLinePosition`(self, line)` Get the zero-based position of line in the list of lines for this shape.
| ``GetLines`(self)` Return the list of lines connected to this shape.
| ``GetMaintainAspectRatio`(self)` TRUE if shape keeps aspect ratio during resize.
| ``GetNumberOfAttachments`(self)` Get the number of attachment points for this shape.
| ``GetNumberOfTextRegions`(self)` Return the number of text regions for this shape.
| ``GetParent`(self)` Return the parent of this shape, if it is part of a composite.
| ``GetPen`(self)` Return the pen used for drawing the shape's outline.
| ``GetPerimeterPoint`(self, x1, y1, x2, y2)` Get the point at which the line from (x1, y1) to (x2, y2) hits the shape.
| ``GetRegionId`(self, name)` Get the region's identifier by name.
| ``GetRegionName`(self, regionId)` Get the region's name.
| ``GetRegions`(self)` Return the list of ShapeRegions.
| ``GetRotation`(self)` Return the angle of rotation in radians.
| ``GetSensitivityFilter`(self)` Return the sensitivity filter, a bitlist of values.
| ``GetShadowMode`(self)` Return the current shadow mode setting
| ``GetSpaceAttachments`(self)` Return whether lines should be spaced out evenly at the point they touch the node (True), or whether they should join at a single point (False).
| ``GetTextColour`(self, regionId)` Get the colour for the specified text region.
| ``GetTopAncestor`(self)` Return the top-most ancestor of this shape (the root of the composite).
| ``GetX`(self)` Get the x position of the centre of the shape.
| ``GetY`(self)` Get the y position of the centre of the shape.
| ``HasDescendant`(self, image)` TRUE if image is a descendant of this composite.
| ``HitTest`(self, x, y)` Given a point on a canvas, returns TRUE if the point was on the shape, and returns the nearest attachment point and distance from the given point and target.
| ``InsertInCanvas`(self, theCanvas)` Insert the shape at the front of the shape list of canvas.
| ``IsHighlighted`(self)` TRUE if the shape is highlighted.
| ``IsShown`(self)` TRUE if the shape is in a visible state, FALSE otherwise.
| ``LogicalToPhysicalAttachment`(self, logicalAttachment)` Rotate the standard attachment point from logical to physical (0 is always North).
| ``MakeControlPoints`(self)` Make a list of control points (draggable handles) appropriate to the shape.
| ``MakeMandatoryControlPoints`(self)` Make the mandatory control points.
| ``Move`(self, dc, x, y, display)` Move the shape to the given position.
| ``MoveLineToNewAttachment`(self, dc, to_move, x, y)` Move the given line (which must already be attached to the shape) to a different attachment point on the shape, or a different order on the same attachment.
| ``MoveLinks`(self, dc)` Redraw all the lines attached to the shape.
| ``NameRegions`(self, parentName)` Make unique names for all the regions in a shape or composite shape.
| `OnBeginDragLeft(self, x, y, keys, attachment)`
| `OnBeginDragRight(self, x, y, keys, attachment)`
| `OnChangeAttachment(self, attachment, line, ordering)`
| `OnDragLeft(self, draw, x, y, keys, attachment)`
| `OnDragRight(self, draw, x, y, keys, attachment)`
| `OnDraw(self, dc)`
| `OnDrawBranches(self, dc, erase)`
| `OnDrawBranchesAttachment(self, dc, attachment, erase)`
| `OnDrawContents(self, dc)`
| `OnDrawControlPoints(self, dc)`
| `OnDrawOutline(self, dc, x, y, w, h)`
| `OnEndDragLeft(self, x, y, keys, attachment)`
| `OnEndDragRight(self, x, y, keys, attachment)`
| `OnErase(self, dc)`
| `OnEraseContents(self, dc)`
| `OnEraseControlPoints(self, dc)`
| `OnHighlight(self, dc)`
| `OnLeftClick(self, x, y, keys, attachment)`
| `OnMoveLinks(self, dc)`
| `OnMovePre(self, dc, x, y, old_x, old_y, display)`
| `OnRightClick(self, x, y, keys, attachment)`
| `OnSize(self, x, y)`
| `OnSizingBeginDragLeft(self, pt, x, y, keys, attachment)`
| `OnSizingDragLeft(self, pt, draw, x, y, keys, attachment)`
| `OnSizingEndDragLeft(self, pt, x, y, keys, attachment)`
| ``PhysicalToLogicalAttachment`(self, physicalAttachment)` Rotate the standard attachment point from physical (0 is always North) to logical (0 -> 1 if rotated by 90 degrees)
| ``Recentre`(self, dc)` Do recentring (or other formatting) for all the text regions for this shape.
| ``Recompute`(self)` Recomputes any constraints associated with the shape.
| ``RemoveFromCanvas`(self, theCanvas)` Remove the shape from the canvas.
| ``RemoveLine`(self, line)` Remove the given line from the shape's list of attached lines.
| ``ResetControlPoints`(self)` Reset the positions of the control points (for instance when the shape's shape has changed).
| ``ResetMandatoryControlPoints`(self)` Reset the mandatory control points.
| ``Rotate`(self, x, y, theta)` Rotate about the given axis by the given amount in radians.
| ``Select`(self, select, dc)` Select or deselect the given shape, drawing or erasing control points (handles) as necessary.
| ``Selected`(self)` TRUE if the shape is currently selected.
| ``SetAttachmentMode`(self, mode)` Set the attachment mode.
| `SetAttachmentSize(self, w, h)`
| ``SetBrush`(self, the_brush)` Set the brush for filling the shape's shape.
| ``SetCanvas`(self, theCanvas)` Identical to Shape.Attach.
| ``SetCentreResize`(self, cr)` Specify whether the shape is to be resized from the centre (the centre stands still) or from the corner or side being dragged (the other corner or side stands still).
| ``SetDefaultRegionSize`(self)` Set the default region to be consistent with the shape size.
| ``SetDisableLabel`(self, flag)` Set flag to TRUE to stop the default region being shown.
| ``SetDraggable`(self, drag, recursive)` Set the shape to be draggable or not draggable.
| ``SetDrawHandles`(self, drawH)` Set the drawHandles flag for this shape and all descendants.
| ``SetEventHandler`(self, handler)` Set the event handler for this shape.
| ``SetFixedSize`(self, x, y)` Set the shape to be fixed size.
| ``SetFont`(self, the_font, regionId)` Set the font for the specified text region.
| ``SetFormatMode`(self, mode, regionId)` Set the format mode of the default text region.
| ``SetHighlight`(self, hi, recurse)` Set the highlight for a shape.
| ``SetId`(self, i)` Set the integer identifier for this shape.
| ``SetMaintainAspectRatio`(self, ar)` Set whether a shape that resizes should not change the aspect ratio (width and height should be in the original proportion).
| `SetParent(self, p)`
| ``SetPen`(self, the_pen)` Set the pen for drawing the shape's outline.
| ``SetRegionName`(self, name, regionId)` Set the name for this region.
| `SetRotation(self, rotation)`
| ``SetSensitivityFilter`(self, sens, recursive)` Set the shape to be sensitive or insensitive to specific mouse operations.
| ``SetShadowMode`(self, mode, redraw)` Set the shadow mode (whether a shadow is drawn or not).
| `SetShape(self, sh)`
| ``SetSize`(self, x, y, recursive)` Set the shape's size.
| ``SetSpaceAttachments`(self, sp)` Indicate whether lines should be spaced out evenly at the point they touch the node (sp = True), or whether they should join at a single point (sp = False).
| ``SetTextColour`(self, the_colour, regionId)` Set the colour for the specified text region.
| ``SetX`(self, x)` Set the x position of the shape.
| ``SetY`(self, y)` Set the y position of the shape.
| ``Show`(self, show)` Set a flag indicating whether the shape should be drawn.
| ``SortLines`(self, attachment, linesToSort)` Reorder the lines coming into the node image at this attachment position, in the order in which they appear in linesToSort.

Class Variable Summary
`bool` | `GraphicsInSizeToContents` = `False`

Method Details

### AddLine(self, line, other, attachFrom=0, attachTo=0, positionFrom=-1, positionTo=-1)

Add a line between this shape and the given other shape, at the specified attachment points.

The position in the list of lines at each end can also be specified, so that the line will be drawn at a particular point on its attachment point.

### AddRegion(self, region)

Add a region to the shape.

### AddText(self, string)

Add a line of text to the shape's default text region.

### AddToCanvas(self, theCanvas, addAfter=None)

Add the shape to the canvas's shape list. If addAfter is non-NULL, will add the shape after this one.

### AncestorSelected(self)

TRUE if the shape's ancestor is currently selected.

### ApplyAttachmentOrdering(self, linesToSort)

Apply the line ordering in linesToSort to the shape, to reorder the way lines are attached.

### AssignNewIds(self)

Assign new ids to this image and its children.

### Attach(self, can)

Set the shape's internal canvas pointer to point to the given canvas.

### AttachmentIsValid(self, attachment)

TRUE if attachment is a valid attachment point.

### AttachmentSortTest(self, attachmentPoint, pt1, pt2)

Return TRUE if pt1 is less than or equal to pt2, in the sense that one point comes before another on an edge of the shape.

attachment is the attachment point (side) in question.

This function is used in Shape.MoveLineToNewAttachment to determine the new line ordering.

### CalcSimpleAttachment(self, pt1, pt2, nth, noArcs, line)

Assuming the attachment lies along a vertical or horizontal line, calculate the position on that point.

Parameters:

pt1
  The first point of the line repesenting the edge of the shape.
pt2
  The second point of the line representing the edge of the shape.
nth
  The position on the edge (for example there may be 6 lines at this attachment point, and this may be the 2nd line.
noArcs
  The number of lines at this edge.
line
  The line shape.

Remarks

This function expects the line to be either vertical or horizontal, and determines which.

### ClearAttachments(self)

Clear internal custom attachment point shapes (of class wxAttachmentPoint).

### ClearRegions(self)

Clear the ShapeRegions from the shape.

### ClearText(self, regionId=0)

Clear the text from the specified text region.

### Delete(self)

Fully disconnect this shape from parents, children, the canvas, etc.

### DeleteControlPoints(self, dc=None)

Delete the control points (or handles) for the shape.

Does not redraw the shape.

### Detach(self)

Disassociates the shape from its canvas.

### Draggable(self)

TRUE if the shape may be dragged by the user.

### Draw(self, dc)

Draw the whole shape and any lines attached to it.

Do not override this function: override OnDraw, which is called by this function.

### DrawContents(self, dc)

Draw the internal graphic of the shape (such as text).

Do not override this function: override OnDrawContents, which is called by this function.

### DrawLinks(self, dc, attachment=-1, recurse=False)

Draws any lines linked to this shape.

### Erase(self, dc)

Erase the shape. Does not repair damage caused to other shapes.

### EraseContents(self, dc)

Erase the shape contents, that is, the area within the shape's minimum bounding box.

### EraseLinks(self, dc, attachment=-1, recurse=False)

Erase links attached to this shape, but do not repair damage caused to other shapes.

### FindRegion(self, name)

Find the actual image ('this' if non-composite) and region id for the given region name.

### FindRegionNames(self)

Get a list of all region names for this image (composite or simple).

### Flash(self)

Flash the shape.

### FormatText(self, dc, s, i=0)

Reformat the given text region; defaults to formatting the default region.

### GetAttachmentLineCount(self, attachment)

Get the number of lines at this attachment position.

### GetAttachmentMode(self)

Return the attachment mode.

See Shape.SetAttachmentMode.

### GetAttachmentPosition(self, attachment, nth=0, no_arcs=1, line=None)

Get the position at which the given attachment point should be drawn.

If attachment isn't found among the attachment points of the shape, returns None.

### GetAttachmentPositionEdge(self, attachment, nth=0, no_arcs=1, line=None)

Only get the attachment position at the _edge_ of the shape, ignoring branching mode. This is used e.g. to indicate the edge of interest, not the point on the attachment branch.

### GetBackgroundBrush(self)

Return brush of the right colour for the background.

### GetBackgroundPen(self)

Return pen of the right colour for the background.

### GetBoundingBoxMax(self)

Get the maximum bounding box for the shape, taking into account external features such as shadows.

### GetBoundingBoxMin(self)

Get the minimum bounding box for the shape, that defines the area available for drawing the contents (such as text).

Must be overridden.

### GetBranchingAttachmentInfo(self, attachment)

Get information about where branching connections go.

Returns FALSE if there are no lines at this attachment.

### GetBranchingAttachmentRoot(self, attachment)

Get the root point at the given attachment.

### GetBrush(self)

Return the brush used for filling the shape.

### GetCanvas(self)

Get the internal canvas.

### GetCentreResize(self)

TRUE if the shape is to be resized from the centre (the centre stands still), or FALSE if from the corner or side being dragged (the other corner or side stands still)

### GetChildren(self)

Return the list of children for this shape.

### GetDisableLabel(self)

TRUE if the default region will not be shown, FALSE otherwise.

### GetDrawHandles(self)

Return the list of drawhandles.

### GetEventHandler(self)

Return the event handler for this shape.

### GetFixedHeight(self)

TRUE if the shape cannot be resized in the vertical plane.

### GetFixedSize(self)

Return flags indicating whether the shape is of fixed size in either direction.

### GetFixedWidth(self)

TRUE if the shape cannot be resized in the horizontal plane.

### GetFont(self, regionId=0)

Get the font for the specified text region.

### GetId(self)

Return the integer identifier for this shape.

### GetLinePosition(self, line)

Get the zero-based position of line in the list of lines for this shape.

### GetLines(self)

Return the list of lines connected to this shape.

### GetMaintainAspectRatio(self)

TRUE if shape keeps aspect ratio during resize.

### GetNumberOfAttachments(self)

Get the number of attachment points for this shape.

### GetNumberOfTextRegions(self)

Return the number of text regions for this shape.

### GetParent(self)

Return the parent of this shape, if it is part of a composite.

### GetPen(self)

Return the pen used for drawing the shape's outline.

### GetPerimeterPoint(self, x1, y1, x2, y2)

Get the point at which the line from (x1, y1) to (x2, y2) hits the shape. Returns False if the line doesn't hit the perimeter.

### GetRegionId(self, name)

Get the region's identifier by name. This is not unique for within an entire composite, but is unique for the image.

### GetRegionName(self, regionId=0)

Get the region's name. A region's name can be used to uniquely determine a region within an entire composite image hierarchy. See also Shape.SetRegionName.

### GetRegions(self)

Return the list of ShapeRegions.

### GetRotation(self)

Return the angle of rotation in radians.

### GetSensitivityFilter(self)

Return the sensitivity filter, a bitlist of values.

See Shape.SetSensitivityFilter.

### GetShadowMode(self)

Return the current shadow mode setting

### GetSpaceAttachments(self)

Return whether lines should be spaced out evenly at the point they touch the node (True), or whether they should join at a single point (False).

### GetTextColour(self, regionId=0)

Get the colour for the specified text region.

### GetTopAncestor(self)

Return the top-most ancestor of this shape (the root of the composite).

### GetX(self)

Get the x position of the centre of the shape.

### GetY(self)

Get the y position of the centre of the shape.

### HasDescendant(self, image)

TRUE if image is a descendant of this composite.

### HitTest(self, x, y)

Given a point on a canvas, returns TRUE if the point was on the shape, and returns the nearest attachment point and distance from the given point and target.

### InsertInCanvas(self, theCanvas)

Insert the shape at the front of the shape list of canvas.

### IsHighlighted(self)

TRUE if the shape is highlighted. Shape highlighting is unimplemented.

### IsShown(self)

TRUE if the shape is in a visible state, FALSE otherwise.

Note that this has nothing to do with whether the window is hidden or the shape has scrolled off the canvas; it refers to the internal visibility flag.

### LogicalToPhysicalAttachment(self, logicalAttachment)

Rotate the standard attachment point from logical to physical (0 is always North).

### MakeControlPoints(self)

Make a list of control points (draggable handles) appropriate to the shape.

### MakeMandatoryControlPoints(self)

Make the mandatory control points.

For example, the control point on a dividing line should appear even if the divided rectangle shape's handles should not appear (because it is the child of a composite, and children are not resizable).

### Move(self, dc, x, y, display=True)

Move the shape to the given position. Redraw if display is TRUE.

### MoveLineToNewAttachment(self, dc, to_move, x, y)

Move the given line (which must already be attached to the shape) to a different attachment point on the shape, or a different order on the same attachment.

Calls Shape.AttachmentSortTest and then ShapeEvtHandler.OnChangeAttachment.

### MoveLinks(self, dc)

Redraw all the lines attached to the shape.

### NameRegions(self, parentName='')

Make unique names for all the regions in a shape or composite shape.

### PhysicalToLogicalAttachment(self, physicalAttachment)

Rotate the standard attachment point from physical (0 is always North) to logical (0 -> 1 if rotated by 90 degrees)

### Recentre(self, dc)

Do recentring (or other formatting) for all the text regions for this shape.

### Recompute(self)

Recomputes any constraints associated with the shape.

Normally applicable to CompositeShapes only, but harmless for other classes of Shape.

### RemoveFromCanvas(self, theCanvas)

Remove the shape from the canvas.

### RemoveLine(self, line)

Remove the given line from the shape's list of attached lines.

### ResetControlPoints(self)

Reset the positions of the control points (for instance when the shape's shape has changed).

### ResetMandatoryControlPoints(self)

Reset the mandatory control points.

### Rotate(self, x, y, theta)

Rotate about the given axis by the given amount in radians.

### Select(self, select, dc=None)

Select or deselect the given shape, drawing or erasing control points (handles) as necessary.

### Selected(self)

TRUE if the shape is currently selected.

### SetAttachmentMode(self, mode)

Set the attachment mode.

If TRUE, attachment points will be significant when drawing lines to and from this shape. If FALSE, lines will be drawn as if to the centre of the shape.

### SetBrush(self, the_brush)

Set the brush for filling the shape's shape.

### SetCanvas(self, theCanvas)

Identical to Shape.Attach.

### SetCentreResize(self, cr)

Specify whether the shape is to be resized from the centre (the centre stands still) or from the corner or side being dragged (the other corner or side stands still).

### SetDefaultRegionSize(self)

Set the default region to be consistent with the shape size.

### SetDisableLabel(self, flag)

Set flag to TRUE to stop the default region being shown.

### SetDraggable(self, drag, recursive=False)

Set the shape to be draggable or not draggable.

### SetDrawHandles(self, drawH)

Set the drawHandles flag for this shape and all descendants. If drawH is TRUE (the default), any handles (control points) will be drawn. Otherwise, the handles will not be drawn.

### SetEventHandler(self, handler)

Set the event handler for this shape.

### SetFixedSize(self, x, y)

Set the shape to be fixed size.

### SetFont(self, the_font, regionId=0)

Set the font for the specified text region.

### SetFormatMode(self, mode, regionId=0)

Set the format mode of the default text region. The argument can be a bit list of the following:

FORMAT_NONE
  No formatting.
FORMAT_CENTRE_HORIZ
  Horizontal centring.
FORMAT_CENTRE_VERT
  Vertical centring.

### SetHighlight(self, hi, recurse=False)

Set the highlight for a shape. Shape highlighting is unimplemented.

### SetId(self, i)

Set the integer identifier for this shape.

### SetMaintainAspectRatio(self, ar)

Set whether a shape that resizes should not change the aspect ratio (width and height should be in the original proportion).

### SetPen(self, the_pen)

Set the pen for drawing the shape's outline.

### SetRegionName(self, name, regionId=0)

Set the name for this region. The name for a region is unique within the scope of the whole composite, whereas a region id is unique only for a single image.

### SetSensitivityFilter(self, sens=15, recursive=False)

Set the shape to be sensitive or insensitive to specific mouse operations.

sens is a bitlist of the following:

- OP_CLICK_LEFT
- OP_CLICK_RIGHT
- OP_DRAG_LEFT
- OP_DRAG_RIGHT
- OP_ALL (equivalent to a combination of all the above).

### SetShadowMode(self, mode, redraw=False)

Set the shadow mode (whether a shadow is drawn or not). mode can be one of the following:

SHADOW_NONE
  No shadow (the default).
SHADOW_LEFT
  Shadow on the left side.
SHADOW_RIGHT
  Shadow on the right side.

### SetSize(self, x, y, recursive=True)

Set the shape's size.

### SetSpaceAttachments(self, sp)

Indicate whether lines should be spaced out evenly at the point they touch the node (sp = True), or whether they should join at a single point (sp = False).

### SetTextColour(self, the_colour, regionId=0)

Set the colour for the specified text region.

### SetX(self, x)

Set the x position of the shape.

### SetY(self, y)

Set the y position of the shape.

### Show(self, show)

Set a flag indicating whether the shape should be drawn.

### SortLines(self, attachment, linesToSort)

Reorder the lines coming into the node image at this attachment position, in the order in which they appear in linesToSort.

Any remaining lines not in the list will be added to the end.

Class Variable Details

### GraphicsInSizeToContents

  Type:
    `bool`
  Value:

        False

Generated by Epydoc 2.1.20050511.rpd on Thu Mar 22 12:11:11 2007 | http://epydoc.sf.net