|
From: <xf...@us...> - 2013-05-16 11:35:52
|
Revision: 1752
http://sourceforge.net/p/scstudio/code/1752
Author: xfarmad
Date: 2013-05-16 11:35:48 +0000 (Thu, 16 May 2013)
Log Message:
-----------
ExportTex adjustments
Modified Paths:
--------------
trunk/src/data/exporttex/exportTex.cpp
trunk/src/data/exporttex/exportTex.h
trunk/tests/exporttex_position_test/exporttex_position_test.cpp
trunk/tests/exporttex_test/exporttex_test.cpp
Modified: trunk/src/data/exporttex/exportTex.cpp
===================================================================
--- trunk/src/data/exporttex/exportTex.cpp 2013-05-11 22:36:05 UTC (rev 1751)
+++ trunk/src/data/exporttex/exportTex.cpp 2013-05-16 11:35:48 UTC (rev 1752)
@@ -434,19 +434,16 @@
m_stream << m_slope_size_map.printLength(sendY,receiveY,true);
m_stream << "\\mess{" << ExportTex::print_wchar(complete_message->get_label())
<< "}{"<< m_instance_id_map.get_id(inst_pos(complete_message->get_sender())) << "_inst}[0.3]{"
- << m_instance_id_map.get_id(inst_pos(complete_message->get_receiver())) << "_inst}";
- if(!Compare::equal(sendY,receiveY))
+ << m_instance_id_map.get_id(inst_pos(complete_message->get_receiver())) << "_inst}";
+ if(Compare::compare(sendY,receiveY,true))
{
- if(Compare::compare(sendY,receiveY))
- {
- m_stream << "[1]";
- }
- else
- {
- m_stream << "[-1]";
- }
- findCoregionPadding(complete_message->get_send_event(),complete_message->get_receive_event());
+ m_stream << "[1]";
}
+ else
+ {
+ m_stream << "[-1]";
+ }
+ findCoregionPadding(complete_message->get_send_event(),complete_message->get_receive_event());
m_stream << std::endl;
}
}
@@ -734,13 +731,13 @@
Coordinate get_enviroment_dist()
{
- /* Default no frame in drawn and to avoid big padding only left padding is tooken
+ // Default no frame in drawn and to avoid big padding only left padding is tooken
if(fabs(m_left_most_point-m_left_most_instance->get_line_begin().get_x()) < fabs(m_right_most_point-m_right_most_instance->get_line_begin().get_x()))
return Compare::round(fabs(m_right_most_point-m_right_most_instance->get_line_begin().get_x())+10);
else
return Compare::round(fabs(m_left_most_point-m_left_most_instance->get_line_begin().get_x())+10);
- */
- return Compare::round(fabs(m_left_most_point-m_left_most_instance->get_line_begin().get_x())+10);
+
+ //return Compare::round(fabs(m_left_most_point-m_left_most_instance->get_line_begin().get_x())+10);
}
void print_configuration_header()
@@ -892,7 +889,17 @@
for(CommentPtrSet::const_iterator cpos = event->get_comments().begin();
cpos != event->get_comments().end(); cpos++)
{
- edge_point((*cpos)->get_position().get_x(),(*cpos)->get_width());
+ //find out on which side comment is
+ if( (*cpos)->get_position().get_x() > event->get_instance()->get_line_begin().get_x() )
+ {
+ //right
+ edge_point((*cpos)->get_position().get_x()+(*cpos)->get_width());
+ }
+ else
+ {
+ //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_slope_map.addDistance((*cpos)->get_position().get_y(),coor);
}
@@ -1131,6 +1138,11 @@
break;
}
+ if( level_type == COREGION_AREA_FIRST_LEVEL)
+ {
+ continue;
+ }
+
MessageEventPtr event = boost::dynamic_pointer_cast<MessageEvent>(*it_ptr_list);
if(event!=NULL)
{
Modified: trunk/src/data/exporttex/exportTex.h
===================================================================
--- trunk/src/data/exporttex/exportTex.h 2013-05-11 22:36:05 UTC (rev 1751)
+++ trunk/src/data/exporttex/exportTex.h 2013-05-16 11:35:48 UTC (rev 1752)
@@ -24,7 +24,7 @@
-#define EPSILON 0.5
+#define EPSILON 0.1
class Compare
{
public:
Modified: trunk/tests/exporttex_position_test/exporttex_position_test.cpp
===================================================================
--- trunk/tests/exporttex_position_test/exporttex_position_test.cpp 2013-05-11 22:36:05 UTC (rev 1751)
+++ trunk/tests/exporttex_position_test/exporttex_position_test.cpp 2013-05-16 11:35:48 UTC (rev 1752)
@@ -11,9 +11,9 @@
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
* Lesser General Public License for more details.
*
- * Copyright (c) 2009 Adrian Farmadin <a.f...@gm...>
+ * Copyright (c) 2012 Adrian Farmadin <a.f...@gm...>
*
- * $Id: z120_test.cpp 1274 2012-01-10 15:49:30Z lkorenciak $
+ * $Id: exporttex_position_test.cpp 1274 2012-01-10 15:49:30Z lkorenciak $
*/
#include <string.h>
Modified: trunk/tests/exporttex_test/exporttex_test.cpp
===================================================================
--- trunk/tests/exporttex_test/exporttex_test.cpp 2013-05-11 22:36:05 UTC (rev 1751)
+++ trunk/tests/exporttex_test/exporttex_test.cpp 2013-05-16 11:35:48 UTC (rev 1752)
@@ -11,9 +11,9 @@
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
* Lesser General Public License for more details.
*
- * Copyright (c) 2009 Petr Gotthard <pet...@ce...>
+ * Copyright (c) 2012 Adrian Farmadin <a.f...@gm...>
*
- * $Id: z120_test.cpp 1274 2012-01-10 15:49:30Z lkorenciak $
+ * $Id: exporttex_test.cpp 1274 2012-01-10 15:49:30Z lkorenciak $
*/
#include <string.h>
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|