00001
00002
00003
00004
00005
00006
00007
00008
00009
00010
00011
00012
00013
00014
00015
00016
00017
00018
00019
00020
00021
00022
00023
00024
00025
00026
00027
00028
00029
00030
00033
00034 #pragma once
00035
00036 #ifdef _MSC_VER
00037 #pragma warning( disable : 4786)
00038 #endif
00039
00040 #include "../api_display.h"
00041 #include "../Render/graphic_context.h"
00042
00043 class CL_Colorf;
00044 class CL_Pointf;
00045 class CL_Gradient;
00046 class CL_LineSegment2f;
00047 class CL_LineSegment2;
00048 class CL_Quadf;
00049 class CL_Trianglef;
00050 class CL_Triangle;
00051
00055 class CL_API_DISPLAY CL_Draw
00056 {
00059
00060 public:
00062 static void point(CL_GraphicContext &gc, float x1, float y1, const CL_Colorf &color);
00063
00069 static void point(CL_GraphicContext &gc, const CL_Pointf &point, const CL_Colorf &color);
00070
00072 static void line(CL_GraphicContext &gc, float x1, float y1, float x2, float y2, const CL_Colorf &color);
00073
00080 static void line(CL_GraphicContext &gc, const CL_Pointf &start, const CL_Pointf &end, const CL_Colorf &color);
00081
00087 static void line(CL_GraphicContext &gc, const CL_LineSegment2f &line_segment, const CL_Colorf &color);
00088
00090 static void box(CL_GraphicContext &gc, float x1, float y1, float x2, float y2, const CL_Colorf &color);
00091
00098 static void box(CL_GraphicContext &gc, const CL_Pointf &start, const CL_Pointf &end, const CL_Colorf &color);
00099
00105 static void box(CL_GraphicContext &gc, const CL_Rectf &rect, const CL_Colorf &color);
00106
00108 static void fill(CL_GraphicContext &gc, float x1, float y1, float x2, float y2, const CL_Colorf &color);
00109
00116 static void fill(CL_GraphicContext &gc, const CL_Pointf &start, const CL_Pointf &end, const CL_Colorf &color);
00117
00123 static void fill(CL_GraphicContext &gc, const CL_Rectf &rect, const CL_Colorf &color);
00124
00129 static void texture(
00130 CL_GraphicContext &gc,
00131 const CL_Rectf &rect,
00132 const CL_Colorf &color = CL_Colorf::white,
00133 const CL_Rectf &texture_unit1_coords = CL_Rectf(0.0, 0.0, 1.0, 1.0));
00134
00138 static void texture(
00139 CL_GraphicContext &gc,
00140 const CL_Texture &texture,
00141 const CL_Quadf &quad,
00142 const CL_Colorf &color = CL_Colorf::white,
00143 const CL_Rectf &texture_unit1_coords = CL_Rectf(0.0, 0.0, 1.0, 1.0));
00144
00153 static void gradient_fill(CL_GraphicContext &gc, float x1, float y1, float x2, float y2, const CL_Gradient &color);
00154
00161 static void gradient_fill(CL_GraphicContext &gc, const CL_Pointf &start, const CL_Pointf &end, const CL_Gradient &gradient);
00162
00168 static void gradient_fill(CL_GraphicContext &gc, const CL_Rectf &rect, const CL_Gradient &gradient);
00169
00171 static void circle(CL_GraphicContext &gc, float center_x, float center_y, float radius, const CL_Colorf &color);
00172
00179 static void circle(CL_GraphicContext &gc, const CL_Pointf ¢er, float radius, const CL_Colorf &color);
00180
00187 static void gradient_circle(CL_GraphicContext &gc, const CL_Pointf ¢er, float radius, const CL_Gradient &gradient);
00188
00196 static void gradient_circle(CL_GraphicContext &gc, const CL_Pointf ¢er, const CL_Pointf ¢ergradient, float radius, const CL_Gradient &gradient);
00197
00199 static void triangle(CL_GraphicContext &gc, const CL_Pointf &a, const CL_Pointf &b, const CL_Pointf &c, const CL_Colorf &color);
00200
00202 static void triangle(CL_GraphicContext &gc, const CL_Trianglef &dest_triangle, const CL_Colorf &color);
00203
00205 };
00206