Renamed expr_color to color

This commit is contained in:
cnjinhao
2014-12-24 02:07:39 +08:00
parent 34c8392f35
commit ad7c36be3f
49 changed files with 296 additions and 296 deletions

View File

@@ -209,7 +209,7 @@ namespace gadget
//arrow_16_pixels
//param@style: 0 = hollow, 1 = solid
void arrow_16_pixels(nana::paint::graphics& graph, int x, int y, const nana::expr_color& clr, uint32_t style, directions::t dir)
void arrow_16_pixels(nana::paint::graphics& graph, int x, int y, const nana::color& clr, uint32_t style, directions::t dir)
{
graph.set_color(clr);
switch(style)
@@ -230,7 +230,7 @@ namespace gadget
}
}
void close_16_pixels(::nana::paint::graphics& graph, int x, int y, uint32_t style, const ::nana::expr_color& clr)
void close_16_pixels(::nana::paint::graphics& graph, int x, int y, uint32_t style, const ::nana::color& clr)
{
graph.set_color(clr);
if(0 == style)
@@ -261,7 +261,7 @@ namespace gadget
}
}
void cross(graphics& graph, int x, int y, uint32_t size, uint32_t thickness, const ::nana::expr_color& color)
void cross(graphics& graph, int x, int y, uint32_t size, uint32_t thickness, const ::nana::color& color)
{
if (thickness + 2 <= size)
{
@@ -302,7 +302,7 @@ namespace gadget
ps[11].x = x + gap;
ps[11].y = y + gap;
::nana::expr_color darker(0, 0, 0);
::nana::color darker(0, 0, 0);
darker.blend(color, true);
graph.set_color(darker);

View File

@@ -857,13 +857,13 @@ namespace paint
}
}
void graphics::set_color(const ::nana::expr_color& col)
void graphics::set_color(const ::nana::color& col)
{
if (handle_)
handle_->set_color(col);
}
void graphics::set_text_color(const ::nana::expr_color& col)
void graphics::set_text_color(const ::nana::color& col)
{
if (handle_)
handle_->set_text_color(col);
@@ -883,7 +883,7 @@ namespace paint
return static_cast<unsigned>(moved_pos.x - pos.x);
}
void graphics::blend(const nana::rectangle& r, const ::nana::expr_color& clr, double fade_rate)
void graphics::blend(const nana::rectangle& r, const ::nana::color& clr, double fade_rate)
{
if (handle_)
{
@@ -892,7 +892,7 @@ namespace paint
}
}
void graphics::set_pixel(int x, int y, const ::nana::expr_color& clr)
void graphics::set_pixel(int x, int y, const ::nana::color& clr)
{
if (handle_)
{
@@ -968,7 +968,7 @@ namespace paint
string(pos, str.data(), str.size());
}
void graphics::string(const point& pos, const ::nana::string& text, const expr_color& clr)
void graphics::string(const point& pos, const ::nana::string& text, const color& clr)
{
set_text_color(clr);
string(pos, text.data(), text.size());
@@ -992,13 +992,13 @@ namespace paint
if (changed_ == false) changed_ = true;
}
void graphics::line(const point& pos_a, const point& pos_b, const expr_color& clr)
void graphics::line(const point& pos_a, const point& pos_b, const color& clr)
{
set_color(clr);
line(pos_a, pos_b);
}
void graphics::line_to(const point& pos, const expr_color& clr)
void graphics::line_to(const point& pos, const color& clr)
{
if (!handle_) return;
handle_->set_color(clr);
@@ -1028,7 +1028,7 @@ namespace paint
rectangle(size(), solid);
}
void graphics::rectangle(bool solid, const ::nana::expr_color& clr)
void graphics::rectangle(bool solid, const ::nana::color& clr)
{
set_color(clr);
rectangle(size(), solid);
@@ -1054,13 +1054,13 @@ namespace paint
}
}
void graphics::rectangle(const ::nana::rectangle& r, bool solid, const expr_color& clr)
void graphics::rectangle(const ::nana::rectangle& r, bool solid, const color& clr)
{
set_color(clr);
rectangle(r, solid);
}
void graphics::frame_rectangle(const ::nana::rectangle& r, const ::nana::expr_color& left_clr, const ::nana::expr_color& top_clr, const ::nana::expr_color& right_clr, const ::nana::expr_color& bottom_clr)
void graphics::frame_rectangle(const ::nana::rectangle& r, const ::nana::color& left_clr, const ::nana::color& top_clr, const ::nana::color& right_clr, const ::nana::color& bottom_clr)
{
int right = r.right() - 1;
int bottom = r.bottom() - 1;
@@ -1071,7 +1071,7 @@ namespace paint
line_to({ r.x, r.y }, left_clr);
}
void graphics::gradual_rectangle(const ::nana::rectangle& r, const ::nana::expr_color& from, const ::nana::expr_color& to, bool vertical)
void graphics::gradual_rectangle(const ::nana::rectangle& r, const ::nana::color& from, const ::nana::color& to, bool vertical)
{
#if defined(NANA_WINDOWS)
if (pxbuf_.open(handle_))
@@ -1128,7 +1128,7 @@ namespace paint
if (changed_ == false) changed_ = true;
}
void graphics::round_rectangle(const ::nana::rectangle& r, unsigned radius_x, unsigned radius_y, const expr_color& clr, bool solid, const expr_color& solid_clr)
void graphics::round_rectangle(const ::nana::rectangle& r, unsigned radius_x, unsigned radius_y, const color& clr, bool solid, const color& solid_clr)
{
if (handle_)
{

View File

@@ -714,7 +714,7 @@ namespace nana{ namespace paint
}
}
void pixel_buffer::line(const point &pos_beg, const point &pos_end, const ::nana::expr_color& clr, double fade_rate)
void pixel_buffer::line(const point &pos_beg, const point &pos_end, const ::nana::color& clr, double fade_rate)
{
auto sp = storage_.get();
if(nullptr == sp) return;
@@ -726,7 +726,7 @@ namespace nana{ namespace paint
(*(sp->img_pro.line))->process(*this, good_pos_beg, good_pos_end, clr, fade_rate);
}
void pixel_buffer::rectangle(const nana::rectangle &r, const ::nana::expr_color& clr, double fade_rate, bool solid)
void pixel_buffer::rectangle(const nana::rectangle &r, const ::nana::color& clr, double fade_rate, bool solid)
{
auto sp = storage_.get();
if((nullptr == sp) || (fade_rate == 1.0)) return;
@@ -927,7 +927,7 @@ namespace nana{ namespace paint
}
}
void pixel_buffer::gradual_rectangle(const ::nana::rectangle& draw_rct, const ::nana::expr_color& from, const ::nana::expr_color& to, double fade_rate, bool vertical)
void pixel_buffer::gradual_rectangle(const ::nana::rectangle& draw_rct, const ::nana::color& from, const ::nana::color& to, double fade_rate, bool vertical)
{
auto sp = storage_.get();
if (nullptr == sp) return;

View File

@@ -118,12 +118,12 @@ namespace nana
{
graphics & graph;
int x, endpos;
::nana::expr_color fgcolor;
::nana::color fgcolor;
unsigned omitted_pixels;
nana::unicode_bidi bidi;
std::vector<nana::unicode_bidi::entity> reordered;
draw_string_omitted(graphics& graph, int x, int endpos, const ::nana::expr_color& fgcolor, bool omitted)
draw_string_omitted(graphics& graph, int x, int endpos, const ::nana::color& fgcolor, bool omitted)
: graph(graph), x(x), endpos(endpos), fgcolor(fgcolor)
{
omitted_pixels = (omitted ? graph.text_extent_size(STR("..."), 3).width : 0);