The Gnome Chemistry Utils
0.12.11
Main Page
Namespaces
Classes
Files
File List
File Members
libs
gccv
wedge.h
Go to the documentation of this file.
1
// -*- C++ -*-
2
3
/*
4
* Gnome Chemistry Utils
5
* gccv/wedge.h
6
*
7
* Copyright (C) 2008-2010 Jean Bréfort <jean.brefort@normalesup.org>
8
*
9
* This program is free software; you can redistribute it and/or
10
* modify it under the terms of the GNU General Public License as
11
* published by the Free Software Foundation; either version 2 of the
12
* License, or (at your option) any later version.
13
*
14
* This program is distributed in the hope that it will be useful,
15
* but WITHOUT ANY WARRANTY; without even the implied warranty of
16
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
17
* GNU General Public License for more details.
18
*
19
* You should have received a copy of the GNU General Public License
20
* along with this program; if not, write to the Free Software
21
* Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301
22
* USA
23
*/
24
25
#ifndef GCCV_WEDGE_H
26
#define GCCV_WEDGE_H
27
30
#include "
fill-item.h
"
31
32
namespace
gccv {
33
39
class
Wedge
:
public
Item
40
{
41
public
:
52
Wedge
(
Canvas
*canvas,
double
x0,
double
y0,
double
x1,
double
y1,
double
width);
65
Wedge
(
Group
*parent,
double
x0,
double
y0,
double
x1,
double
y1,
double
width,
ItemClient
*client = NULL);
69
virtual
~Wedge
();
70
79
void
SetPosition
(
double
x0,
double
y0,
double
x1,
double
y1);
80
81
// virtual methods
89
double
Distance
(
double
x,
double
y,
Item
**item)
const
;
96
void
Draw
(cairo_t *cr,
bool
is_vector)
const
;
103
void
Move
(
double
x,
double
y);
104
105
protected
:
109
void
UpdateBounds
();
110
111
protected
:
114
double
m_xstart;
117
double
m_ystart;
120
double
m_xend;
123
double
m_yend;
126
double
m_xe1;
129
double
m_ye1;
132
double
m_xe2;
135
double
m_ye2;
136
141
GCCV_ITEM_POS_PROP
(
double
, Width)
146
GCCV_ITEM_PROP
(GOColor, FillColor)
147
};
148
149
}
150
151
#endif // GCCV_WEDGE_H
Generated on Tue Jun 26 2012 08:44:53 for The Gnome Chemistry Utils by
1.8.1.1