ClanLib
2.3.7
Main Page
Modules
Namespaces
Classes
Files
File List
File Members
Sources
API
Display
2D
draw.h
Go to the documentation of this file.
1
/*
2
** ClanLib SDK
3
** Copyright (c) 1997-2011 The ClanLib Team
4
**
5
** This software is provided 'as-is', without any express or implied
6
** warranty. In no event will the authors be held liable for any damages
7
** arising from the use of this software.
8
**
9
** Permission is granted to anyone to use this software for any purpose,
10
** including commercial applications, and to alter it and redistribute it
11
** freely, subject to the following restrictions:
12
**
13
** 1. The origin of this software must not be misrepresented; you must not
14
** claim that you wrote the original software. If you use this software
15
** in a product, an acknowledgment in the product documentation would be
16
** appreciated but is not required.
17
** 2. Altered source versions must be plainly marked as such, and must not be
18
** misrepresented as being the original software.
19
** 3. This notice may not be removed or altered from any source distribution.
20
**
21
** Note: Some of the libraries ClanLib may link to may have additional
22
** requirements or restrictions.
23
**
24
** File Author(s):
25
**
26
** Kenneth Gangstoe
27
** Harry Storbacka
28
** Ken Hirsch
29
*/
30
33
34
#pragma once
35
36
#ifdef _MSC_VER
37
#pragma warning( disable : 4786)
38
#endif
39
40
#include "../api_display.h"
41
#include "../Render/graphic_context.h"
42
43
class
CL_Colorf
;
44
class
CL_Pointf
;
45
class
CL_Gradient
;
46
class
CL_LineSegment2f
;
47
class
CL_LineSegment2
;
48
class
CL_Quadf
;
49
class
CL_Trianglef
;
50
class
CL_Triangle
;
51
55
class
CL_API_DISPLAY
CL_Draw
56
{
59
60
public
:
62
static
void
point(
CL_GraphicContext
&gc,
float
x1,
float
y1,
const
CL_Colorf
&color);
63
69
static
void
point(
CL_GraphicContext
&gc,
const
CL_Pointf
&point,
const
CL_Colorf
&color);
70
72
static
void
line(
CL_GraphicContext
&gc,
float
x1,
float
y1,
float
x2,
float
y2,
const
CL_Colorf
&color);
73
80
static
void
line(
CL_GraphicContext
&gc,
const
CL_Pointf
&start,
const
CL_Pointf
&end,
const
CL_Colorf
&color);
81
87
static
void
line(
CL_GraphicContext
&gc,
const
CL_LineSegment2f
&line_segment,
const
CL_Colorf
&color);
88
90
static
void
box(
CL_GraphicContext
&gc,
float
x1,
float
y1,
float
x2,
float
y2,
const
CL_Colorf
&color);
91
98
static
void
box(
CL_GraphicContext
&gc,
const
CL_Pointf
&start,
const
CL_Pointf
&end,
const
CL_Colorf
&color);
99
105
static
void
box(
CL_GraphicContext
&gc,
const
CL_Rectf
&rect,
const
CL_Colorf
&color);
106
108
static
void
fill(
CL_GraphicContext
&gc,
float
x1,
float
y1,
float
x2,
float
y2,
const
CL_Colorf
&color);
109
116
static
void
fill(
CL_GraphicContext
&gc,
const
CL_Pointf
&start,
const
CL_Pointf
&end,
const
CL_Colorf
&color);
117
123
static
void
fill(
CL_GraphicContext
&gc,
const
CL_Rectf
&rect,
const
CL_Colorf
&color);
124
129
static
void
texture(
130
CL_GraphicContext
&gc,
131
const
CL_Rectf
&rect,
132
const
CL_Colorf
&color =
CL_Colorf::white
,
133
const
CL_Rectf
&texture_unit1_coords =
CL_Rectf
(0.0, 0.0, 1.0, 1.0));
134
138
static
void
texture(
139
CL_GraphicContext
&gc,
140
const
CL_Texture
&texture,
141
const
CL_Quadf
&quad,
142
const
CL_Colorf
&color =
CL_Colorf::white
,
143
const
CL_Rectf
&texture_unit1_coords =
CL_Rectf
(0.0, 0.0, 1.0, 1.0));
144
153
static
void
gradient_fill(
CL_GraphicContext
&gc,
float
x1,
float
y1,
float
x2,
float
y2,
const
CL_Gradient
&color);
154
161
static
void
gradient_fill(
CL_GraphicContext
&gc,
const
CL_Pointf
&start,
const
CL_Pointf
&end,
const
CL_Gradient
&gradient);
162
168
static
void
gradient_fill(
CL_GraphicContext
&gc,
const
CL_Rectf
&rect,
const
CL_Gradient
&gradient);
169
171
static
void
circle(
CL_GraphicContext
&gc,
float
center_x,
float
center_y,
float
radius,
const
CL_Colorf
&color);
172
179
static
void
circle(
CL_GraphicContext
&gc,
const
CL_Pointf
¢er,
float
radius,
const
CL_Colorf
&color);
180
187
static
void
gradient_circle(
CL_GraphicContext
&gc,
const
CL_Pointf
¢er,
float
radius,
const
CL_Gradient
&gradient);
188
196
static
void
gradient_circle(
CL_GraphicContext
&gc,
const
CL_Pointf
¢er,
const
CL_Pointf
¢ergradient,
float
radius,
const
CL_Gradient
&gradient);
197
199
static
void
triangle(
CL_GraphicContext
&gc,
const
CL_Pointf
&a,
const
CL_Pointf
&b,
const
CL_Pointf
&c,
const
CL_Colorf
&color);
200
202
static
void
triangle(
CL_GraphicContext
&gc,
const
CL_Trianglef
&dest_triangle,
const
CL_Colorf
&color);
203
205
};
206
Generated on Fri Jun 14 2013 13:05:45 for ClanLib by
1.8.4