Go to the documentation of this file.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
00031
00032 #pragma once
00033
00034 #include "../api_display.h"
00035 #include "../../Core/System/sharedptr.h"
00036 #include "../../Core/Math/origin.h"
00037 #include "../Render/graphic_context.h"
00038
00039 class CL_Color;
00040 class CL_Gradient;
00041 class CL_Pointf;
00042 class CL_RoundedRect_Impl;
00043
00047 class CL_RoundedRect
00048 {
00051
00052 public:
00053
00058 CL_RoundedRect(CL_Sizef size, float rounding_in_pixels=5.0f);
00059 virtual ~CL_RoundedRect();
00060
00064
00065 public:
00067 CL_Sizef get_size() const;
00068
00070 float get_width() const;
00071
00073 float get_height() const;
00074
00076
00077 float get_rounding() const;
00078
00080 CL_Pointf get_control_point_tl() const;
00081
00083 CL_Pointf get_control_point_tr() const;
00084
00086 CL_Pointf get_control_point_bl() const;
00087
00089 CL_Pointf get_control_point_br() const;
00090
00092 CL_Sizef get_rounding_top_left() const;
00093
00095 CL_Sizef get_rounding_top_right() const;
00096
00098 CL_Sizef get_rounding_bottom_left() const;
00099
00101 CL_Sizef get_rounding_bottom_right() const;
00102
00106
00107 public:
00109 void draw(
00110 CL_GraphicContext &gc,
00111 const CL_Pointf &position,
00112 const CL_Colorf &color,
00113 CL_Origin origin=origin_top_left);
00114
00116 void fill(
00117 CL_GraphicContext &gc,
00118 const CL_Pointf &position,
00119 const CL_Colorf &color,
00120 CL_Origin origin=origin_top_left);
00121
00122 void fill(
00123 CL_GraphicContext &gc,
00124 const CL_Pointf &position,
00125 const CL_Gradient &gradient,
00126 CL_Origin origin=origin_top_left);
00127
00129 void set_size(const CL_Sizef &size);
00130
00132 void set_control_point_tl(const CL_Pointf &pos);
00133
00135 void set_control_point_tr(const CL_Pointf &pos);
00136
00138 void set_control_point_bl(const CL_Pointf &pos);
00139
00141 void set_control_point_br(const CL_Pointf &pos);
00142
00144
00145 void set_rounding(float offset_pixels);
00146
00148 void set_rounding_top_left(const CL_Sizef &offset);
00149
00151 void set_rounding_top_right(const CL_Sizef &offset);
00152
00154 void set_rounding_bottom_left(const CL_Sizef &offset);
00155
00157 void set_rounding_bottom_right(const CL_Sizef &offset);
00158
00162
00163 private:
00164 CL_SharedPtr<CL_RoundedRect_Impl> impl;
00166 };
00167