Logo Search packages:      
Sourcecode: inkscape version File versions

static void sp_knot_init ( SPKnot knot  )  [static]

Callback for SPKnot initialization.

Definition at line 184 of file knot.cpp.

References SPKnot::_event_handler_id, SPKnot::anchor, SPKnot::cursor, SPKnot::desktop, SPKnot::fill, SPKnot::flags, SPKnot::grabbed_rel_pos, SPKnot::image, SPKnot::item, SPKnot::mode, SPKnot::pixbuf, SPKnot::pos, SPKnot::pressure, SPKnot::saved_cursor, SPKnot::shape, SPKnot::size, SPKnot::stroke, and SPKnot::tip.

Referenced by sp_knot_get_type().

{
    knot->desktop = NULL;
    knot->item = NULL;
    knot->flags = 0;

    knot->size = 8;
    knot->pos = Geom::Point(0, 0);
    knot->grabbed_rel_pos = Geom::Point(0, 0);
    knot->anchor = GTK_ANCHOR_CENTER;
    knot->shape = SP_KNOT_SHAPE_SQUARE;
    knot->mode = SP_KNOT_MODE_XOR;
    knot->tip = NULL;
    knot->_event_handler_id = 0;
    knot->pressure = 0;

    knot->fill[SP_KNOT_STATE_NORMAL] = 0xffffff00;
    knot->fill[SP_KNOT_STATE_MOUSEOVER] = 0xff0000ff;
    knot->fill[SP_KNOT_STATE_DRAGGING] = 0x0000ffff;

    knot->stroke[SP_KNOT_STATE_NORMAL] = 0x01000000;
    knot->stroke[SP_KNOT_STATE_MOUSEOVER] = 0x01000000;
    knot->stroke[SP_KNOT_STATE_DRAGGING] = 0x01000000;

    knot->image[SP_KNOT_STATE_NORMAL] = NULL;
    knot->image[SP_KNOT_STATE_MOUSEOVER] = NULL;
    knot->image[SP_KNOT_STATE_DRAGGING] = NULL;

    knot->cursor[SP_KNOT_STATE_NORMAL] = NULL;
    knot->cursor[SP_KNOT_STATE_MOUSEOVER] = NULL;
    knot->cursor[SP_KNOT_STATE_DRAGGING] = NULL;

    knot->saved_cursor = NULL;
    knot->pixbuf = NULL;
}


Generated by  Doxygen 1.6.0   Back to index