示例#1
0
static PyObject *
PyDiaDiagram_AddUpdate(PyDiaDiagram *self, PyObject *args)
{
    Rectangle r;

    if (!PyArg_ParseTuple(args, "dddd:Diagram.add_update", &r.top,
			  &r.left, &r.bottom, &r.right))
	return NULL;
    diagram_add_update(self->dia, &r);
    Py_INCREF(Py_None);
    return Py_None;
}
示例#2
0
文件: object_ops.c 项目: dwbxm/dia
void
object_add_updates(DiaObject *obj, Diagram *dia)
{
    int i;

    /* Bounding box */
    if (data_object_get_highlight(dia->data,obj) != DIA_HIGHLIGHT_NONE) {
        diagram_add_update_with_border(dia, dia_object_get_enclosing_box (obj), 5);
    } else {
        diagram_add_update(dia, dia_object_get_enclosing_box (obj));
    }

    /* Handles */
    for (i=0; i<obj->num_handles; i++) {
        handle_add_update(obj->handles[i], dia);
    }

    /* Connection points */
    for (i=0; i<dia_object_get_num_connections(obj); ++i) {
        connectionpoint_add_update(obj->connections[i], dia);
    }

}