The directions of objects

I am looking for the methods or classs that incorporate the directions of different object eg, polygons. I mean for instance polygon A lies North of the polygon B and so on. Other directions may include N;E;W;S etc.
Can you please give me suggestions and examples of how to find orientation of this. Thank you!

import java.awt.*;
import java.awt.event.*;
import java.awt.font.*;
import java.awt.geom.*;
import javax.swing.*;
import javax.swing.event.MouseInputAdapter;
public class DirectionTest extends JPanel
    Shape[] shapes;
    int selectedIndex = -1;
    protected void paintComponent(Graphics g)
        super.paintComponent(g);
        Graphics2D g2 = (Graphics2D)g;
        g2.setRenderingHint(RenderingHints.KEY_ANTIALIASING,
                            RenderingHints.VALUE_ANTIALIAS_ON);
        if(shapes == null)
            initShapes();
        for(int j = 0; j < shapes.length; j++)
            Color color = Color.blue;
            if(j == selectedIndex)
                color = Color.red;
            g2.setPaint(color);
            g2.draw(shapes[j]);
        if(selectedIndex > -1)
            Font font = g2.getFont().deriveFont(16f);
            g2.setFont(font);
            FontRenderContext frc = g2.getFontRenderContext();
            g2.setPaint(Color.green.darker());
            for(int j = 0; j < shapes.length; j++)
                if(j == selectedIndex)
                    continue;
                String s = getDirection(shapes[j]);
                float w = (float)font.getStringBounds(s, frc).getWidth();
                float h = font.getLineMetrics(s, frc).getAscent();
                Rectangle r = shapes[j].getBounds();
                float x = r.x + (r.width - w)/2;
                float y = r.y + (r.height + h)/2;
                g2.drawString(s, x, y);
    private String getDirection(Shape shape)
        Rectangle target = shapes[selectedIndex].getBounds();
        Rectangle r = shape.getBounds();
        int outcode = r.outcode(target.getCenterX(), target.getCenterY());
        String direction;
        switch(outcode)
            case Rectangle2D.OUT_TOP:
                direction = "NORTH";
                break;
            case Rectangle2D.OUT_TOP + Rectangle2D.OUT_RIGHT:
                direction = "NORTHEAST";
                break;
            case Rectangle2D.OUT_RIGHT:
                direction = "EAST";
                break;
            case Rectangle2D.OUT_RIGHT + Rectangle2D.OUT_BOTTOM:
                direction = "SOUTHEAST";
                break;
            case Rectangle2D.OUT_BOTTOM:
                direction = "SOUTH";
                break;
            case Rectangle2D.OUT_BOTTOM + Rectangle2D.OUT_LEFT:
                direction = "SOUTHWEST";
                break;
            case Rectangle2D.OUT_LEFT:
                direction = "WEST";
                break;
            case Rectangle2D.OUT_LEFT + Rectangle2D.OUT_TOP:
                direction = "NORTHWEST";
                break;
            default:
                direction = "CENTER";
        return direction;
    public void moveShape(int x, int y)
        AffineTransform at = AffineTransform.getTranslateInstance(x, y);
        shapes[selectedIndex] = at.createTransformedShape(shapes[selectedIndex]);
        repaint();
    public void setSelectedIndex(int index)
        selectedIndex = index;
        repaint();
    private void initShapes()
        shapes = new Shape[3];
        int w = getWidth();
        int h = getHeight();
        int R = Math.min(w, h)/6;
        int[][] xy = generateShapeArrays(w/4, h/4, R, 3);
        shapes[0] = new Polygon(xy[0], xy[1], 3);
        xy = generateShapeArrays(w/2, h/2, R, 5);
        shapes[1] = new Polygon(xy[0], xy[1], 5);
        xy = generateShapeArrays(w*3/4, h*3/4, R, 7);
        shapes[2] = new Polygon(xy[0], xy[1], 7);
    private int[][] generateShapeArrays(int cx, int cy, int R, int sides)
        int radInc = 0;
        if(sides % 2 == 0)
            radInc = 1;
        int[] x = new int[sides];
        int[] y = new int[sides];
        for(int i = 0; i < sides; i++)
            x[i] = cx + (int)(R * Math.sin(radInc*Math.PI/sides));
            y[i] = cy - (int)(R * Math.cos(radInc*Math.PI/sides));
            radInc += 2;
        // keep base of triangle level
        if(sides == 3)
            y[2] = y[1];
        return new int[][] { x, y };
    public static void main(String[] args)
        DirectionTest test = new DirectionTest();
        ShapeMover mover = new ShapeMover(test);
        test.addMouseListener(mover);
        test.addMouseMotionListener(mover);
        JFrame f = new JFrame("click and drag");
        f.setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE);
        f.getContentPane().add(test);
        f.setSize(400,400);
        f.setLocation(200,200);
        f.setVisible(true);
class ShapeMover extends MouseInputAdapter
    DirectionTest directionTest;
    int selectedIndex;
    Point start;
    boolean dragging;
    public ShapeMover(DirectionTest dt)
        directionTest = dt;
        dragging = false;
    public void mousePressed(MouseEvent e)
        Point p = e.getPoint();
        Shape[] shapes = directionTest.shapes;
        for(int j = 0; j < shapes.length; j++)
            if(shapes[j].contains(p))
                directionTest.setSelectedIndex(j);
                start = p;
                dragging = true;
                break;
    public void mouseReleased(MouseEvent e)
        dragging = false;
        directionTest.setSelectedIndex(-1);
    public void mouseDragged(MouseEvent e)
        if(dragging)
            Point end = e.getPoint();
            int dx = end.x - start.x;
            int dy = end.y - start.y;
            directionTest.moveShape(dx, dy);
            start = end;
}

Similar Messages

  • Drag Select Inside Points With The Direct Selection Tool While Above An Object?

    I'm trying to modify a path in InDesign CS5 (Fig. 2), as it is now I have to select each point individually. Becasue while you're zoomed in (Fig. 1), you can't drag and select the points. When you attempt to do that, you end up dragging the whole image.
    Is there a way to drag select inside points with the direct selection tool while your directly above the image with the paths you want to select?
    Fig. 1
    Fig. 2

    FAIL #1:
    No. When you copy paste the Cliiping Path [NOT the frame] into Illustrator, then alter the path and paste back into Indesign, it pastes it back as a FRAME, NOT a CLIPPING PATH.
    FAIL #2:
    Why do people comment on this stuff without first testing what they are suggesting?
    What you suggested doesn't work or even make sense.
    Apprently in InDesign, you can't have a CLIPPING PATH without an IMAGE there to begin with. When a FRAME OBJECT contains an IMAGE the option to convert the object to an UNNASSIGNED OBJECT is greyed-out, as in UNSELECTABLE, as in NOT POSSIBLE, which is another way of saying IMPOSSIBLE, which in most circles pertains to MAJOR FAILAGE.
    When you CUT [hold command then press X] the CLIPPING PATH, from the FRAME/OBJECT you can then unassign the object, but when you paste the CLIPPING PATH back in, it invariably pastes the IMAGE along with the CLIPPING PATH, and once again the UNASSIGNED OBJECT is simply an ordinary frame with an image, and thus NO LONGER AN UNASSIGNED FRAME.
    People like you make life harder dude, seriously.
    Again, like some of the folks above, you're confusing a FRAME PATH [that you can alter and create with the pen tool as well] with a CLIPPING PATH. They are NOT the same thing. 
    Know the difference between the two before you feel inclined to respond.
    My kingdom for someone out there with some merit and sense of accountability.
    It's like, where do you people work? Are you serious? SMH.

  • Arraylist issue: pass all the arrayList `s object to other arrayList ...

    hi all...i hope somebody could show me some direction on my problem...i want to pass a arraylist `s cd information to an other arraylist
    and save the new arraylist `s object to a file...i try to solve for a long ..pls help...
    import java.text.*;
    import java.util.*;
    import java.io.*;
    public class Demo{
         readOperation theRo = new readOperation();
         errorCheckingOperation theEco = new errorCheckingOperation();
         ArrayList<MusicCd>  MusicCdList;
         private void heading()
              System.out.println("\tTesting read data from console, save to file, reopen that file\t");
         private void readDataFromConsole()
         //private void insertCd()
            MusicCdList = new ArrayList<MusicCd>( ); 
            MusicCd theCd;
            int muiseCdsYearOfRelease;
            int validMuiseCdsYearOfRelease;
            String muiseCdsTitle;
              while(true)
                    String continueInsertCd = "Y";
                   do
                        muiseCdsTitle = theRo.readString("Please enter your CD`s title : ");
                        muiseCdsYearOfRelease = theRo.readInt("Please enter your CD`s year of release : ");
                        validMuiseCdsYearOfRelease = theEco.errorCheckingInteger(muiseCdsYearOfRelease, 1000, 9999);
                        MusicCdList.add(new MusicCd(muiseCdsTitle, validMuiseCdsYearOfRelease));//i try add the cd`s information to the arrayList
                        MusicCdList.trimToSize();
                        //saveToFile(MusicCdList);
                        continueInsertCd = theRo.readString("Do you have another Cd ? (Y/N) : ");
                   }while(continueInsertCd.equals("Y") || continueInsertCd.equals("y") );
                   if(continueInsertCd.equals("N") || continueInsertCd.equals("n"));
                                                    //MusicCdList.add(new MusicCd(muiseCdsTitle, muiseCdsYearOfRelease));                              
                        break;
                      //System.out.println("You `ve an invalid input " + continueInsertCd + " Please enter (Y/N) only!!");
         //i want to pass those information that i just add to the arrayList to file
         //I am going to pass the arraylist that contains my cd`s information to new arraylist "saveitems and save it to a file...
         //i stuck on this problem
         //how do i pass all the arrayList `s object to another arraylist ..pls help
         //it is better show me some example how to solve thx a lot
         private void saveToFile(ArrayList<MusicCd> tempItems)
              ArrayList<MusicCd> saveItems;
              saveItems = new ArrayList<MusicCd>();
              try
                   File f = new File("cdData.txt");
                   FileOutputStream fos = new FileOutputStream(f);
                   ObjectOutputStream oos = new ObjectOutputStream(fos);
                   saveItems.add(ArrayList<MusicCd> tempItems);
                   //items.add("Second item.");
                   //items.add("Third item.");
                   //items.add("Blah Blah.");
                   oos.writeObject(items);
                   oos.close();
              catch (IOException ioe)
                   ioe.printStackTrace();
              try
                   File g = new File("test.fil");
                   FileInputStream fis = new FileInputStream(g);
                   ObjectInputStream ois = new ObjectInputStream(fis);
                   ArrayList<String> stuff = (ArrayList<String>)ois.readObject();
                   for( String s : stuff ) System.out.println(s);
                   ois.close();
              catch (Exception ioe)
                   ioe.printStackTrace();
         public static void main(String[] args)
              Demo one = new Demo();
              one.readDataFromConsole();
              //one.saveToFile();
              //the followring code for better understang
    import java.io.Serializable;
    public class MusicCd implements Serializable
         private String musicCdsTitle;
            private int yearOfRelease;
         public MusicCd()
              musicCdsTitle = "";
              yearOfRelease = 1000;
         public MusicCd(String newMusicCdsTitle, int newYearOfRelease)
              musicCdsTitle = newMusicCdsTitle;
              yearOfRelease = newYearOfRelease;
         public String getTitle()
              return musicCdsTitle;
         public int getYearOfRelease()
              return yearOfRelease;
         public void setTitle(String newMusicCdsTitle)
              musicCdsTitle = newMusicCdsTitle;
         public void setYearOfRelease(int newYearOfRelease)
              yearOfRelease = newYearOfRelease;
         public boolean equalsName(MusicCd otherCd)
              if(otherCd == null)
                   return false;
              else
                   return (musicCdsTitle.equals(otherCd.musicCdsTitle));
         public String toString()
              return("Music Cd`s Title: " + musicCdsTitle + "\t"
                     + "Year of release: " + yearOfRelease + "\t");
         public ArrayList<MusicCd> getMusicCd(ArrayList<MusicCd> tempList)
              return new ArrayList<MusicCd>(ArrayList<MusicCd> tempList);
    import java.util.Scanner;
    import java.util.InputMismatchException;
    import java.util.NoSuchElementException;
    public class errorCheckingOperation
         public int errorCheckingInteger(int checkThing, int lowerBound, int upperBound)
               int aInt = checkThing;
               try
                    while((checkThing < lowerBound ) || (checkThing > upperBound) )
                         throw new Exception("Invaild value....Please enter the value between  " +  lowerBound + " & " +  upperBound );
               catch (Exception e)
                 String message = e.getMessage();
                 System.out.println(message);
               return aInt;
           public int errorCheckingSelectionValue(String userInstruction)
                int validSelectionValue = 0;
                try
                     int selectionValue;
                     Scanner scan = new Scanner(System.in);
                     System.out.print(userInstruction);
                     selectionValue = scan.nextInt();
                     validSelectionValue = errorCheckingInteger(selectionValue , 1, 5);
               catch (NoSuchElementException e)
                   //if no line was found
                   System.out.println("\nNoSuchElementException error occurred (no line was found) " + e);
              catch (IllegalStateException e)
                   // if this scanner is closed
                   System.out.println("\nIllegalStateException error occurred (scanner is closed)" + e);
              return validSelectionValue;
    import java.util.*;
    public class readOperation{
         public String readString(String userInstruction)
              String aString = null;
              try
                         Scanner scan = new Scanner(System.in);
                   System.out.print(userInstruction);
                   aString = scan.nextLine();
              catch (NoSuchElementException e)
                   //if no line was found
                   System.out.println("\nNoSuchElementException error occurred (no line was found) " + e);
              catch (IllegalStateException e)
                   // if this scanner is closed
                   System.out.println("\nIllegalStateException error occurred (scanner is closed)" + e);
              return aString;
         public char readTheFirstChar(String userInstruction)
              char aChar = ' ';
              String strSelection = null;
              try
                   //char charSelection;
                         Scanner scan = new Scanner(System.in);
                   System.out.print(userInstruction);
                   strSelection = scan.next();
                   aChar =  strSelection.charAt(0);
              catch (NoSuchElementException e)
                   //if no line was found
                   System.out.println("\nNoSuchElementException error occurred (no line was found) " + e);
              catch (IllegalStateException e)
                   // if this scanner is closed
                   System.out.println("\nIllegalStateException error occurred (scanner is closed)" + e);
              return aChar;
         public int readInt(String userInstruction) {
              int aInt = 0;
              try {
                   Scanner scan = new Scanner(System.in);
                   System.out.print(userInstruction);
                   aInt = scan.nextInt();
              } catch (InputMismatchException e) {
                   System.out.println("\nInputMismatchException error occurred (the next token does not match the Integer regular expression, or is out of range) " + e);
              } catch (NoSuchElementException e) {
                   System.out.println("\nNoSuchElementException error occurred (input is exhausted)" + e);
              } catch (IllegalStateException e) {
                   System.out.println("\nIllegalStateException error occurred (scanner is closed)" + e);
              return aInt;
    }

    sorry for my not-clear descprtion...thc for your help....i got a problem on store some data to a file ....u can see my from demo..
    Step1: i try to prompt the user to enter his/her cd `s information
    and i pass those cd `s information to an object "MuiscCd" ..and i am going to add this "MuiscCd" to the arrayList " MusicCdList ". i am fine here..
    Step2: and i want to save the object that `s in my arrayList " MusicCdList " to a file....i got stuck here..<_> ..(confused).
    Step3:
    i will reopen the file and print it out..(here i am alright )

  • How to use the direct bytebuffer in JNI? Accessing JDBC from C application.

    I am working on a project to access JDBC Driver within C application. The invocation JNI is used.
    To get better performance, I use the preparedStatement for dynamic sql. This need to transfer much parameter data from C to JDBC for PreparedStatement object in JVM. I think this maybe get improvements by using the new direct bytebuffer function from JDK1.4. However I cannot find an example code to get start. Could someone provide some ideas for this?
    Currently, I directly call JDBC API in C application through JNI, so there is no java codes. Only c file using JNI call.
    My understanding is to use the direct bytebuffer feature, I also need to have java codes to process the JDBC API call and then can share the same memory between Java and C. Please correct me if wrong.
    Any input is appreciated.

    tzhouxian wrote:
    thanks, jschell
    I am trying to get the best performance for the solution, using JDBC libs in a C application. So I am considering to use the direct bytebuffer in the solution to pass parameters to JDBC and get result sets from JDBC side.
    For your questions,
    1. Why don't you just write the database access in C?
    You mean to directly call JDBC API in C through JNI, right? My plan is to wrap the JDBC API by java and expose seldom interface to C native code, so reduce the JNI call between C and JAVA. If directly call the JDBC API call from C, the number of JNI call maybe more.
    No I mean what I said. In C, no java at all, why don't you write code to access the database?
    2. The database access itself is going to be slower than anything that you do in C or java.
    Exactly. I just want to find each potential points to get performance improvements for the whole solution. I also did some optimization work for the database call. The goal is to get the best performance from C application to database through JDBC libs.
    Then I suggest you profile it.
    3. Why don't you use import/export files and the database tools? This is often significantly faster with volume processing.
    Sorry, I am not very familar with some functions of JNI. Could you explain, " +Why don't you use import/export files and the database tools+"?
    Nothing to do with java, jni nor C.
    Major (or perhaps everything that is a real 'database') comes with additional tools. Amounst those tools will be command line tools capable of importing and exporting data from the database. In processing bulk data they will always be faster than anything you can do in JDBC.

  • How do you change the direction of a Tween Wipe effect

    Hi all,
    Completely new to the forums and I hopefully my query is straight forward.  How do you change the direction in the pre-built tween effects available within Flash CS3 (primarily the Wipe effect).  Example code:
    var Animate_Box:Tween = new Tween(Box, "height", Strong.easeInOut, 0, 200, 1, true);
    OR
    var Animate_Box_2:Object = {type:Wipe, direction:Transition.IN, duration:1, easing:Strong.easeInOut};
    TransitionManager.start(Box_2, Animate_Box_2);
    Many thanks in advance.
    Kam
    ANSWERED:
    Sorry for posting something so pointless!
    You simply add 'startPoint:5' onto the end i.e.
    var Animate_Box_2:Object = {type:Wipe, direction:Transition.IN, duration:1, easing:Strong.easeInOut, startPoint:5'};
    TransitionManager.start(Box_2, Animate_Box_2);
    startPoint:5' = can be any number depending on the direction of the Wipe you want.
    Thanks,
    Kam

    What you really want is a way of automatically mirroring the the X and/or Y coordinates of the keyframes within the effect. This ability would be very useful.
    But right now there's no way to do that. You'd have to do it manually. That effect actually uses the Slide parameter to generate the movement (instead of a discreet X/Y coordinate for the position.) Changing the first keyframe value of the Slide parameter to a negative number still doesn't give the effect I think you're looking for.
    So, it's probably easier to just rebuild the effect the way you want it from scratch.
    Bony

  • How to retrive the Direct purchase entries from table level? S_ALR_87012050

    Hi All
    In our current project we need to retrieve the direct purchase report from table level. Can you please provide me the direct purchase related table? Normally we are executing the standard report S_ALR_87012050
    to extract the direct purchase entries. We need to know which table has the direct purchase entries.
    Regards
    K.Gunasekar

    K,
    Your problem description is still insufficiently detailed.
    It appears now that you are searching for asset numbers.  Please confirm.
    Your selection criteria "Inventory Number NE 0" doesn't appear to make much sense.  Inventory number is not a quantity, it is the name of an object.  I guess it is meaningful you have some inventory numbers named as '0'.  I don't think this setting is causing your problem though.....
    You didn't mention which table you accessed to discover that you had a perceived discrepancy.  Which table did you browse to see the results you mentioned?  Please describe the selection parameters for each table you reviewed, and the results for each table that you examined.
    It is also the practice of many companies to archive asset data.  If this is the case in your company, then the archived data will not reside in the 'A*" tables.
    You mentioned that you used the same parameters to select the data.  How did you select "Report Date" when you did the table extract?  I am not aware of a field that is named "report date' in any of the tables mentioned.
    Rather than slog through tables, you might want to try SE16, view "V_ANLAZ".  This is a preconstructed linkage of ANLA and ANLZ that is used by S_ALR_87012050 as a starting point.
    I really think you should consult with your ABAPers.  In two minutes they can give you your answers.  It will take me several messages and probably several days to get you the same answers.
    Best Regards,
    DB49

  • Changing the direction of path

    1.  Create patch or object
    2.  Add art brush
    3.  Changing the direction of path ON or OFF

    Absolutely... this is something I have tried to work out. There are some complicated work around, such as break the path. That works but if the object needs to retain a fill, weird things can happen. I usually copy and paste in front, break the path, then reverse path direction.

  • [svn:bz-trunk] 20609: Change the default max object nest level from 1024 to 512.

    Revision: 20609
    Revision: 20609
    Author:   [email protected]
    Date:     2011-03-04 10:23:41 -0800 (Fri, 04 Mar 2011)
    Log Message:
    Change the default max object nest level from 1024 to 512. A max object nest level of 512 should be more than enough for most applications which probably will not be sending deeply nested object graphs over the wire. For applications that are sending deeply nested object graphs over the wire and that bump up against this limit, the limit can be increased but you should also do testing to make sure that serializing/deserializing these deeply nested object graphs doesn't cause stack overflow errors. 
    Update documentation for the max object nest level setting to reflect the new default.
    Add documentation for the new max collection nest level setting.
    Modified Paths:
        blazeds/trunk/modules/core/src/flex/messaging/endpoints/AbstractEndpoint.java
        blazeds/trunk/resources/config/services-config.xml

    You should be able to get some more precise information from your Xorg logs, but I would bet it is related to the evdev driver. Some of the options in your xorg.conf no longer work with the latest version. For now you should be able to either map your mouse directly to the appropriate /dev/event* entry or change to the standard mouse driver, both of those methods should be in the wiki.
    You are supposed to be able to use the evdev driver without the input section of your xorg.conf by using dbus/hal autodetection, but AFAIK at the moment the xorg-server package still isn't compiled with hal support, so you would have to patch and rebuild the package.

  • Evaluation path - accessing of the direct employees by the manager.

    Hello Experts,
    I need to configure the evaluation path , using which the managers can access all the direct employees.
    Can u all please help me with this.
    It would be really helpful if u could suggest some documents to refer.
    Your answers will definitely be awarded.
    Thanks and Regards,
    Pooja Dev

    Hi...
    you can creat the evalution path in IMG -> PM -> PA  -> OM -> Basing setting -> evalution paths..
    1. select the evaluation path and make the relationship between the objects..
    2. test this in easy access under geneeral structures..
    but if u want to assing that evaluation path to spcefic user, then  u need to user structureal authorisation..
    which is different from general authorisation management..
    Best Regards
    Samson

  • Tilting a plane (in 3D) in the direction it's moving

    I have a plane following the mouse cursor, and I want it to
    tilt in the direction the mouse is moving. I'm getting these
    numbers with my previousMouse variables. I'm getting the angle the
    plane/cursor moves in based on this previous value and the current
    value. I then try to apply the sin and cos to the rotationX and
    rotationY. These are same math functions I would use if I were to
    have an object move in the direction of the cursor.
    I've attached code, player is the plane I'm moving/tilting.
    Moving up and down kinda works (rotationX), but moving left and
    right (rotationY) doesn't seem to do much. With this code, the rest
    position (when not moving) is also rotated. I can fix this by
    changing the rotationY line to player.rotationY =
    Math.cos(previousMouseAngle) * 40 - 40;, but then going right
    doesn't move it at all, and moving right moves it twice. It seems
    to be a problem with the cosine of the angle returned by atan2 to
    be 0 both when moving right and when not moving. What's the
    problem? Am I using the completely wrong functions for what I
    want?

    That's not the same problem I'm having, but I'll use it to
    give more details (I'm looking at the code in his first post). He's
    using the keyboard to rotate a square, while I'm using the mouse.
    Not only that but I want to rotate the square in relation to the
    position of the mouse. Here's some scenarios:
    cursor to the left of square, rotationY+
    cursor to the right of square, rotationY-
    cursor to the top of square, rotationX-
    cursor to the top left of square, rotationY+ and rotationX-
    cursor to the top right of square, rotationY- and rotationX-
    I haven't listed all directions but you should get the point
    by now. It's also not as simple as 8 directions, since I want 360
    degree freedom. This is why I was trying to use atan2. if the
    cursor is at an angle of 30 degrees. I want it to rotateY+ and
    rotateX-, but there would be more rotationY than rotationX. Imagine
    a UFO that's tilting in the direction it moves.

  • Can someone point me in the direction of iPhone Programming Courses

    Ive never programmed anything except basic HTML but I would really like to learn how to program for the iPhone can someone point me in the direction for any Online Courses for learning Objective C?

    I dont thank you mean learning c++ or C#, I think you would just like to know how to create basic apps. Well I would like to do the same thing. Check out this link ( http://ifones.com/apple-iphone-sdk-tutorial-top-picks/ ) it should point you in the right direction like it did for me.
    Enjoy!

  • Gradients gets cropped with the Direct selection tool

    I discovered another strange thing with gradients in InDesign.
    I could see this problem in both CS6 and CC.
    1. Make a gradient fill and apply it to a square object
    2. Use the Direct selection tool and select two corners
    3. Move the corners and you will see the gradient fill being cropped away
    4. Change to the Selection tool and make the object wider. It does not reveal any more colors. They are cropped away for good now.
    According to the color palettes this is still a gradient fill but it looks like one color now more or less. I couldn't find any way to release the cropping. I suppose it would have to be reveresed with the Direct selection tool.
    The gradients in Illustrator stay inside the object when using the Direct selection so both selection tools works the same way. I also tried with vector objects in Photoshop and the gradient fill effect. Both selection tools in Photoshop works the same way as Illustrator. Gradient stays inside the object.
    So is it a bug or feature?

    Adobe has provided a very large tool box. Why not just do this in
    Illustrator and place or copy/paste the frame. You obviously don't like
    InDesign's way of doing things and you have at your disposal a tool that
    does work the way you like.
    I like InDesigns way of doing things very much. It's easily my all time favorite software after 25 years in this business.
    And I can understand different behavior between the Adobe apps. This app can only do a little bit of what the other app can do.
    But it don't like when three apps have the exact same tools, and one app is programmed to do something else with these tools, when it just as easily could have been programmed to do the same thing.

  • Determination the Direction and Borders problem

    hi all
    I Have Problem in How to determination the Direction And the neighbor For polygon As in the picture.
    picture in (http://www.4shared.com/photo/CQhYa1LV/1_online.html?)
    I Want determination :
    From north : polygon with object Id=.....
    From south : streets with object Id=.....
    From east :streets with object Id=.....
    From west : polygon with object Id=.....
    I have Started and I Identified the Directions I get line of land with line 29 meters is the North
    and line with 25.4 is south ......
    Now how I can Determination the border of land ?
    manes :
    north ... land with number 2
    south ... street with 15 meters width
    Can eny one Help Or have Good idea ?

    Some real data (ie the sdo_geometry of the polygon in the image) would be useful.
    The main issue here is not so much the writing of the bearings and distances against the line segments,
    but determining which segments should be so labelled.
    I have dealt with the basics of extracting and marking polygon segments in in articles like this http://www.spatialdbadvisor.com/oracle_spatial_tips_tricks/74/spatial-pipelining before.
    But this is roughly how I would go about removing those shared boundary segments so that I only had those segments that front a street:
    select T_Vector(va.vector_id, va.element_id, va.subelement_id, va.startCoord, va.endCoord).AsSdoGeometry(null) as geom,
           codesys.Cogo.DD2DMS(
                 codesys.Cogo.Bearing (va.startCoord.x,va.startCoord.y,va.endCoord.x,va.endCoord.y) * (180/codesys.Constants.PI) ) AS bearing,
           ROUND(codesys.Cogo.Distance(va.startCoord.x,va.startCoord.y,va.endCoord.x,va.endCoord.y),2) AS distance
      from source_table a,
           table(ST_Vectorize(a.geom)) va,
           source_table b
    where a.<primary key> = <value>
       and sdo_covers(c.geom,
                      T_Vector(va.vector_id, va.element_id, va.subelement_id, va.startCoord, va.endCoord).AsSdoGeometry(null)) = 'TRUE'
       and c.<primary key> <> a.<primary key>;The COGO and GEOM package and the T_Vector object are available for download from my website.
    In short you:
    1. Take the base polygon;
    2. Break it into 2 vertex segments;
    3. Use each segment to find a polygon in the original table it lies on;
    4. Ensure that the found polygon is not the same as the source of the segments;
    5. Generate the bearing and distance.
    regards
    Simon

  • Defining the order of objects when using Distribute?

    VERSION: Illustrator CC Mac
    So, I've always assumed that the order of the layers determined the order and position that shapes are moved in the Distribute function.
    I'm having a wierd problem today and the order seems to be defined by something I can't figure out. I'm trying to vertically distribute a set of the same shape and instead of counting the shapes in order from left to right or vise versa the distribute function seems to be randomly picking the order of the shape, not basing it on location or layer order.
    Here are a couple of examples:
    In both examples I have used a Vertical Distribute Center and both groups of shapes are ordered from left to right in the layers palette with the left most layer being the first layer and the right most shape being the last.
    What is causing the shapes to be distributed in this order? How do I specify what the order is if it isn't based on layer or position order?

    So, I've always assumed that the order of the layers determined the order and position that shapes are moved....
    Wrong assumption. Only true sometimes.
    ...instead of counting the shapes in order from left to right...
    Wrong assumption again.
    So first, let's deal with the above assumptions:
    When distributing objects, you are not usually talking about stacking order at all. You are talking about modifying initial reading order based on the initial relative X or Y positions.
    Although you want stacking order to be a factor in some cases, you wouldn't want it in every case. Nor would you want it to be the default criteria. To understand this, consider the matter of reading order in text objects:
    You open a PDF. As is often the case, it has a plethora of individual text objects. Those objects have a particular reading order which is really nothing but a perception of the viewer based on their relative positions. There is no guarantee whatsoever that the object stacking order corresponds to the reading order (creation order). For all the viewer knows, the body text may in fact have been created before the decorative headlines. The subheads, bullets, and callouts may also have been created in any unknown order.
    In fact, I have just such a real-world frequently-reccuring situation: DXFs exported from engineering drawings frequently contain columns/rows of text in which the reading order does not correspond to the object stacking order. If the DXF is opened in Illustrator and then those text objects are threaded, or if their text is copied and pasted to concatenate them into a single text object, their reading order becomes scrambled, because threading and concatenating text is indeed dependent upon object stacking order (as are Blends, Mesh patches, and Pattern Brush tiles). By the same token, if those "lines" of text are distributed for uniform spacing and if the result were determined by the object stacking order, the text reading order would be similarly ruined.
    So for this and similar situations I wrote a set of Javascripts which I use to rearrnage the stacking order of objects according to their relative positions on the page (i.e.; their reading order) first, before concatenating the text. But you wouldn't want to have to do this in every situation in which you want to distribute every and all kind(s) of objects.
    The concept of "reading order" is not limited to text. Consider a fan of playing cards in a poker player's hand. Or chess pieces on a board. Or a row of houses on a map. Fence slats. Deck boards. Bricks or stones. Holiday icons on a calendar grid. You might want to make the XY spacing of such objects uniform, but that doesn't mean you want the stacking order changed, and inversely it doesn't mean you want the XY positions to be determined by stacking order.
    So unless and until there is an "Ordered By:" control with which the user specifies "Stacking Order" or "Reading Order" (which there isn't), the feature just uses initial position values (reading order) as the first sorting criteria, and this is the most "normal" behavior.
    ...drawing a set of overlapping squares in decreasing size order, smallest on top. Drag the top square out of alignment.
    I start with a group of shapes, all repeatedly copied from the first one on the far left...Then I move up the last one up...
    On the left is before with two circles on top of each other...
    In all the above instances, note that the situation starts with multiple objects already aligned in the direction of desired distribution, and moving only one of them before performing the distribution. So think of the math:
    You have a set of horizontal position values: [0,0,0,3]. You want to "equally space" those values. How do you do that if, as explained above, stacking order is not a determinant? How do you "order" three zeros based on their numeric values? The instructions are ambiguous. In such situations, you have to use some other secondary criteria, even if it is arbitrary; even if it is random. Example:
    Understand, I'm just replying to your initial post here. I'm not saying there is no bug in the Distribute interface. There may be, and if so, the bug(s) may be version-specific. I'm not addressing what Steve is trying to explain in Post 18: But note that when you do what he describes, the Distrubute Spacing value field automatically changes to zero, even if it is initially set to Auto and you are only clicking the Horizontal Distribute Space button.  (At least in CS3; I don't have later versions in front of me right now because I'm not in the studio and I don't have CC at all because I'm not going to rent Adobe's software),
    JET

  • Dictionary Keys must be direct name objects

    I need help!! I'm trying to insert a adobe file into an existing adobe file and its giving me a error message.  the message is DICTIONARY KEYS MUST BE DIRECT NAME OBJECTS.  What does this mean and what should I do??? Help!!!

    Hi Pat Willener,
    The issue is not specific with Operating System or browser. I tried with Windows XP, Vista, Windows 7 and Windows 8 and also tested with browsers of IE 8-11, Firefox 25-26, Chrome 33.
    Source of PDF: PDF geneated using PD4ML using java code with HTML Content. The issue occurs for specific PDFs only.
    Herwith I have attached the screenshot.

Maybe you are looking for

  • HP 7350 Photosmart compatibility

    My new HP DV6-6BSA with Windows 7 64 bit is not compatible with HP7350 Photosmart printer. I have tried original disc and looked for drivers. HP5550 is recommended for limited functuality. Each time message comes up "printer not responding" although

  • Schaltfläche Adobe Acrobat Pro seit ein und ausblenden

    Hallo mit einandere Kann man in eine PDF Datei die besteht auf zwei Seiten eine Schaltfläche bzw. eine Optionsfeld hinzufügen mit dem Befehl Seite XY oder Ein oder Ausblenden. Also ich möchte eine PDF haben mit Zwei Seiten aber die Zweite seit wird g

  • Uploading into database table from text file using tab (GUI_UPLOAD)

    i have small doubt i have 3 fiels in text file using tab as separator i need to update into database table 'ZABPSP_01' from 's.txt' located in local disk. My code is below. Please let me know the correction. Awaiting for ur response. Thanks in advanc

  • Add new field in address window

    hi expects,   i want to new field to address window .what are change should i do in form ,print program and subroutine.                         thank you

  • Phone not ringing when in sleep mode

    Over last few days have had problem with iPhone 4S not ringing when in sleep mode. I have just spoken to Apple support. I had do not disturb scheduled , but this was staying on all the time , which I hadn't realised. This is a fault which should be s