Clockwiser

Hi all,
I have a clockface of images with a button, which when clicked should rotate the images clockwise around the clockface.
There are 3 images per 'hour'.
The images are placed via co-ords stored as x & y arrays.
The button needs to advance the selected co-ord by 3 array places.
Currently the only outcome I can achieve is to rotate the images until they reach the array length limit - at which point my 'image1.gif' is cloned and takes over another space per button press.
I think the problem lies in the second if statement - but I can't find the solution.
Can anybody else?
Many thanks.
public void doClockwise()
        int current = 3;
        int [] temp = new int[indexArray2.length];
        for(int x=1; x<indexArray2.length; x++)
            if(current < indexArray2.length)
                temp[current] = indexArray2[x];
                current++;
            if(current > indexArray2.length)
        indexArray2 = temp;
        repaint();
    }

I'm not sure what you're asking, actually, but if you wanted the next coordinates for the 3 images....
int current = 0;
int[] allCoordinates = new int[6]; // 3 x/y pairs (x1, y1, x2, y2, x3, y3 )
.. fill the coords ...
public void int[] getNextCoordinates() {
   int[] coords = { allCoordinates[current], allCoordinates[current+1] };
   current+=2;
   if(current >= allCoordinates.length) {
      current = 0;
   return coords;
}

Similar Messages

  • I can listen to the Music Library in my Ipad through home sharing, but I can't do it in my Iphone. When Iphone managed to connect my Mac, I can see how a watch turns clockwise but it stops when it arrives at a half of the watch. What can I do?

    I can listen to the Music Library in my Ipad through home sharing, but I can't do it in my Iphone. When Iphone managed to connect my Mac, I can see how a watch turns clockwise but it stops when it arrives at a half of the watch. What can I do?

    Hi there,
    You may want to take a look at some of the troubleshooting steps found in the article below.
    Troubleshooting Home Sharing
    http://support.apple.com/kb/ts2972
    Hope that helps,
    Griff W.

  • Printing a PDF document to Adobe PDF rotates 90degrees clockwise

    When I print a PDF document (scanned) to the Adobe PDF printer the resulting document is rotated 90 degrees clockwise. Regardless what settings are in Pro or the Adobe PDF writer.
    How do I prevent Acrobat Pro or Adobe PDF from rotating documents?
    (CS6 / Windows 10 / Lenovo X1 Carbon)

    Settings that produce a rotated document:

  • Rotate page clockwise/counterclockwise

    Hello all,
    I am using Acrobat DC and so far, I like the amount of customization possible. However, I am having a problem with the page rotation tool. I deal with scanned PDF's all day long and part of my workflow includes correcting page rotation. The optimal configuration would be for me to have "Rotate Counterclockwise" and "Rotate Clockwise" on the top toolbar, so I have added them there using "Customize Quick Tools".
    The problem I have is that the tools work differently there than they do in the "Page Thumbnails" toolbar.  >.<
    Once added to the top tool bar, even though the labels still properly say "Rotate Counterclockwise" and "Rotate Clockwise", BOTH buttons function as the CTRL+SHIFT+R shortcut and open the "Rotate Pages" dialog. >.<
    If this is working as intended, is there some new workflow I need to learn that differs from XI?
    I work on a small screen much of the time and cannot afford to have the Page Thumbnails bar open permanently when the tools pane won't stay hidden.
    Even checking "Restore last view settings when reopening documents" in Preferences, the tools pane pops right back open again on a new document.  >.<
    Thanks in advance for help!

    I've never seen this. I also rotate my pictures as needed in iPhoto. When I put them into a book, the stay vertical. Are you using iPhoto 6?

  • Filled area on left or right side of path – make path clockwise - reverse path

    Hello,
    for a script I'm writing, which will select path points at specific angles (all angles with less than 180°) I need to know, if the inner part of my shape (namely the filled area) is to the left or to the right regarding the direction the path is running.
    In Illustrator I'm able to create shapes by drawing clockwise or counterclockwise. This is a problem, because the filled area sometimes is to the left and sometimes to the right. I know a script out there, which makes the path running the reverse direction. But it doesn't care if the path is already running clockwise or counterclockwise.
    I'm looking for a script which allows me to destinctivly make a path running clockwise when it is counterclockwise so that the filled area is to the right of the path or leave it as it is.
    I've been searching on google for ages already but could'nt find any script which handled this before.
    thank you for any help
    Benny

    select a path before running
    var idoc = app.activeDocument;
    var sel = idoc.selection[0];
    if (sel.polarity == 'PolarityValues.NEGATIVE')
        sel.polarity = PolarityValues.POSITIVE;
    edit:
    yeah, same as what elDudereno said

  • Details: Numbers not translating an Excel document with column headings where the text is rotated counter clockwise 90 degrees with-in the cell.  Can you tell me how I can rotate the contents with-in a cell?

    Details: Numbers not translating an Excel document with column headings where the text is rotated counter clockwise 90 degrees with-in the cell.  Can you tell me how I can rotate the contents with-in a cell?

    Numbers does not have rotated text within cells.  You can place a text box over the cell that has rotated text but you cannot rotate text within a cell.

  • Batch changes don't function. Apt 3.2. From simple commands like "rotate clockwise" to "lift and stamp" the command only affects to the last image in the group selected. Similar problems? Solutions?

    Batch changes don't function. From simple commands like "rotate clockwise" to "lift and stamp" the command only affects to the last image in the group selected. Similar problems? Solutions? Suggestions? Thanks, Bruce

    Glad it helped. Everyone has been bitten by this at one time or another. Fortunately you only get bit once
    Well if you haven't already read it two or three times the User manual is really very good. Apple really did a nice job with it. The on-line version is nice because it is searchable.
    After that the Apple Pro Training Series book Aperture 3 is very useful. Its basically split into three parts. The library, adjustments and sharing. In addition if you get all the way through it you can take the Certification test and become, well certified.
    Rwboyer who posts here on and off has a good site and a couple of ebooks that I found useful.
    good luck

  • Icon with small lock in clockwise arrowe on my iphone 5s screen , what is thats for?

    i have small unknown icon on my iphone 5s, small clockwise circle with locke simbole , what is that

    That would be rotation lock.
    http://support.apple.com/kb/ts3805

  • Validate - Why enter Spatial objects counter-clockwise

    1) SDO_GEOM.VALIDATE_LAYER issues the error message : 13367 (Wrong order)
    There is no explanation as to why this is invalid. I have worked with rectangular objects constructed in a clockwise manner which appear to work fine to determine whether points are either inside, touch or disjoint. What is the impact of not using the counter-clockwise order?
    2) Can anyone recommend a simple starter tutorial for Oracle Spatial?
    thanks,
    Francois Sigouin

    You don't say which version....
    Error:     ORA-13367 (ORA-13367)
    Text:     wrong orientation for interior/exterior rings
    Cause:     In an Oracle Spatial geometry, the exterior and/or interior rings are not oriented correctly.
    Action:     Be sure that the exterior rings are oriented counterclockwise and the interior rings are oriented clockwise.
    Why is like that? Because thats the way its designed, there will be an advantage...and a standard see Justins update...
    The impact of NOT holding this way is unpredictable results. By Oracle Spatial standards its invalid.
    Its the same as we do Long/Lat not lat/long.
    Its easy enough to fix apply...
    SDO_MIGRATE.TO_CURRENT(
    geom IN SDO_GEOMETRY,
    dim IN SDO_DIM_ARRAY
    ) RETURN SDO_GEOMETRY;
    for a single geom, or for the table...
    SDO_MIGRATE.TO_CURRENT(
    tabname IN VARCHAR2
    [, column_name IN VARCHAR2]);
    or
    SDO_MIGRATE.TO_CURRENT(
    tabname IN VARCHAR2,
    column_name IN VARCHAR2
    [, commit_int IN NUMBER]);
    Now to a good primer besides the manuals, the book is
    Pro Oracle Spatial
    By Oracle Spatial Developers and Geodan, NL
    Covers Spatial technology in Oracle (Oracle Locator, Spatial, Mapviewer products)
    Includes Sample code, Tips,…
    ISBN: 1-59059-383-9
    http://www.apress.com/book/bookDisplay.html?bID=315
    give us and example geom and I'll have a look at the issue. - yours rich

  • Do the changes in the spinning icon in your tab mean anything when connecting? It is grey and spinning counterclockwise then it changes to green and spins clockwise.

    When connecting to a site the tab has a spinning icon. It is grey and it spins counter-clockwise. Then it changes color to green and spins clockwise. Does this mean anything (possibly transferring data or data done). If so, what triggers the change. This is not a problem I am just interested in this behavior.

    Counter clockwise means that Firefox is trying to connect to the server and is waiting for the server to respond to that request.

  • How to rotate a movieclip clockwise and counterclockwise

    Dear friends,
    I have 2 movieclips. ro used for rotating and rect the movie that will be rotated.
    I want when clicking and draging the ro movieclip clockwise or counterclockwise, the rect movieclip is rotated clockwise or counterclockwise respectively.
    I allow the rect to be rotated according to mouseX and mouseY.
    but it dose not work as I need.
    I'd like you to show me a trick to achieve that as I want.
    Here is the code:
    var xPo:Number;
    var yPo:Number;
    ro.addEventListener(MouseEvent.MOUSE_DOWN, mouse_down)
    function mouse_down(e:MouseEvent):void
         xPo = mouseX;
         yPo = mouseY;
         ro.addEventListener(MouseEvent.MOUSE_MOVE, mouse_move);
    function mouse_move(e:MouseEvent):void
         if(xPo > xPo)
              rect.rotation += 10;
         else
              rect.rotation -= 10;
         ro.addEventListener(MouseEvent.MOUSE_UP, mouse_up);
    function mouse_up(e:MouseEvent):void
         xPo = mouseX;
         yPo = mouseY;
         ro.removeEventListener(MouseEvent.MOUSE_UP, mouse_up);
         ro.removeEventListener(MouseEvent.MOUSE_MOVE, mouse_move);
    Waiting for you help.

    just checked it quickly and made a change here:
    if(xPo > xPo)  to  if(mouseX > xPo)
    this does the colckwise anti clockwise thing but not exactly. May be this would help you go ahead.

  • Was attempting to use my itouch 4 th generation to play my itunes through my receiver the 1 st song started and stoped after a few seconds so I powered off the itouch and the clockwise circle has been spinning fro the past 20 min ...any thoughts or ideas?

    I was attempting to play itunes through my receiver with my itouch 4 the 1 st song started  and stopped a few seconds later so I powered off my itouch and the clockwise circle has ben spinning for close to 1/2 hour    any suggestions as how to get the thing back to normal...............

    I was attempting to play itunes through my receiver with my itouch 4 the 1 st song started  and stopped a few seconds later so I powered off my itouch and the clockwise circle has ben spinning for close to 1/2 hour    any suggestions as how to get the thing back to normal...............

  • Noob question, can't rotate object clockwise. Please see the pictures below.

    Hello everybody!
    I'm stuck at rotating objects as I tried to follow a tutorial.
    I think the answer is very simple, but because of my weak English, i can't even figure it out how to search for it on Google. tio
    So my question is how to rotate objects like this:
    Instead of this (That's how i can only rotate this object.):
    Thanks in advance!

    zollre,
    - before the value gives you clockwise. Basically, rotate angles are counterclockwise (with an implied + before the value).
    -20 degrees corresponds to 340 degrees (almost a full round counterclockwise).

  • Can you type counter-clockwise round circle bottom?

    I'm using the type on path tool to type around a circle. I'd like text go counte-clockwise around the the bottom of the circle but I can't figure out how to do that. Is it possible?

    Probably the easiest way is to make the circle, use the Scissors tool to open the path by cutting the top anchor and the use the Type-On-A-Path tool (hidden under the Type tool) to click on the bottom center and start typing. You might want to use Centered type.

  • Polygons - array clockwise

    Hi,
    In Oracle spatial 10g, we are having few millions of circular arc polygons (simply polygon, no interior polygon) "sdo_geometry (2003, null, null, sdo_elem_info_array (1, 1003, *2*)," and are finding the whether the user gps locations falling in any of these polygons (POI in polygon) . We are storing the vertices array in counter clockwise direction.
    Now, we are going to buy POIs (sdo_geometry (2003, null, null, sdo_elem_info_array (1, 1003, *1*)) just straight line connected polygons, no interior poygons.
    The problem here is, the third party poi may have vertices in clockwise or counter clockwise directions.
    Whether loading the third party's poi will impact my current table having circular poly in counter clockwise directions and calculating the Point in polygon?
    Is there any best practice to be followed here.

    Hi unnamed user 810260,
    Oracle Spatial defines a valid outer ring as counter-clockwise, no ifs ands or buts about it. Getting your rings into this orientation is your responsibility either by not accepting backwards polygons or by running SDO_UTIL.RECTIFY_GEOMETRY (or SDO_MIGRATE.TO_CURRENT) on each polygon you bring into Oracle Spatial.
    A reference might be similar issues surrounding importing WKT into Oracle Spatial
    SDO_UTIL.FROM_WKTGEOMETRY seems ignorant of ring rotation
    The OGC spec for WKT does not specify a ring rotation so your average WKT polygon could have rings going either way. As Dr. Ravada responds in that thread, it our problem to fix it. The generic WKT utility for Oracle Spatial just loads whatever its given however the rings are rotated and does not attempt to fix anything.
    So a best practice might be to rectify everything. I am not really a big fan of rectify myself (search the list for folks talking about NULL output). Rather I just test the ring rotation and reverse it if I find the problem.
    Cheers,
    Paul

Maybe you are looking for