|
From: <xf...@us...> - 2014-02-02 17:36:12
|
Revision: 1897
http://sourceforge.net/p/scstudio/code/1897
Author: xfarmad
Date: 2014-02-02 17:36:08 +0000 (Sun, 02 Feb 2014)
Log Message:
-----------
Comment width is now exported in to latex
Modified Paths:
--------------
trunk/src/data/exporttex/exportTex.cpp
Modified: trunk/src/data/exporttex/exportTex.cpp
===================================================================
--- trunk/src/data/exporttex/exportTex.cpp 2014-01-30 20:38:43 UTC (rev 1896)
+++ trunk/src/data/exporttex/exportTex.cpp 2014-02-02 17:36:08 UTC (rev 1897)
@@ -396,6 +396,7 @@
DistanceMap m_local_condition_width_map;
DistanceMap m_local_condition_height_map;
DistanceMap m_lostfound_width_map;
+ DistanceMap m_comment_inst_dist_map;
DistanceMap m_comment_width_map;
DistanceMap m_comment_slope_map;
DistanceMap m_absolutetime_width_map;
@@ -668,7 +669,8 @@
cpos != event->get_comments().end(); cpos++)
{
print_color((*cpos)->get_color());
- m_stream << m_comment_width_map.printLength(event->get_instance()->get_line_begin().get_x(),(*cpos)->get_position().get_x(),true);
+ m_stream << m_comment_inst_dist_map.printLength(event->get_instance()->get_line_begin().get_x(),(*cpos)->get_position().get_x(),true);
+ m_stream << m_comment_width_map.printLength((*cpos)->get_width());
m_stream << m_comment_slope_map.printLength((*cpos)->get_position().get_y(),event->get_position().get_y()+coordinate);
m_stream << "\\msccomment";
if((*cpos)->get_position().get_x() > event->get_instance()->get_line_begin().get_x())
@@ -902,6 +904,7 @@
m_stream << m_local_condition_height_map.print();
m_stream << m_lostfound_width_map.print();
m_stream << m_comment_width_map.print();
+ m_stream << m_comment_inst_dist_map.print();
m_stream << m_comment_slope_map.print();
m_stream << m_absolutetime_width_map.print();
m_stream << m_absolutetime_slope_map.print();
@@ -1007,7 +1010,8 @@
//left
edge_point((*cpos)->get_position().get_x()-(*cpos)->get_width());
}
- m_comment_width_map.addDistance( event->get_instance()->get_line_begin().get_x(), (*cpos)->get_position().get_x(),true);
+ m_comment_width_map.addDistance((*cpos)->get_width());
+ m_comment_inst_dist_map.addDistance( event->get_instance()->get_line_begin().get_x(), (*cpos)->get_position().get_x(),true);
m_comment_slope_map.addDistance((*cpos)->get_position().get_y(),coor);
}
@@ -1653,9 +1657,13 @@
m_lostfound_width_map.setLengthName("selfmesswidth");
m_lostfound_width_map.setIsLength(false);
m_lostfound_width_map.setIsVerticalLength(false);
+ m_comment_inst_dist_map.setName("commentInstDist");
+ m_comment_inst_dist_map.setDescription("%%%% Distance of comment from instance:");
+ m_comment_inst_dist_map.setLengthName("msccommentdist");
+ m_comment_inst_dist_map.setIsVerticalLength(false);
m_comment_width_map.setName("commentWidth");
m_comment_width_map.setDescription("%%%% Width of comment:");
- m_comment_width_map.setLengthName("msccommentdist");
+ m_comment_width_map.setLengthName("msccommentwidth");
m_comment_width_map.setIsVerticalLength(false);
m_comment_slope_map.setName("commentSlope");
m_comment_slope_map.setDescription("%%%% Comment slope: ");
@@ -1904,6 +1912,7 @@
DistanceMap m_condition_height;
DistanceMap m_condition_width;
DistanceMap m_conection_radius;
+ DistanceMap m_comment_width;
DistanceMap m_time_interval_width;
DistanceMap m_start_symbol_width;
ColorMap m_colors;
@@ -1936,6 +1945,7 @@
for(std::list<HMscNodePtr>::const_iterator npos = node_stack.begin();
npos != node_stack.end(); npos++)
{
+
// process forward links
PredecessorNode *predecessor_node = dynamic_cast<PredecessorNode*>(npos->get());
if(predecessor_node != NULL)
@@ -1966,6 +1976,12 @@
m_urCorner.set_x((*npos)->get_position().get_x());
if((*npos)->get_position().get_y()>m_urCorner.get_y())
m_urCorner.set_y((*npos)->get_position().get_y());
+
+ for(CommentPtrSet::const_iterator cpos = (*npos)->get_comments().begin();
+ cpos != (*npos)->get_comments().end(); cpos++)
+ {
+ m_comment_width.addDistance((*cpos)->get_width());
+ }
}
node_stack.clear();
@@ -2043,6 +2059,7 @@
<< m_condition_width.print() << std::endl
<< m_condition_height.print() << std::endl
<< m_conection_radius.print() << std::endl
+ << m_comment_width.print() << std::endl
<< m_time_interval_width.print() << std::endl
<< m_colors.print() << std::endl;
@@ -2136,6 +2153,10 @@
m_conection_radius.setDescription("%%%% Radius of connection symbol:");
m_conection_radius.setName("connectionRadius");
m_conection_radius.setLengthName("hmscconnectionradius");
+ m_comment_width.setDescription("%%%% Width of comment:");
+ m_comment_width.setName("commentWidth");
+ m_comment_width.setLengthName("hmsccommentwidth");
+ m_comment_width.setIsVerticalLength(false);
m_time_interval_width.setDescription("%%%% Width of time interval:");
m_time_interval_width.setName("timeintervalWidth");
m_time_interval_width.setLengthName("");
@@ -2266,6 +2287,7 @@
cpos != (*npos)->get_comments().end(); cpos++)
{
print_color((*cpos)->get_color());
+ m_comment_width.printLength((*cpos)->get_width());
m_stream << "\\hmsccomment{"
<< ExportTex::print_wchar((*cpos)->get_text()) << "}(" << get_pos_x((*cpos)->get_position().get_x())
<< "," << get_pos_y((*cpos)->get_position().get_y()) << "){"
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|