| | |
- __builtin__.object
-
- Arrow
- BezPoint
- ConnectionPoint
- Diagram
- DiagramData
- Display
- ExportFilter
- Font
- Handle
- Image
- Layer
- Object
- ObjectType
- Paperinfo
- Point
- Properties
- Property
- Rectangle
- Text
class BezPoint(__builtin__.object) |
| |
A dia.Point, a bezier type and two control points (dia.Point) make a bezier point. |
| |
Methods defined here:
- __cmp__(...)
- x.__cmp__(y) <==> cmp(x,y)
- __hash__(...)
- x.__hash__() <==> hash(x)
- __str__(...)
- x.__str__() <==> str(x)
Data descriptors defined here:
- p1
- Point: first control point for CURVETO
- p2
- Point: second control point for CURVETO
- p3
- Point: target point for CURVETO
- type
- int: MOVETO, LINETO using p1 only; CURVETO all 3 points
|
class ConnectionPoint(__builtin__.object) |
| |
One of the major features of Dia are connectable objects. They work by this type accesible through dia.Object.connections[]. |
| |
Methods defined here:
- __cmp__(...)
- x.__cmp__(y) <==> cmp(x,y)
- __hash__(...)
- x.__hash__() <==> hash(x)
Data descriptors defined here:
- connected
- List of Object: read-only list of connected objects
- object
- Object: the object owning this connection point
- pos
- Point: read-only position of the connection point
|
class Diagram(__builtin__.object) |
| |
Subclass of dia.DiagramData (at least in the C implementation) adding interfacing the GUI elements. |
| |
Methods defined here:
- __cmp__(...)
- x.__cmp__(y) <==> cmp(x,y)
- __hash__(...)
- x.__hash__() <==> hash(x)
- __str__(...)
- x.__str__() <==> str(x)
- add_update(...)
- add_update(real: top, real: left, real: bottom, real: right) -> None. Add the given rectangle to the update queue.
- add_update_all(...)
- add_update_all() -> None. Add the diagram visible area to the update queue.
- connect_after(...)
- connect_after(string: signal_name, Callback: func) -> None. Listen to diagram events in ['removed', 'selection_changed'].
- display(...)
- display() -> Display. Create a new display of the diagram.
- find_clicked_object(...)
- find_clicked_object(real[2]: point, real: distance) -> Object. Find an object in the given distance of the given point.
- find_closest_connectionpoint(...)
- find_closest_connectionpoint(real: x, real: y[, Object: o]) -> (real: dist, ConnectionPoint: cp). Given a point and an optional object to exclude, return the distance and closest connection point or None.
- find_closest_handle(...)
- find_closest_handle(real[2]: point) -> (real: distance, Handle: h, Object: o). Find the closest handle from point and return a tuple of the search results. Handle and Object might be None.
- flush(...)
- flush() -> None. If no display update is queued, queue update.
- get_sorted_selected(...)
- get_sorted_selected() -> list. Return the current selection sorted by Z-Order.
- get_sorted_selected_remove(...)
- get_sorted_selected_remove() -> list. Return sorted selection and remove it from the diagram.
- group_selected(...)
- group_selected() -> None. Turn the current selection into a group object.
- is_selected(...)
- is_selected(Object: o) -> bool. True if the given object is already selected.
- remove_all_selected(...)
- remove_all_selected() -> None. Delete all selected objects.
- save(...)
- save(string: filename) -> None. Save the diagram under the given filename.
- select(...)
- select(Object: o) -> None. Add the given object to the selection.
- ungroup_selected(...)
- ungroup_selected() -> None. Split all groups in the current selection into single objects.
- unselect(...)
- unselect(Object: o) -> None. Remove the given object from the selection)
- update_connections(...)
- update_connections(Object: o) -> None. Update all connections of the given object. Might move connected objects.
- update_extents(...)
- update_extents() -> None. Force recaculation of the diagram extents.
Data descriptors defined here:
- data
- Backward-compatible base-class access
- displays
- The list of current displays of this diagram.
- filename
- Filename in utf-8 encoding.
- modified
- Modification state.
- selected
- The current object selection.
- unsaved
- True if the diagram was not saved yet.
|
class DiagramData(__builtin__.object) |
| |
The 'low level' diagram object. It contains everything to manipulate diagrams from im- and export filters as well as from the UI. It does not provide any access to GUI elements related to the diagram.Use the subclass dia.Diagram object for such matters. |
| |
Methods defined here:
- __cmp__(...)
- x.__cmp__(y) <==> cmp(x,y)
- __hash__(...)
- x.__hash__() <==> hash(x)
- __str__(...)
- x.__str__() <==> str(x)
- add_layer(...)
- add_layer(Layer: layer[, int: position]) -> Layer. Add a layer to the diagram at the top or the given position counting from bottom.
- connect_after(...)
- connect_after(string: signal_name, Callback: func) -> None. Listen to diagram events in ['object_add', 'object_remove'].
- delete_layer(...)
- delete_layer(Layer: layer) -> None. Remove the given layer from the diagram.
- get_sorted_selected(...)
- get_sorted_selected() -> list. Return the current selection sorted by Z-Order.
- lower_layer(...)
- lower_layer() -> None. Move the layer towards the bottom.
- raise_layer(...)
- raise_layer() -> None. Move the layer towards the top.
- set_active_layer(...)
- set_active_layer(Layer: layer) -> None. Make the given layer the active one.
- update_extents(...)
- update_extents() -> None. Recalculation of the diagram extents.
Data descriptors defined here:
- active_layer
- Layer currently active in the diagram.
- bg_color
- Color of the diagram's background.
- extents
- Rectangle covering all object's bounding boxes.
- grid_visible
- bool: visibility of the grid.
- grid_width
- Tuple(real: x, real: y) : describing the grid size.
- hguides
- List of real: horizontal guides.
- layers
- Read-only list of the diagrams layers.
- paper
- Paperinfo of the diagram.
- selected
- List of Object: current selection.
- vguides
- List of real: vertical guides.
|
class Display(__builtin__.object) |
| |
A Diagram can have multiple displays but every Display has just one Diagram. |
| |
Methods defined here:
- __cmp__(...)
- x.__cmp__(y) <==> cmp(x,y)
- __hash__(...)
- x.__hash__() <==> hash(x)
- __str__(...)
- x.__str__() <==> str(x)
- add_update_all(...)
- add_update_all() -> None. Add the diagram visible area to the update queue.
- close(...)
- close() -> None. Close the display possibly asking to save.
- flush(...)
- flush() -> None. If no display update is queued, queue update.
- resize_canvas(...)
- resize_canvas(int: width, int: height) -> None. BEWARE: Changing the drawing area but not the window size.
- scroll(...)
- scroll(real: dx, real: dy) -> None. Scroll the visible area by the given delta.
- scroll_down(...)
- scroll_down() -> None. Scroll downwards by a fixed amount.
- scroll_left(...)
- scroll_left() -> None. Scroll to the left by a fixed amount.
- scroll_right(...)
- scroll_right() -> None. Scroll to the right by a fixed amount.
- scroll_up(...)
- scroll_up() -> None. Scroll upwards by a fixed amount.
- set_origion(...)
- set_origion(real: x, real, y) -> None. Move the given diagram point to the top-left corner of the visible area.
- set_title(...)
- set_title(string: title) -> None. Temporary change of the diagram title.
- zoom(...)
- zoom(real[2]: point, real: factor) -> None. Zoom around the given point.
Data descriptors defined here:
- diagram
- Diagram displayed.
- origin
- Point in diagram coordinates of the top-left corner of the visible area.
- visible
- Tuple(real: top, real: left, real: bottom, real: right) : visible area
- zoom_factor
- Real: zoom-factor
|
class Handle(__builtin__.object) |
| |
A handle is used to connect objects or for object resizing. |
| |
Methods defined here:
- __cmp__(...)
- x.__cmp__(y) <==> cmp(x,y)
- __hash__(...)
- x.__hash__() <==> hash(x)
- connect(...)
- connect(ConnectionPoint: cp) -> None. Connect object A's handle with object B's connection point. To disconnect a handle pass in None.
Data descriptors defined here:
- connect_type
- NONCONNECTABLE=0.
- connected_to
- The connected ConnectionPoint object or None.
- id
- Can be used to derive preferred directions from it.
- pos
- The position of the connection point.
- type
- NON_MOVABLE=0, MAJOR_CONTROL=1, MINOR_CONTROL=2
|
class Image(__builtin__.object) |
| |
dia.Image gets passed into DiaRenderer.draw_image |
| |
Methods defined here:
- __cmp__(...)
- x.__cmp__(y) <==> cmp(x,y)
- __hash__(...)
- x.__hash__() <==> hash(x)
- __str__(...)
- x.__str__() <==> str(x)
Data descriptors defined here:
- filename
- string: utf-8 encoded filename of the image
- height
- int: pixel height of the image
- mask_data
- string: array of alpha pixel values
- rgb_data
- string: array of packed rgb pixel values
- uri
- string: Uniform Resource Identifier of the image
- width
- int: pixel width of the image
|
class Layer(__builtin__.object) |
| |
A Layer is part of a Diagram and can contain objects. |
| |
Methods defined here:
- __cmp__(...)
- x.__cmp__(y) <==> cmp(x,y)
- __hash__(...)
- x.__hash__() <==> hash(x)
- __str__(...)
- x.__str__() <==> str(x)
- add_object(...)
- add_object(Object: o[, int: position]) -> None. Add the object to the layer at the top or the given position counting from bottom.
- destroy(...)
- Release the layer. Must not be called when already added to a diagram.
- find_closest_connection_point(...)
- find_closest_connectionpoint(real: x, real: y[, Object: o]) -> (real: dist, ConnectionPoint: cp). Given a point and an optional object to exclude return the distance and the closest connection point or None.
- find_closest_object(...)
- find_closest_object(real: x, real: y, real: maxdist) -> Object. Find an object in the given maximum distance of the given point.
- find_objects_in_rectangle(...)
- find_objects_in_rectangle(real: top, real left, real: bottom, real: right) -> Objects Returns a list of objects found in the given rectangle.
- object_get_index(...)
- object_get_index(Object: o) -> int. Returns the index of the object in the layers list of objects.
- remove_object(...)
- remove_object(Object: o) -> None Remove the object from the layer and delete it.
- update_extents(...)
- update_extents() -> None. Force recaculation of the layer extents.
Data descriptors defined here:
- extents
- Rectangle covering all object's bounding boxes.
- name
- The name of the layer.
- objects
- The list of objects in the layer.
- visible
- The visibility of the layer.
|
class Paperinfo(__builtin__.object) |
| |
dia.Paperinfo is part of dia.DiagramData describing the paper |
| |
Methods defined here:
- __cmp__(...)
- x.__cmp__(y) <==> cmp(x,y)
- __hash__(...)
- x.__hash__() <==> hash(x)
- __str__(...)
- x.__str__() <==> str(x)
Data descriptors defined here:
- height
- real: height of the drawable area (sans margins)
- is_portrait
- int: paper orientation
- name
- string: paper name, e.g. A4 or Letter
- scaling
- real: factor to zoom the diagram on the paper
- width
- real: width of the drawable area (sans margins)
|
class Property(__builtin__.object) |
| |
Interface to so called StdProps, the mechanism to control most of Dia's canvas objects properties. |
| |
Methods defined here:
- __cmp__(...)
- x.__cmp__(y) <==> cmp(x,y)
- __hash__(...)
- x.__hash__() <==> hash(x)
- __str__(...)
- x.__str__() <==> str(x)
Data descriptors defined here:
- name
- string: the name of the property
- type
- string: the type name of the object
- value
- various: the value is of type char, bool, dict, int, real, string, Text, Point, BezPoint, Rect, Arrow, Color or a tuple or list, possibly containing tuple of varying types.
- visible
- bool: visibility of the property
|
class Text(__builtin__.object) |
| |
Many objects (dia.Object) having text to display provide this property. |
| |
Methods defined here:
- __cmp__(...)
- x.__cmp__(y) <==> cmp(x,y)
- __hash__(...)
- x.__hash__() <==> hash(x)
- __str__(...)
- x.__str__() <==> str(x)
Data descriptors defined here:
- alignment
- int: alignment out of LEFT=0, CENTER=1, RIGHT=2
- color
- Color: color of the text
- font
- Font: read-only reference to font used
- height
- real: height of the font
- position
- Point: alignment position of the text
- text
- string: text data
| |