+
+void Exclusa::get_in_logic_connect_position(int& _a, int& _b)
+{
+ _a = in_x;
+ _b = in_y;
+}
+
+void Exclusa::get_out_logic_connect_position(int& _a, int& _b)
+{
+ _a = out_x;
+ _b = out_y;
+}
+
+ConnectorType Exclusa::detect_click_position(int _a, int _b)
+{
+ switch (imgActual) {
+ case 0:
+ if ( (_a <= image->get_width()/2+10)&&(_a>=image->get_width()/2-10)&&(_b<=16)&&(_b >= 0) )
+ return IN;
+ if ( (_a <= image->get_width()/2+10)&&(_a>=image->get_width()/2-10)&&(_b<=32)&&(_b > 16) )
+ return OUT;
+ break;
+ case 1:
+ if ( (_a <=32)&&(_a> 16)&&(_b<=image->get_height()/2+10)&&(_b >= image->get_height()/2-10) )
+ return IN;
+ if ( (_a <= 16)&&(_a>=0)&&(_b<=image->get_height()/2+10)&&(_b >= image->get_height()/2-10) )
+ return OUT;
+ }
+ return UNDEF;
+}
+
+void Exclusa::update_logic_position()
+{
+ switch (imgActual) {
+ case 1:
+ in_x = x + image->get_width();
+ in_y = y + image->get_height()/2;
+ out_x = x;
+ out_y = in_y;
+ break;
+ case 0:
+ in_x = x + image->get_width()/2;
+ in_y = y;
+ out_x = in_x;
+ out_y = y +image->get_height();
+ }
+}