-** This software and associated documentation
-** are CONFIDENTIAL and PROPRIETARY property of
-** the above-mentioned copyright holder.
+** This package is free software; you can redistribute it and/or
+** modify it under the terms of the GNU General Public License as
+** published by the Free Software Foundation; either version 2 of
+** the License, or (at your option) any later version.
-** You may not copy, print, publish, or in any
-** other way distribute this software without
-** a prior written agreement with
-** the copyright holder.
+** This package is distributed in the hope that it will be useful,
+** but WITHOUT ANY WARRANTY; without even the implied warranty of
+** MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+** General Public License for more details.
int drawable_w,drawable_h;
drawable->get_size(drawable_w,drawable_h);
int drawable_w,drawable_h;
drawable->get_size(drawable_w,drawable_h);
const synfig::Vector::value_type window_startx(get_work_area()->get_window_tl()[0]);
const synfig::Vector::value_type window_starty(get_work_area()->get_window_tl()[1]);
const synfig::Vector::value_type window_startx(get_work_area()->get_window_tl()[0]);
const synfig::Vector::value_type window_starty(get_work_area()->get_window_tl()[1]);
for(iter2=(*iter)->stroke_data->begin();iter2!=(*iter)->stroke_data->end();++iter2)
{
holder=*iter2-window_start;
holder[0]/=pw;holder[1]/=ph;
points.push_back(Gdk::Point(round_to_int(holder[0]),round_to_int(holder[1])));
}
for(iter2=(*iter)->stroke_data->begin();iter2!=(*iter)->stroke_data->end();++iter2)
{
holder=*iter2-window_start;
holder[0]/=pw;holder[1]/=ph;
points.push_back(Gdk::Point(round_to_int(holder[0]),round_to_int(holder[1])));
}
gc->set_rgb_fg_color(colorconv_synfig2gdk((*iter)->color));
gc->set_function(Gdk::COPY);
gc->set_line_attributes(1,Gdk::LINE_SOLID,Gdk::CAP_BUTT,Gdk::JOIN_MITER);
// Draw the stroke
gc->set_rgb_fg_color(colorconv_synfig2gdk((*iter)->color));
gc->set_function(Gdk::COPY);
gc->set_line_attributes(1,Gdk::LINE_SOLID,Gdk::CAP_BUTT,Gdk::JOIN_MITER);
// Draw the stroke
c2[0]/=pw;c2[1]/=ph;
bezier<Point> curve(p1,c1,c2,p2);
vector<Gdk::Point> points;
c2[0]/=pw;c2[1]/=ph;
bezier<Point> curve(p1,c1,c2,p2);
vector<Gdk::Point> points;
points.push_back(Gdk::Point(round_to_int(pt[0]),round_to_int(pt[1])));
}
points.push_back(Gdk::Point(round_to_int(p2[0]),round_to_int(p2[1])));
points.push_back(Gdk::Point(round_to_int(pt[0]),round_to_int(pt[1])));
}
points.push_back(Gdk::Point(round_to_int(p2[0]),round_to_int(p2[1])));
// Draw the curve
/* if(solid_lines)
{
gc->set_rgb_fg_color(Gdk::Color("#000000"));
gc->set_function(Gdk::COPY);
gc->set_line_attributes(3,Gdk::LINE_SOLID,Gdk::CAP_BUTT,Gdk::JOIN_MITER);
// Draw the curve
/* if(solid_lines)
{
gc->set_rgb_fg_color(Gdk::Color("#000000"));
gc->set_function(Gdk::COPY);
gc->set_line_attributes(3,Gdk::LINE_SOLID,Gdk::CAP_BUTT,Gdk::JOIN_MITER);
gc->set_rgb_fg_color(Gdk::Color("#afafaf"));
gc->set_line_attributes(1,Gdk::LINE_SOLID,Gdk::CAP_BUTT,Gdk::JOIN_MITER);
gc->set_rgb_fg_color(Gdk::Color("#afafaf"));
gc->set_line_attributes(1,Gdk::LINE_SOLID,Gdk::CAP_BUTT,Gdk::JOIN_MITER);
// gc->set_rgb_fg_color(Gdk::Color("#ffffff"));
// gc->set_function(Gdk::INVERT);
// gc->set_line_attributes(1,Gdk::LINE_SOLID,Gdk::CAP_BUTT,Gdk::JOIN_MITER);
// gc->set_rgb_fg_color(Gdk::Color("#ffffff"));
// gc->set_function(Gdk::INVERT);
// gc->set_line_attributes(1,Gdk::LINE_SOLID,Gdk::CAP_BUTT,Gdk::JOIN_MITER);
gc->set_rgb_fg_color(Gdk::Color("#000000"));
gc->set_function(Gdk::COPY);
gc->set_line_attributes(1,Gdk::LINE_SOLID,Gdk::CAP_BUTT,Gdk::JOIN_MITER);
gc->set_rgb_fg_color(Gdk::Color("#000000"));
gc->set_function(Gdk::COPY);
gc->set_line_attributes(1,Gdk::LINE_SOLID,Gdk::CAP_BUTT,Gdk::JOIN_MITER);
gc->set_rgb_fg_color(Gdk::Color("#afafaf"));
gc->set_line_attributes(1,Gdk::LINE_ON_OFF_DASH,Gdk::CAP_BUTT,Gdk::JOIN_MITER);
gc->set_rgb_fg_color(Gdk::Color("#afafaf"));
gc->set_line_attributes(1,Gdk::LINE_ON_OFF_DASH,Gdk::CAP_BUTT,Gdk::JOIN_MITER);
// If this type of duck has been masked, then skip it
if((*iter)->get_type() && (!(get_work_area()->get_type_mask() & (*iter)->get_type())))
continue;
// If this type of duck has been masked, then skip it
if((*iter)->get_type() && (!(get_work_area()->get_type_mask() & (*iter)->get_type())))
continue;
if(get_work_area()->get_selected_value_node())
{
synfigapp::ValueDesc value_desc((*iter)->get_value_desc());
if(get_work_area()->get_selected_value_node())
{
synfigapp::ValueDesc value_desc((*iter)->get_value_desc());
gc->set_rgb_fg_color(Gdk::Color("#FF0000"));
//gc->set_line_attributes(1,Gdk::LINE_ON_OFF_DASH,Gdk::CAP_BUTT,Gdk::JOIN_MITER);
gc->set_line_attributes(2,Gdk::LINE_SOLID,Gdk::CAP_BUTT,Gdk::JOIN_MITER);
gc->set_rgb_fg_color(Gdk::Color("#FF0000"));
//gc->set_line_attributes(1,Gdk::LINE_ON_OFF_DASH,Gdk::CAP_BUTT,Gdk::JOIN_MITER);
gc->set_line_attributes(2,Gdk::LINE_SOLID,Gdk::CAP_BUTT,Gdk::JOIN_MITER);
drawable->draw_rectangle(gc,false,
round_to_int(point[0]-5),
round_to_int(point[1]-5),
drawable->draw_rectangle(gc,false,
round_to_int(point[0]-5),
round_to_int(point[1]-5),
round_to_int(tl[1]),
round_to_int(abs(boxpoint[0]-point[0])),
round_to_int(abs(boxpoint[1]-point[1]))
round_to_int(tl[1]),
round_to_int(abs(boxpoint[0]-point[0])),
round_to_int(abs(boxpoint[1]-point[1]))
gc->set_function(Gdk::COPY);
gc->set_rgb_fg_color(Gdk::Color("#000000"));
gc->set_line_attributes(1,Gdk::LINE_ON_OFF_DASH,Gdk::CAP_BUTT,Gdk::JOIN_MITER);
gc->set_function(Gdk::COPY);
gc->set_rgb_fg_color(Gdk::Color("#000000"));
gc->set_line_attributes(1,Gdk::LINE_ON_OFF_DASH,Gdk::CAP_BUTT,Gdk::JOIN_MITER);
round_to_int(tl[1]),
round_to_int(abs(boxpoint[0]-point[0])),
round_to_int(abs(boxpoint[1]-point[1]))
round_to_int(tl[1]),
round_to_int(abs(boxpoint[0]-point[0])),
round_to_int(abs(boxpoint[1]-point[1]))
else if((*iter)->get_type()&Duck::TYPE_WIDTH)
screen_duck.color=Gdk::Color("#ff00ff");
else if((*iter)->get_type()&Duck::TYPE_ANGLE)
else if((*iter)->get_type()&Duck::TYPE_WIDTH)
screen_duck.color=Gdk::Color("#ff00ff");
else if((*iter)->get_type()&Duck::TYPE_ANGLE)
gc->set_line_attributes(3,Gdk::LINE_SOLID,Gdk::CAP_BUTT,Gdk::JOIN_MITER);
gc->set_rgb_fg_color(Gdk::Color("#000000"));
gc->set_function(Gdk::COPY);
gc->set_line_attributes(3,Gdk::LINE_SOLID,Gdk::CAP_BUTT,Gdk::JOIN_MITER);
gc->set_rgb_fg_color(Gdk::Color("#000000"));
gc->set_function(Gdk::COPY);
- drawable->draw_line(gc, (int)origin[0],(int)origin[1],(int)(point[0]),(int)(point[1]));
+ drawable->draw_line(gc, (int)origin[0],(int)origin[1],(int)(point[0]),(int)(point[1]));
gc->set_line_attributes(1,Gdk::LINE_SOLID,Gdk::CAP_BUTT,Gdk::JOIN_MITER);
gc->set_rgb_fg_color(Gdk::Color("#9fefef"));
gc->set_line_attributes(1,Gdk::LINE_SOLID,Gdk::CAP_BUTT,Gdk::JOIN_MITER);
gc->set_rgb_fg_color(Gdk::Color("#9fefef"));
- drawable->draw_line(gc, (int)origin[0],(int)origin[1],(int)(point[0]),(int)(point[1]));
+ drawable->draw_line(gc, (int)origin[0],(int)origin[1],(int)(point[0]),(int)(point[1]));
-// drawable->draw_line(gc, (int)origin[0],(int)origin[1],(int)(point[0]),(int)(point[1]));
+// drawable->draw_line(gc, (int)origin[0],(int)origin[1],(int)(point[0]),(int)(point[1]));
gc->set_line_attributes(1,Gdk::LINE_SOLID,Gdk::CAP_BUTT,Gdk::JOIN_MITER);
gc->set_rgb_fg_color(Gdk::Color("#000000"));
gc->set_function(Gdk::COPY);
gc->set_line_attributes(1,Gdk::LINE_SOLID,Gdk::CAP_BUTT,Gdk::JOIN_MITER);
gc->set_rgb_fg_color(Gdk::Color("#000000"));
gc->set_function(Gdk::COPY);
- drawable->draw_line(gc, (int)origin[0],(int)origin[1],(int)(point[0]),(int)(point[1]));
+ drawable->draw_line(gc, (int)origin[0],(int)origin[1],(int)(point[0]),(int)(point[1]));
gc->set_line_attributes(1,Gdk::LINE_ON_OFF_DASH,Gdk::CAP_BUTT,Gdk::JOIN_MITER);
gc->set_rgb_fg_color(Gdk::Color("#9fefef"));
gc->set_line_attributes(1,Gdk::LINE_ON_OFF_DASH,Gdk::CAP_BUTT,Gdk::JOIN_MITER);
gc->set_rgb_fg_color(Gdk::Color("#9fefef"));
- drawable->draw_line(gc, (int)origin[0],(int)origin[1],(int)(point[0]),(int)(point[1]));
+ drawable->draw_line(gc, (int)origin[0],(int)origin[1],(int)(point[0]),(int)(point[1]));
gc->set_function(Gdk::INVERT);
}
gc->set_line_attributes(1,Gdk::LINE_SOLID,Gdk::CAP_BUTT,Gdk::JOIN_MITER);
gc->set_function(Gdk::INVERT);
}
gc->set_line_attributes(1,Gdk::LINE_SOLID,Gdk::CAP_BUTT,Gdk::JOIN_MITER);
if(hover)
{
Distance real_mag(((*iter)->get_trans_point()-(*iter)->get_trans_origin()).mag(),Distance::SYSTEM_UNITS);
real_mag.convert(App::distance_system,get_work_area()->get_rend_desc());
if(hover)
{
Distance real_mag(((*iter)->get_trans_point()-(*iter)->get_trans_origin()).mag(),Distance::SYSTEM_UNITS);
real_mag.convert(App::distance_system,get_work_area()->get_rend_desc());
for(;screen_duck_list.size();screen_duck_list.pop_front())
{
int radius=4;
int outline=1;
Gdk::Color color(screen_duck_list.front().color);
for(;screen_duck_list.size();screen_duck_list.pop_front())
{
int radius=4;
int outline=1;
Gdk::Color color(screen_duck_list.front().color);
if(!screen_duck_list.front().selected)
{
color.set_red(color.get_red()*2/3);
color.set_green(color.get_green()*2/3);
color.set_blue(color.get_blue()*2/3);
}
if(!screen_duck_list.front().selected)
{
color.set_red(color.get_red()*2/3);
color.set_green(color.get_green()*2/3);
color.set_blue(color.get_blue()*2/3);
}
if(screen_duck_list.front().hover && !screen_duck_list.back().hover && screen_duck_list.size()>1)
{
screen_duck_list.push_back(screen_duck_list.front());
continue;
}
if(screen_duck_list.front().hover && !screen_duck_list.back().hover && screen_duck_list.size()>1)
{
screen_duck_list.push_back(screen_duck_list.front());
continue;
}
gc->set_function(Gdk::COPY);
gc->set_line_attributes(1,Gdk::LINE_SOLID,Gdk::CAP_BUTT,Gdk::JOIN_MITER);
gc->set_rgb_fg_color(Gdk::Color("#000000"));
gc->set_function(Gdk::COPY);
gc->set_line_attributes(1,Gdk::LINE_SOLID,Gdk::CAP_BUTT,Gdk::JOIN_MITER);
gc->set_rgb_fg_color(Gdk::Color("#000000"));