sodipodi-ctrlrect.cpp revision 208e5a33acc4a8ad9d8c0488f047c260346f1258
#define __INKSCAPE_CTRLRECT_C__
/*
* Simple non-transformed rectangle, usable for rubberband
*
* Author:
* Lauris Kaplinski <lauris@ximian.com>
* bulia byak <buliabyak@users.sf.net>
* Carl Hetherington <inkscape@carlh.net>
*
* Copyright (C) 1999-2001 Lauris Kaplinski
* Copyright (C) 2000-2001 Ximian, Inc.
*
* Released under GNU GPL
*
*/
#include "display-forward.h"
#include "sp-canvas-util.h"
#include "sodipodi-ctrlrect.h"
#include "libnr/nr-pixops.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;
{
static GtkType ctrlrect_type = 0;
if (!ctrlrect_type) {
"SPCtrlRect",
sizeof(CtrlRect),
sizeof(SPCtrlRectClass),
};
}
return ctrlrect_type;
}
static void sp_ctrlrect_class_init(SPCtrlRectClass *c)
{
}
{
}
{
}
}
/* FIXME: use definitions from somewhere else */
#define RGBA_R(v) ((v) >> 24)
#define RGBA_A(v) ((v) & 0xff)
static void sp_ctrlrect_hline(SPCanvasBuf *buf, gint y, gint xs, gint xe, guint32 rgba, guint dashed)
{
p[0] = INK_COMPOSE(r, a, p[0]);
}
p += 3;
}
}
}
static void sp_ctrlrect_vline(SPCanvasBuf *buf, gint x, gint ys, gint ye, guint32 rgba, guint dashed)
{
p[0] = INK_COMPOSE(r, a, p[0]);
}
p += buf->buf_rowstride;
}
}
}
/** Fills the pixels in [xs, xe)*[ys,ye) clipped to the tile with rgb * a. */
{
p[0] = INK_COMPOSE(r, a, p[0]);
p += 3;
}
}
}
{
}
{
}
{
_has_fill = false;
_dashed = false;
_shadow = 0;
_shadow_size = 0;
_border_color = 0x000000ff;
_fill_color = 0xffffffff;
_shadow_color = 0x000000ff;
}
{
/* Top */
/* Bottom */
/* Left */
/* Right */
if (_shadow_size > 0) {
/* Right shadow */
/* Bottom shadow */
}
if (_has_fill) {
/* Fill */
}
}
}
{
}
sp_canvas_item_reset_bounds(this);
/* Request redraw old */
if (!_has_fill) {
/* Top */
/* Left */
/* Right */
/* Bottom */
} else {
}
}
/* Request redraw new */
if (!_has_fill) {
/* Top */
/* Left */
/* Right */
/* Bottom */
} else {
}
}
}
{
_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:encoding=utf-8:textwidth=99 :