Arrow Shape, and other Shapes

I am searching for Shapes, Shapes that I can use in my graphiing tool. My Program has Nodes connected to each other with simple lines.
Currently I use circles, ovals, eclipses, and general Shapes from the java.awt.geom. package. I am searching for more shapes that can really help my presentation.
does someone know where to find an Arrow Shape class that I can use in my drawing?
java.awt.Shape is an interface, I beleive you can extend it and create many possible shapes with it. I need these classes!
thank you very much.

Here's a method you can use to make symmetrical polygons.
You can use random values in the expression for R which determines the size and for
the center point coordinates (cx, cy).
    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 };
    }One way to use this method:
    protected void paintComponent(Graphics g) {
        super.paintComponent(g);
        Graphics2D g2 = (Graphics2D)g;
        g2.setRenderingHint(RenderingHints.KEY_ANTIALIASING,
                            RenderingHints.VALUE_ANTIALIAS_ON);
        int w = getWidth();
        int h = getHeight();
        int R = Math.min(w,h)/8;
        int[][] xy = generateShapeArrays(w/4, h/4, R, 6);
        Polygon p = new Polygon(xy[0], xy[1], 6);
        g2.draw(p);
    }

Similar Messages

  • Custom drop zone shapes and button shapes

    Are there any packages out there of designer created drop zone shapes and botton shapes? I am learning how to create my own, but I'm fairly new to design programs such as Photoshop. Are there designers who have created ones, and are they available to download?

    why pay someone for this when its so easy to create your own custom assests?
    http://www.kenstone.net/fcphomepage/shapes_droptemplates.html
    http://www.kenstone.net/fcphomepage/advanced_dropzones.html

  • Moving objects and other shapes or groups of shapes in Illustrator to exact placement!

    HI,
    I am trying to move objects with the mouse to an exact place(grouped objects) within my document, how do i go about doing this?
    I have snap to point turned off, but everytime i try to click and drag to either overlap and object onto another, so it sits in line and that way i can delete remaining shapes around this, it wont let me, i move it, and then it quickly moves like half a cen centimeter to the left???
    I have zoomed in and tried doing it at this view but still the same.
    It is very frustrating, does anyone know why this is happening, or could help us.
    Also snap to point is not turned off and it's not the first time this has happened!
    Thankyou so much in advance!

    GaNa,
    I jump of half a centimeter is vast.
    What happens if you move an object with the arrow keys, just one hit?
    It could be a matter of corrupt preferences.
    You may try the following and see whether it helps:
    1) Close down Illy and open again;
    2) Restart the computer;
    3) Close down Illy and press Ctrl+Alt+Shift/Cmd+Option+Shift during startup;
    4) Move the folder with Illy closed;
    5) Look through and try out the relevant among the Other options, especially the usual suspects in item 7.

  • Strange border on shape and other layers

    I am working on a file. I have a background layer. I draw a shape layer, in this case a box, and when I do this layer has what almost looks like a drop shadow on two sides, ie the two edges have darker pixels than the shape color. I see the same sort of behavior on an image layer, in this case a photo, where the pixels on two edges, not the same edges, have different looking pixels. There are no effects on these layers

    Try the following. Observe very closely and see if you can tell what's happening.
    Create a new document at 400px × 400px; RGB, 8 bit, White background, square pixel aspect ratio. Resolution setting doesn't matter.
    Tap your "D" key to return Photoshop's default FG & BG colors to black & white. Tap your "F" key to toggle screen mode to "Full Screen Mode with Menu Bar."
    Make the documents rulers visible if they are not (CTRL + R). Right click on either of the rulers to drop the menu and make sure the unit of measurement is set to display values in pixels.
    Zoom in to 1600% anywhere in the middle of your document. You'll be able to see tick marks on the rulers that designate each and every row and column of pixels.
    THAT'S
    the invisible, intrinsic "grid" I'm talking about, present in every Photoshop document. Want to see Photoshop's user configurable grid? Tap the
    CTRL + ' shortcut a couple times. Leave your grid visible. (I left mine invisible for better clarity in the screenshots)
    Select your rectangle Custom Shape Tool. In the Options Bar drop the Geometry Options menu on the right side of the row of shape icons.
    UNcheck the box next to "Snap to Pixels." Then in the Option Bar's Styles drop-down menu, make sure that "No Style" is selected, as shown at the left.
    In your document window click and drag out a small rectangle shape, without regard to where you begin and end. Notice the antialiasing that is introduced by Photoshop if your shape's diagonally opposite corners aren't started and ended in precise alignment with the ruler tick marks. Drag out guidelines as I have in this second image and you'll see what I mean.
    Select your Move Tool (V). With the Shape Layer highlighted and active in the Layers Palette, tap your keyboard's arrow keys. You will see that the shape will ONLY move in 1 pixel increments. Pay attention to the antialiasing along the straight edges of the rectangle shape. Notice how the rows of pixels on either side of the vector line don't change in color/brightness value?
    Select your Path Selection Tool (
    black
    arrow "A"). Click inside the rectangle shape to select it; you'll see all 4 corner anchor points display as tiny gray filled-in boxes. Tap your keyboard's arrow keys again. Now, notice how you can move the vector outline in increments of a fraction of a pixel. You can do this with vector-defined paths (which you have just selected). In the previous step, you were using your Move Tool; its overriding function is to move pixels. The vector path just follows along, in 1 pixel incremental movements. Also notice when you move the vector path in these fraction-of-a-pixel increments, the rows of pixels which Photoshop generates as antialiasing will change in color/brightness. This antialiasing is recalculated for each fractional movement so that the edge of the shape
    appears
    to be positioned mid-pixel. But, because we know that the pixel is an indivisible unit of measurement for a raster-based image, this is only done to create an illusion that a shape's edge sits at mid-pixel.
    I know this reply is long and wordy (I could have gone into a deeper explanation, but I'm hoping this will suffice), but there's really no way to explain it quickly. Hopefully, this exercise has given you a better understanding of what you were seeing before you started this thread, and why it happens.
    The takeaway lesson is this: If you want dead accurate and hard, clean horizontal and vertical edges, make sure that the vector paths which define the shape are aligned to Photoshop's intrinsic, invisible pixel grid.

  • Barces and other shapes

    Where are the Brace shapes in pages? in Word they are easy to find but I am unable to insert a brace to a pages document (I had to copy it from a word document :@)
    Or am I expected to draw it myself with the pen tool???

    From left to right the fonts are: SimSun, Mona Lisa Solid ITC and Helvetica Neue UltraLight all sized to 175. You can quickly preview many different fonts in the Character Palette to see which one is closest to the one you want (look under punctuation). Then place it in a floating text box with wrap turned off and you can place anywhere in the document.
    Seems easier then trying to "reinvent the wheel" with a drawing.

  • Smart shape and changing shape, Captivate 8

    When capturing a demo, I want the smart shape to be the oval callout, but that is not an option in preferences.Instead I'm getting a cloud callout. Is there a way to set up preferences for the oval callout?
    Is it possible to change a cloud callout to a round corner rectangle?

    For the automatic shapes during capture, there are only four options, for the rollover shapes you have only three (which can also be used for Assessment and Training simulations). And you are correct (logged the request for it already for CP7, as you can suspect) that there is no Default Capture Shape style as there is a Default Capture Caption style. But normally if you choose the rounded rectangle before capture, it will use that one instead of the cloud shape...I did choose the rounded rectangle right from the start using Preferences before opening any file. And I always get that shape, with the fill and stroke of the Shape style that is within the theme:
    Lilybiri

  • What are the differences between trace shapes and stamp shapes?

    Trace shapes can be drawn against like a stencil. Stamp shapes cannot be traced against. They can only be stamped onto the canvas. To stamp, double tap on the stamp shape. Shapes from Shape CC are stamp shapes.

    Legacy is an encrypted disk image of your Home folder, FileVault2 is whole disk encryption

  • I have drawn some maps in pages using shapes and arrows. When I delete a shape a little grey dot appears that cannot be deleted. Any ideas?

    I am using shapes and arrows to create concept maps in Pages. After saving the document I have opened it again and tried to make changes.
    When I delete an arrow or shape a grey "Do not" sign pops up. It cannot be highlighted or deleted. My map now looks like it has grey measles.
    Any idea what is happening?

    Hi Kiku,
    Select all the objects that you want in your map.
    Menu > Arrange > Group
    Copy, then Paste into a new blank page.
    Regards,
    Ian.

  • Jdeveloper visual editor do not show images and other component shapes

    I used jdeveloper(10.1.3.3.0) to create an ADF BC application, I create a jsf jsp file and drag and drop components from ADF Faces Core to this file visual editor, but jdeveloper visual editor do not show images and other component shapes.
    Could you tell me how I can fix this problem?
    Thanks,
    Mike

    Actually, I need to make a dummy change to the jsp file and then it will display boxes representing the objects in the visual editor whereas I get an exception in the log:
    javax.servlet.jsp.JspException: Cannot find FacesContext
    This does not talk much to me !
    Thanks

  • [CS6] How can I copy and paste a rectangle or other shapes?

    [Photoshop CS6]
    I want to copy and paste a simple rectangle.
    I drawed a rectangle with the Rectangle Tool.
    I marked it with the Move Tool.
    If I go to Edit->Copy and then to Copy->Paste
    I see still only one rectangle. Could be
    one is overlayed by the other but I don't
    know how to separate them afterwards.
    So I tried to move the first rectangle to another place
    before click on Edit->Paste.
    I then get a copy of the first rectangle. But the problem is that they
    react as they would be one shape and not as two differnt shapes.
    I can only move the two rectangles as they would be one shape
    and they are also marked as they would be one shape.
    And I can only mark them as they would be one rectangle.
    But I want two independent rectangles.
    How can I in Photoshop CS6 copy and paste rectangles or other shapes so
    that the copy is independent of the original shape?

    Hi there,
      You can have both copies in the same shape layer, but you will not be able to move them as separate objects anymore. To merge them into the same shape layer select both layers in the layers pallete by holding down CTRL and clicking on a PC or holding down Command and clicking on a Mac:
      Then click the Panel menu in the layers pallete:
      Then choose Merge Shapes from the pop up menu that appears:
      And that's it! Now both shapes will be in the same shape layer.
    I hope this helps! Let me know if you need further clarification or if you have any other questions. : )

  • Visio Cisco Equipment Shapes out of Proportion and others Missing

    Hello Everyone,
    Have any of you noticed that the shapes of line cards and port cards are out of proportion with the chassis Visio shape in which you place them.  The ones below leave gaps not representative of the actual physical equipment.  Also, it seems not all the shapes are included with the VSS files.
    WS-X45-Sup6-E Supervisor Engine 6-E
    WS-X4548-GB-RJ45
    WS-X4648-RJ45V+E
    WS-X4306-GB
    The attached image provides and excellent example of the issue with the current Cisco Visio Shapes.
    Thanks,
    C. Z.

    Hi CZ,
    You are correct that some of the line cards on that stencil do not fit properly into the chassis.  Those icons/shapes were produced by the previous vendor prior to 2009 when we took this over. The shapes produced by my group do fit correctly, for example the WS-X4748-RJ45-E. The product group did not authorize us to go back to retrofit the older shapes and that's why they do not fit as expected.
    Regarding missing shapes, we produce what the product group orders from us but I can often ask them to fund additional shapes when there is a forum request. Please understand that they will not accept requests for end of life products.
    Brett Newman
    Cisco Visio Development
    www.shapesource.com

  • Anchor points move and entire shape gets distorted from changing stroke thickness

    I have a fairly simple drawing that I drew at a larger size so I could be precise with it, and now I want to reduce it down to the finished size, and thicken the stroke, but when I make the stroke thicker, my anchor points move and the entire drawing gets distorted.
    In 24 years of using Adobe Illustrator, I've never seen this happen. When I click on the "up" arrow on the Stroke palette a bunch of times to incrementally increase the stroke thickness, I can watch the anchor points "walk" around as my shape gets distorted.
    If I instead enter a numerical value for the stroke thickness, this doesn't happen.
    However, if I use the Scale tool to shrink the drawing down to 10% or 20% size or whatever, with Scale Strokes and Effects UNCHECKED, again, the anchor points move and the drawing is distorted.
    This is all on a brand new installation of Illustrator CS 6 for Mac (though I've been using CS 6 for about 2 years now, my hardrive crashed this past weekend and I had to reinstall everything).
    Did I miss a little checkbox somewhere that I've never seen before that's making this happen?
    Editing this post to add:
    Also, some of the objects in my drawing will not allow me to change the stroke to less than 1 point thickness. If I choose .5 or .25 pt from the pop-up menu, or even if I enter the numerical value, it jumps back to 1 point. Other objects in the drawing do not.
    These objects in question are "rounded rectangle" shapes that I've used the scissor tool on to cut and then used the "join" command to put them together with parts of other shapes that were "scissored' as well.
    All of the "Ellipse" and "Rounded Rectangle" shapes that I left intact do not exhibit this problem with stroke and distortion.

    You are being bitten by the Align-to-Pixel-Grid. Select everything and go to the Transform panel and turn off Align-to-Pixel-Grid at the bottom of the panel; then go to the panel flyout (small triangle, upper right) and turn off Align Objects to Pixel Grid.

  • Drawing an arrow between two rectangle shapes

    i am trying to draw an arrow between two rectangle shapes. the arrow will start from the center of one rectangle and end with the arrow tip at the edge of the other rectangle. i actually draw the arrow first, and draw the rectangles last so the effect of where the arrow starts will seem to come from the edge and not the center.
    i have code using some trigonmetry that works for squares, but as soon as the shape becomes a rectangle (i.e. width and height are not the same), the drawing breaks.
    can i detect where a line intersects with a shape through clipping and use that point location to draw my arrow head? if so, how?

    Here's one way to do this using the rule of similar triangles.
    import java.awt.*;
    import java.awt.geom.*;
    import javax.swing.*;
    public class Pointers extends JPanel {
        Rectangle r1 = new Rectangle(40,60,100,150);
        Rectangle r2 = new Rectangle(200,250,175,100);
        int barb = 20;
        double phi = Math.toRadians(20);
        protected void paintComponent(Graphics g) {
            super.paintComponent(g);
            Graphics2D g2 = (Graphics2D)g;
            g2.setRenderingHint(RenderingHints.KEY_ANTIALIASING,
                                RenderingHints.VALUE_ANTIALIAS_ON);
            g2.setPaint(Color.blue);
            g2.draw(r1);
            g2.draw(r2);
            g2.setPaint(Color.red);
            g2.draw(getPath());
        private GeneralPath getPath() {
            double x1 = r1.getCenterX();
            double y1 = r1.getCenterY();
            double x2 = r2.getCenterX();
            double y2 = r2.getCenterY();
            double theta = Math.atan2(y2 - y1, x2 - x1);
            Point2D.Double p1 = getPoint(theta, r1);
            Point2D.Double p2 = getPoint(theta+Math.PI, r2);
            GeneralPath path = new GeneralPath(new Line2D.Float(p1, p2));
            // Add an arrow head at p2.
            double x = p2.x + barb*Math.cos(theta+Math.PI-phi);
            double y = p2.y + barb*Math.sin(theta+Math.PI-phi);
            path.moveTo((float)x, (float)y);
            path.lineTo((float)p2.x, (float)p2.y);
            x = p2.x + barb*Math.cos(theta+Math.PI+phi);
            y = p2.y + barb*Math.sin(theta+Math.PI+phi);
            path.lineTo((float)x, (float)y);
            return path;
        private Point2D.Double getPoint(double theta, Rectangle r) {
            double cx = r.getCenterX();
            double cy = r.getCenterY();
            double w = r.width/2;
            double h = r.height/2;
            double d = Point2D.distance(cx, cy, cx+w, cy+h);
            double x = cx + d*Math.cos(theta);
            double y = cy + d*Math.sin(theta);
            Point2D.Double p = new Point2D.Double();
            int outcode = r.outcode(x, y);
            switch(outcode) {
                case Rectangle.OUT_TOP:
                    p.x = cx - h*((x-cx)/(y-cy));
                    p.y = cy - h;
                    break;
                case Rectangle.OUT_LEFT:
                    p.x = cx - w;
                    p.y = cy - w*((y-cy)/(x-cx));
                    break;
                case Rectangle.OUT_BOTTOM:
                    p.x = cx + h*((x-cx)/(y-cy));
                    p.y = cy + h;
                    break;
                case Rectangle.OUT_RIGHT:
                    p.x = cx + w;
                    p.y = cy + w*((y-cy)/(x-cx));
                    break;
                default:
                    System.out.println("Non-cardinal outcode: " + outcode);
            return p;
        public static void main(String[] args) {
            JFrame f = new JFrame();
            f.setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE);
            f.getContentPane().add(new Pointers());
            f.setSize(400,400);
            f.setLocation(200,200);
            f.setVisible(true);
    }

  • Getting the text and the shape to play at the same time in Keynote '08

    Searched FAQ without any luck. I put text into a shape. When 'played' however, the text comes in on first click, and shape on the second click. I would like both to enter slide simultaneously. How can I accomplish this ??
    THanks Fred

    Hi Fred,
    There are two ways to achieve this. Firstly you can group the two objects and they will then appear at that same time once you select a build for the group.
    You can use the Build inspector to do the same. Once you've chosen the build for the two objects click on the More Options button at the bottom. Select one of the objects (most likley listed as 'Text' and 'Shape' and chose from the Start Build sub menu 'Automatically with build X' where build X is the number of the build of the first object.

  • Total newbie i have drawn some shapes and want to colour them

    Hi i have drawn some basic shapes and want to colour them i have watched a tutorial but must be doing something wrong.  I highlight the shap with my selection tool then click on the fill button, choose a colour then click ok and nothing happens, what am i doing wrong?

    Why not start here:
    http://help.adobe.com/en_US/illustrator/cs/using/WS714a382cdf7d304e7e07d0100196cbc5f-6519a .html

Maybe you are looking for

  • How to handle cash discount in MIRO ?

    Dear Experts , what is the significance of cash discount field in the invoice verification? When i put an amount in this field there is no effect in invoice . Please Guide Regards Anis

  • PHP and Forms

    I'm just getting started using PHP and I was wondering if anyone is using PHP to control access to Forms? I found a good article at http://www.oracle.com/technology/pub/notes/technote_as_signoff.html that discusses using PHP to create a custom SSO lo

  • Question about Cursor in Reports

    Hello I new in this forum I need some help, i've started using Reports and I need to show in a Jsp report the result of a stored Procedure this procedure returns a cursor , so my question is How I can to show this selection (result of the cursor) in

  • Itunes cannot authorise more than 5 computers

    Within iTunes, I cannot get my work PC's iTunes to log into iTunes Match.  It says I cannot authorise more than 5 devices.  I have deleted devices, so that all that remains is a couple of iPads and a Macbook.  It is still saying this message.  It is

  • Contract Price wrt validity period

    While creating a contract, it picks price from info record based on the current date(date of contract creation), not based on validity period. This is a standard functionality in sap. Ex. I have a info record with following condition Validity period