sodipodi-ctrlrect.cpp revision c46d6bfdef5fb71dc4d7c926b27dd3b8c172ebfe
/*
* Simple non-transformed rectangle, usable for rubberband
*
* Author:
* Lauris Kaplinski <lauris@ximian.com>
* bulia byak <buliabyak@users.sf.net>
* Carl Hetherington <inkscape@carlh.net>
* Jon A. Cruz <jon@joncruz.org>
*
* Copyright (C) 1999-2001 Lauris Kaplinski
* Copyright (C) 2000-2001 Ximian, Inc.
*
* Released under GNU GPL
*
*/
#include "sodipodi-ctrlrect.h"
#include "sp-canvas-util.h"
#include "display/cairo-utils.h"
#include "display/sp-canvas.h"
/*
* Currently we do not have point method, as it should always be painted
* during some transformation, which takes care of events...
*
* Corner coords can be in any order - i.e. x1 < x0 is allowed
*/
static void sp_ctrlrect_class_init(SPCtrlRectClass *c);
static SPCanvasItemClass *parent_class;
{
if (!type) {
sizeof(SPCtrlRectClass),
0, // base_init
0, // base_finalize
0, // class_finalize
0, // class_data
sizeof(CtrlRect),
0, // n_preallocs
0 // value_table
};
type = g_type_register_static(SP_TYPE_CANVAS_ITEM, "SPCtrlRect", &info, static_cast<GTypeFlags>(0));
}
return type;
}
static void sp_ctrlrect_class_init(SPCtrlRectClass *c)
{
}
{
}
{
}
}
{
}
{
}
{
_has_fill = false;
_dashed = false;
_shadow = 0;
_shadow_size = 0;
_border_color = 0x000000ff;
_fill_color = 0xffffffff;
_shadow_color = 0x000000ff;
}
{
using Geom::X;
using Geom::Y;
if (!_area) {
return;
}
{
if (_has_fill) {
}
if (_shadow_size > 0) {
}
}
}
{
using Geom::X;
using Geom::Y;
}
sp_canvas_item_reset_bounds(this);
if (_area_old) { // this weird construction is because the code below assumes _area_old to be 'valid'
}
// FIXME: we don't process a possible change in _has_fill
if (_has_fill) {
if (_area_old) {
}
if (_area) {
}
} else { // clear box, be smart about what part of the frame to redraw
/* Top */
} else { // same level, redraw only the ends
}
}
}
/* Left */
} else { // same level, redraw only the ends
}
}
}
/* Right */
} else { // same level, redraw only the ends
}
}
}
/* Bottom */
} else { // same level, redraw only the ends
}
}
}
}
// update SPCanvasItem box
if (_area) {
}
}
{
_border_color = b;
_has_fill = h;
_fill_color = f;
}
{
_shadow = s;
_shadow_color = c;
}
{
_rect = r;
}
{
_dashed = d;
}
void CtrlRect::_requestUpdate()
{
}
/*
Local Variables:
mode:c++
c-file-style:"stroustrup"
c-file-offsets:((innamespace . 0)(inline-open . 0)(case-label . +))
indent-tabs-mode:nil
fill-column:99
End:
*/
// vim: filetype=cpp:expandtab:shiftwidth=4:tabstop=8:softtabstop=4:fileencoding=utf-8:textwidth=99 :