]> rtime.felk.cvut.cz Git - vajnamar/orte.git/commitdiff
Shape: Actually publish/subscribe to the scale and rotation factors
authorMartin Vajnar <Martin.Vajnar@cvut.cz>
Tue, 3 Apr 2018 11:17:28 +0000 (13:17 +0200)
committerMartin Vajnar <Martin.Vajnar@cvut.cz>
Tue, 3 Apr 2018 11:17:28 +0000 (13:17 +0200)
orte/contrib/shape/FPublisher.cpp
orte/contrib/shape/FSubscriber.cpp

index 5afb3082e989b4f879e38d94a88d81dfc1c7f528..dd1c7a98f45ce93ee1379c050bd24e5c60d76208 100644 (file)
@@ -87,13 +87,17 @@ void FPublisher::Timer()
     } else {
        rect.moveTo(rect.left()+incx,rect.top()+incy);
     }
+    view->setRotation(0,view->wheel_delta);
+    view->setZoom(0,view->scale_factor);
     view->setPosition(0,rect);
     //prepare published data
     boxType.rectangle.top_left_x=rect.left();
     boxType.rectangle.top_left_y=rect.top();
     boxType.rectangle.bottom_right_x=rect.right();
     boxType.rectangle.bottom_right_y=rect.bottom();
-    ORTEPublicationSend(publisher);    
+    boxType.zoom=view->scale_factor;
+    boxType.rotation=view->wheel_delta;
+    ORTEPublicationSend(publisher);
 }
 
 
index dabdb9790236d8504da94bc22af35da31a5c8327..07c85cdfa6419b3a4152d7ece130b3fc5d3552e5 100644 (file)
@@ -40,6 +40,8 @@ recvCallBack(const ORTERecvInfo *info,void *vinstance, void *recvCallBackParam)
          boxType->rectangle.bottom_right_x,
          boxType->rectangle.bottom_right_y);
       s->view->activateObject(boxType->color,boxType->color,boxType->shape);
+      s->view->setZoom(boxType->color,boxType->zoom);
+      s->view->setRotation(boxType->color,boxType->rotation);
       s->view->setPosition(boxType->color,rect);
       break;
     case DEADLINE: