Anti-Grain Geometry Tutorial
agg_arc.h
1
//----------------------------------------------------------------------------
2
// Anti-Grain Geometry - Version 2.4
3
// Copyright (C) 2002-2005 Maxim Shemanarev (http://www.antigrain.com)
4
//
5
// Permission to copy, use, modify, sell and distribute this software
6
// is granted provided this copyright notice appears in all copies.
7
// This software is provided "as is" without express or implied
8
// warranty, and with no claim as to its suitability for any purpose.
9
//
10
//----------------------------------------------------------------------------
11
// Contact: mcseem@antigrain.com
12
// mcseemagg@yahoo.com
13
// http://www.antigrain.com
14
//----------------------------------------------------------------------------
15
//
16
// Arc vertex generator
17
//
18
//----------------------------------------------------------------------------
19
20
#ifndef AGG_ARC_INCLUDED
21
#define AGG_ARC_INCLUDED
22
23
#include "agg_basics.h"
24
25
namespace
agg
26
{
27
28
//=====================================================================arc
29
//
30
// See Implementation agg_arc.cpp
31
//
32
class
arc
33
{
34
public
:
35
arc
() : m_scale(1.0), m_initialized(
false
) {}
36
arc
(
double
x,
double
y,
37
double
rx,
double
ry,
38
double
a1,
double
a2,
39
bool
ccw=
true
);
40
41
void
init(
double
x,
double
y,
42
double
rx,
double
ry,
43
double
a1,
double
a2,
44
bool
ccw=
true
);
45
46
void
approximation_scale(
double
s);
47
double
approximation_scale()
const
{
return
m_scale; }
48
49
void
rewind(
unsigned
);
50
unsigned
vertex(
double
* x,
double
* y);
51
52
private
:
53
void
normalize(
double
a1,
double
a2,
bool
ccw);
54
55
double
m_x;
56
double
m_y;
57
double
m_rx;
58
double
m_ry;
59
double
m_angle;
60
double
m_start;
61
double
m_end;
62
double
m_scale;
63
double
m_da;
64
bool
m_ccw;
65
bool
m_initialized;
66
unsigned
m_path_cmd;
67
};
68
69
70
}
71
72
73
#endif
agg::arc
Definition:
agg_arc.h:32
agg
Definition:
agg_arc.cpp:24
agg-2.4
include
agg_arc.h
Generated by
1.8.13