Laxkit
0.0.7.1
Main Page
Related Pages
Modules
Namespaces
Classes
Files
File List
lax
interfaces
linestyle.h
1
//
2
//
3
// The Laxkit, a windowing toolkit
4
// Please consult http://laxkit.sourceforge.net about where to send any
5
// correspondence about this software.
6
//
7
// This library is free software; you can redistribute it and/or
8
// modify it under the terms of the GNU Library General Public
9
// License as published by the Free Software Foundation; either
10
// version 2 of the License, or (at your option) any later version.
11
//
12
// This library is distributed in the hope that it will be useful,
13
// but WITHOUT ANY WARRANTY; without even the implied warranty of
14
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
15
// Library General Public License for more details.
16
//
17
// You should have received a copy of the GNU Library General Public
18
// License along with this library; if not, write to the Free Software
19
// Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
20
//
21
// Copyright (C) 2004-2007,2010-2012 by Tom Lechner
22
//
23
#ifndef _LAX_LINESTYLE_H
24
#define _LAX_LINESTYLE_H
25
26
#include <cstdio>
27
28
#include <lax/anobject.h>
29
#include <lax/dump.h>
30
#include <lax/screencolor.h>
31
32
33
namespace
LaxInterfaces {
34
35
enum
LineStyleMask {
36
LINESTYLE_Width =(1<<0),
37
LINESTYLE_Color =(1<<1),
38
LINESTYLE_Dash =(1<<2),
39
LINESTYLE_Joinstyle=(1<<3),
40
LINESTYLE_Capstyle =(1<<4),
41
LINESTYLE_MAX
42
};
43
44
class
LineStyle
:
public
Laxkit::anObject
,
public
LaxFiles::DumpUtility
45
{
46
public
:
47
double
width;
48
int
widthtype;
49
Laxkit::ScreenColor
color;
50
int
capstyle;
51
int
joinstyle;
52
int
dotdash;
53
int
function
;
54
unsigned
long
mask;
55
LineStyle
();
56
LineStyle
(
int
r,
int
g,
int
b,
int
a,
double
w,
int
cap,
int
join,
int
dot
,
int
func);
57
LineStyle
(
const
LineStyle
&l);
58
LineStyle
&operator=(
LineStyle
&l);
59
virtual
~
LineStyle
() {}
60
virtual
void
Color
(
int
r,
int
g,
int
b,
int
a);
61
virtual
void
dump_in_atts
(
LaxFiles::Attribute
*att,
int
flag,
Laxkit::anObject
*context);
62
virtual
void
dump_out
(FILE *f,
int
indent,
int
what,
Laxkit::anObject
*context);
63
64
virtual
int
hasStroke
();
65
};
66
67
}
// namespace LaxInterfaces
68
69
#endif
70
Mon Feb 17 2014 11:52:57, Laxkit