Scale / Divide screen into four areas
in
Programming Questions
•
2 years ago
Hello,
does anyone know how I can divide the screen into 4 areas where I have a thumbnail a small multiple in every
one out of four and scale according to where the mousecursor currently is. For instance if the cursor is in the right top (which should be simply mX > mouseX / 2 && mY < mouseY / 2 after a coordinate transformation to the screen middlepoint (width /2, height / 2)) I want to transform/scale everything into the quarter of the screen where the mousecursor is, such that my mouseover effect is working.
Currently I'm plotting into four offscreen images and scale them to width / 2, height / 2. They are plotted in the right areas but now I want to scale/transform the coordinate system as well dependent on where the mousecursor currently is such that my mouseover effect works with 4 images instead of one for the whole screen. Hope it's unobscured what I'm trying to do, I want to implement a mouseOver effect for the following (extended) SunburstViews in a Small Multiple view:
Whenever I have a mouseover on one item the same item in the other 3 views should be highlighted. Therefore I need to transform/scale my mouseover effect from the entire screen space (for just one such SunburstView) to the appropriate region to get the right item where the mouse cursor points to. Then it's very simple to get the other items and highlight them.
kind regards,
Johannes
1