Help - drawing curved lines

Hey everyone
This is probably going to have an easy solution but I really cant figure it out!! The problem is drawing a loop in a state machine, ie a path to and from the same node therefore a loop!
Is there a way to actually do this?
Thanks in advance!

try using the GeneralPath class and using a series of curveTo or quadTo calls. Keep nodes colinear to preserve derivative continuity, and you should be able to make the curved shape you want.

Similar Messages

  • Help drawing curved line - please!!!

    Seriously, I can't find a tool to draw a curved line in PSE 6!  I was told to use the "pen tool" but I can't find it.  I was told to make the selection right clicming on Pencil and has no options other than for a freehand drawing with the mouse.  The "shapes" tool will only give me a straight line.  What the heck am I missing?
    Thanks!

    The pen tool is only in Photoshop, not elements. You can draw freehand with the brush or pencil tools (you can  put something on a separate layer below and trace the edge if you need help), or you can draw a selection with the elliptical marquee tool, go to Edit>Stroke (outline) selection to color it, then erase the parts you don't want.
    The custom shape tool draws many shapes. It sounds like you have the line tool selected. Hold down its icon in the toolbox and you'll see several other tools in there. The polygon tool with the rounded corners option turned on will draw circles, although it's not supposed to.

  • Drawing Curved Lines

    Hi,
    Does anyone know how to draw curved lines in Keynote '08. It seems one can do custom shapes but not lines.
    Kind regards,

    The difference between a line and a shape, in this sense, is whether or not it's filled. In most themes, when you're finished drawing the line, it gets filled with the default fill. Change that Fill to None, and it's just the line.
    Another thing, even though it says "Draw a Shape", if you press "Esc" at any time while drawing, your endpoints will be left where they are, no need to connect back to the start point to create a closed shape.

  • Drawing curved lines in Photoshop CS 4

    I'm sure there's a simple way, but I just can't seem to draw a basic curved line in PS CS4.
    I'm designing a simple floor plan- black lines on white background- nothing 3D or fancy. I have so far just used straight black lines, but for the doors I wanted
    to create a curve to show the sweep of the door as it opens.
    I'm new to photoshop, so at first I tried to do so in a shape layer, as I did with all the straight lines. annoyingly, this always resulted in a filled in solid shape- not what I want at all.
    I then found out about paths, so I created my curve as a path, which seemed to be working in that it didn't automatically turn into a solid shape, but remained simply a line.
    However, I found that the path was not actually showing up in my floor plan unless I had it selected and was working on it. I worked out I could link it to a layer by creating a vector mask.
    However, this still meant the curve didn't display within the document when I saved out. If I rasterized the vector mask, it just made everything go black.
    Please can someone explain if there's a simple way of drawing a curved line?

    Hi,
    Thanks for your response.
    I'm a little confused-
    "Paths are not pixels, so unless you
    • use a Path as Vector Masks on Layer/Group that has content
    • apply "stroke Path with …"
    • use the Path as a Clipping Path"
    Does this mean that if I make the path with my curved line on it into a vector mask, apply a stroke path and then use the path as a clipping path, it will show up in my document? I tried doing this and it didn't work- when I saved out a jpeg it was blank. 
    If it makes it any clearer, this is what I'm trying to get to be part of my pixel output:
    I did actually try your suggestion of playing around with Layer Style, and this sort of seems to work in a weird way, but it seems incredibly strange that Photoshop doesn't provide a simpler way of doing something as basic as drawing a line!
    thanks for your help, really appreciated.

  • Custom Control Help: Draw a line and output start and end points

    I'm looking to find or make a custom control (or simple subVI) that will appear as a 100x100 unit grid and allow me to draw a line from one point to another on that grid. It will then output the (x,y) of the starting and end point of that line on the grid.  Any help or ideas?
    Thanks,
    Steve
    LabVIEW 2009 SP1
    Solved!
    Go to Solution.

    What you basically want is a loop with an event structure where you process Mouse Down, Move and Up events for your controls. There are any number of ways of implementing something like this, but this one will probably be the simplest:
    Use a multicolumn listbox or a table for your grid. Hide the scrollbars and headers.
    You can use the ActiveCell property with -2,-2 to select all cells. You can then use the cell size property to set the exact size of the cell.
    Next, you put a picture control on top of the table and color its background transparent so that the table shows through. You use property node to make sure the two are aligned to exactly the same spot and size.
    You use the mouse events on the picture control to detect the clicks and moves.
    You use the table's Point to Row Column method to translate the event's position data to a cell.
    You use the picture control VIs to draw the line on the picture based on that data.
    You can even color the selected cells in the table using the table properties.
    If you want to simplify things somewhat, you can also use the timeout event instead of the Mouse Move event to draw the line, but then you'll need to keep the timeout value in a shift register and reset it to -1 (no timeout) when the Mouse Up event happens.
    I would also suggest processing Mouse Enter and Leave events to change the cursor and cancel if the user leaves in the middle of dragging.
    Try to take over the world!

  • How do I draw a curved line in iCloud Keynote beta?

    I am fairly new to Keynote in general, however I would like to leverage it's capabilities to enhance my projects at work (where I have a Windows7 PC w/o admin rights to install software).  I know you can draw curved lines with the Keynote on a Mac, but I can't seem to figure it out with iCloud Keynote beta.  Any advice would be greatly appreciated.  Thanks,

    Try this:
    File>New>blank file
    Duplicate the background layer, and work on the background copy layer
    Get the Elliptical marquee tool out of the toolbxox. Drag out an ellipse
    Go to Edit menu>Stroke (outline) selection, try width=4x, position:inside
    Use the eraser tool to erase part of the ellipse
    Use the transform tool (CTRL+T) to rotate and skew the remaining curve to suit
    It's a bit tedious, but it can be done.

  • Please help re auto-curve line altering feature

    to all Illustrator artists and experts: Can you please tell me the name of the Illustrator auto-curve line altering feature and how to adjust it or turn it off?  When I draw a line, and want that line not to be a perfect curve, when I complete the line Illustrator automatically alters it to make it a perfect curve.  This is changing my original line from what I intended to a homogenized curve I didn't intend.  Thank you for any help you can provide!

    can't Illustrator simply save each part of my various movements as I draw the line - without "snapping" them all away
    DoubleClick the Pencil or Brush tool (the tool icons in the program, not your hardware stylus) and turn off the Edit Selected Paths option. (This is a one-time setting. You don't have to revisit it each time you draw a path.)
    You must use the Pencil tool or the Brush to achieve the results you desire. The Pen tool is specifically made to produce Bezier curves.
    For clarity: All of the path drawing tools in Illustrator (including the Pencil and Brush) draw Bezier curves. They just employ different user interfaces for doing it.
    The Pen Tool (the software tool in the program, not your stylus) employs an interface intended to allow you to explicitly place each anchorPoint and curve handle exactly where you want it. That's its purpose. So there is no "smoothness" setting for the Pen tool. The Pencil and Brush tools try to programmatically and automatically construct Bezier curves by interpreting the bitmap "path" you scribe by stroking with the pointing device. Therefore, they have Smootness settings to alter the interpreting algorithm.
    That's pretty much standard practice across drawing programs like Illustrator.
    There are a few commands (Roughen, Zig Zag, etc.) in the Filters (CS3) and/or Effects (CS4) menus to alter the jaggedness of selected path(s) after you've drawn them.
    Generally, though, I agree with the comments of others: You need to sit down with the documentation and work through learning the program. Franky, I would add that you'd be better off doing that without using a stylus, just to minimize confusion. If you work with a mouse, you'll know what the program is capable of and how results are supposed to be achieved. Then, when you use the stylus, you'll be better able to discern whether a problem is due to a limitation of the program, or if it is something about your stylus settings, or just the small handful of stylus-supportive features in the program.
    JET

  • Drawing a curved line using the pen tool, dragging the text cursor over the line but will only give me a small area to write in, in-between a circle and a circle with a cross in?

    Drawing a curved line using the pen tool, dragging the text cursor over the line but will only give me a small area to write in, in-between a circle and a circle with a cross in?

    If you change your tool to the "Direct Selection Tool" (A) then you should be able to adjust the area for you to type in...

  • Drawing a curved line

    Okay, so I feel like this is a really stupid question, but how in the world can you make a line curved? I've inserted a line as a shape and want to make it curved (similar to the curve in the Apple Demo with the moving airplane -- I'm trying to do something like that). I know how to make the objects move, but I want the path to show. An earlier post said to draw the path first and then create the path to match that. That's fine and doable, but I can't for the life of me figure out how to draw a curved line!

    You use the Pen tool, found at the bottom of the Shapes dropdown menu, to draw a curve. Select the pen, then click on the slide to put down the starting point of your curve. Next, click and hold where you want your curve to end, and drag away from the endpoint that is created. You should see two grey "handles" sprout from that endpoint, with your cursor at the end of one of them. The point you have created is a Bezier control point, and the handles control the angle and depth of the curve. Hit Escape to finish. (Your curve will likely be filled -- you can adjust this in the Graphic Inspector.)
    One Bezier point will produce a curve that only curves one direction. To create a more complex curve with multiple inflections, you will need to add more points. Select your curve, and in the Format menu, under the Shape flyout menu, choose "Make Editable". You should now see your two endpoints in red. If you hold down the Option key and click on the path, you will add another control point. Double-clicking on the point will toggle it from a corner point to a Bezier control point.
    Bezier curves can seem complicated at first, but this is an extremely powerful way of creating arbitrary shapes, including complex curves.
    (Note that the paths in the Motion Action are also Bezier curves.)

  • Here are my last 3 duke dollars.  Can someone please help me draw a line?

    I have been BEATING my head on this for well over a week now. I'm new to Java2D and I cannot find even one example of this simple little thing that I am trying to do. Not one.
    All I want to do is draw an image, zoom that image, then draw some lines on that image, and then zoom it and have those lines show up where they should.
    For example, we have an image which has been zoomed. No lines are yet drawn on it.
    A line is added.
    The image is then zoomed in or out one more time.
    How do we get the line to remap to the newly zoomed image?
    What I am doing is:
    0) Load up an image from a file.
    1) Create a zoomed image by using the Image.getScaledInstance() method.
    2) Create a BufferedImage with the width and height of the image AFTER the zoom has taken place.
    3) Create a Graphics2D object by the createGraphics from this BufferedImage.
    4) Place the image into the BufferedImage by doing a BufferedImage.drawImage
    5) Select two points to be the start and end of the line.
    6) Draw the line using Graphics2D.drawLine(start.x, start.y, end.x, end.y).
    7) Zoom the image again (using the Image.getScaledInstance() method.
    8) Create a new ImageIcon using the image from above and override its paintIcon method like this:
    ImageIcon newIcon = new ImageIcon(newImage) {                       
    public void paintIcon(Component c, Graphics g, int x, int y)
    super.paintIcon(c, g, x, y);
    zoom(); //<---- ZOOM call
    Now in the zoom routine, what do I need to do to get the lines to draw at the proper location and size?
    Remember, the points of the lines (stored in a list as home grown line objects) are in screen coordinates, not image coordinates since they are just click points
    Note that when I use these points to draw a line, all is well (the line gets drawn where it should), but I have problems when I zoom the image.
    Thanks!

    Below is the documentation and method signature of
    Graphics.drawImage(Image img, int dx1, int dy1, int dx2, int dy2, int sx1, int sy1, int sx2, int sy2, ImageObserver observer);The important thing to note is that it does scaling on the fly if the size dictated by the source co-ordinates is defferent than the size dictated by the destination co-ordinates. The source image is always left un-touched.
    So basically your visual data is located in an offscreen image. You can draw a line on that. Then create a new image, get it's graphics and call drawImage(original_image, co-ordinates that cause it to scale how you like).
    Then you can draw lines on the 2nd image, create a 3rd, ...etc
         * Draws as much of the specified area of the specified image as is
         * currently available, scaling it on the fly to fit inside the
         * specified area of the destination drawable surface. Transparent pixels
         * do not affect whatever pixels are already there.
         * <p>
         * This method returns immediately in all cases, even if the
         * image area to be drawn has not yet been scaled, dithered, and converted
         * for the current output device.
         * If the current output representation is not yet complete then
         * <code>drawImage</code> returns <code>false</code>. As more of
         * the image becomes available, the process that draws the image notifies
         * the specified image observer.
         * <p>
         * This method always uses the unscaled version of the image
         * to render the scaled rectangle and performs the required
         * scaling on the fly. It does not use a cached, scaled version
         * of the image for this operation. Scaling of the image from source
         * to destination is performed such that the first coordinate
         * of the source rectangle is mapped to the first coordinate of
         * the destination rectangle, and the second source coordinate is
         * mapped to the second destination coordinate. The subimage is
         * scaled and flipped as needed to preserve those mappings.
         * @param       img the specified image to be drawn
         * @param       dx1 the <i>x</i> coordinate of the first corner of the
         *                    destination rectangle.
         * @param       dy1 the <i>y</i> coordinate of the first corner of the
         *                    destination rectangle.
         * @param       dx2 the <i>x</i> coordinate of the second corner of the
         *                    destination rectangle.
         * @param       dy2 the <i>y</i> coordinate of the second corner of the
         *                    destination rectangle.
         * @param       sx1 the <i>x</i> coordinate of the first corner of the
         *                    source rectangle.
         * @param       sy1 the <i>y</i> coordinate of the first corner of the
         *                    source rectangle.
         * @param       sx2 the <i>x</i> coordinate of the second corner of the
         *                    source rectangle.
         * @param       sy2 the <i>y</i> coordinate of the second corner of the
         *                    source rectangle.
         * @param       observer object to be notified as more of the image is
         *                    scaled and converted.
         * @return   <code>true</code> if the current output representation
         *           is complete; <code>false</code> otherwise.
         * @see         java.awt.Image
         * @see         java.awt.image.ImageObserver
         * @see         java.awt.image.ImageObserver#imageUpdate(java.awt.Image, int, int, int, int, int)
         * @since       JDK1.1
        public abstract boolean drawImage(Image img,
                              int dx1, int dy1, int dx2, int dy2,
                              int sx1, int sy1, int sx2, int sy2,
                              ImageObserver observer);

  • Help!draw a line on JPanel

    draw a line on JPanel like VB's drawline command.

    Take a look at this thread:
    http://forum.java.sun.com/thread.jsp?forum=31&thread=307239

  • How to draw a line of sin x and its area under the line?

    Hi,
    I know how to draw a line from two points. However, I do not know how to draw a line of function sin(x) and its area under the line. Anyone know where to read or how can I draw it, please help me. Thanks !!
    Calvin

    use Graphics2D:: draw(Shape)
    create a class that implements Shape, and specifically the getPathIterator methods, in these methods you should return a path iterator that follows the sin/cos curve.
    All fairly simple to do.
    rob,

  • How to draw multiple lines on same panel??

    hiya
    i would like to know how can I draw multiple lines on the same panel ?? I have already use repaint(); but it just come out the lastest line (say line 3) i draw .......those previous lines(say line 1 and 2) are disappear ........
    Thanks for your help mate

    http://www.java2s.com/ExampleCode/2D-Graphics/Line.htm

  • How to draw horizontal line in smartform after end of the all line items

    Hi Friends,
    I am working on the smartform. I have created TABLE node in Main window.
    i want to draw a horizontal line after end of the main window table node. i mean after printing all the line items of the table, I need to print one horizontal line.
    Could you please help me how to resolve this issue.
    FYI: I tried with the below two options. But no use.
    1. desinged footer area in the table node of the main window.
    2. tried with uline and system symbols.
    please correct me if i am wrong. please explain in detail how to draw horizontal line after end of the main window table.
    this is very urgent.
    Thanks in advance
    Regards
    Raghu

    Hello Valter Oliveira,
    Thanks for your answer. But I need some more detail about blank line text. i.e thrid point.
    Could you please tell me how to insert blank line text.
    1 - in your table, create a line type with only one column, with the same width of the table
    2 - in table painter, create a line under the line type
    3 - insert a blank line text in the footer section with the line type you have created.

  • How is the best way to make a curved line in keynote?

    I have the new version of keynote but using the "curved line" in 'shapes' is not easy to make a symmetrical curved line. Can you suggest other simple ways to accomplish this?

    Take the Draw a Shape tool and click in two spots. Press escape to stop drawing. Click one of the points, it will snap to horizontal. Now, take that line and move it towards the middle of the slide. It will snap to the center. Now, select the line so that it's in draw mode (points on either end are red), hold down option, and click the middle of the line to add a point. Double-click the point to make it a curved point. Hold down option and drag the curve handles (to make then equal length on both sides) then press Shift to make it snap to horizontal again.
    Now, all you need to do is click the curve points while holding down shift and option to lengthen and shorten the curve points. Clicking directly on the point and moving it up and down (it should still snap to the guide line) and controlling the curve should give you a lot of flexibility. Will this do it for you?

Maybe you are looking for

  • MY BILL INCREASED $60 IN A SINGLE MONTH ...

    **FYI*** I AM POSTING THIS TO THE PUBLIC BOARD PER A VERIZON FORUM TEAM REP'S REQUEST *** THEY SAID I CAN'T SEND A PRIVATE MESSAGE, THAT A MODERATOR NEEDS TO ASSIGN IT TO A FORUM TEAM AGENT *** THANK YOU!! *** My bill for standard/on-going monthly se

  • Import from Word- all links linking too low down so that bread crumbs don't display

    When I import from Word, all the links being created are linking to the topic title, instead of just to the topic: e.g. href="CreateLineOfSight.htm #CreateLineOfSight">CreateLineOfSight</a></p></td> As a result, whenever the topic is longish, opening

  • Volume Differences - Between MAC, Macbook & iPod Classic

    Here is my problem. When using the same speakers for my above hardware I find a serious loss in volume between the MAC and the other two (Macbook, Ipod). All of the settings including volume controls and equalizer are set the same. Is this to be expe

  • Time machine missing the 'Latest' Symlink

    Hey Gang, I have a friend that had a failed Hard drive and when she tried to recover from time machine, it did not recognize as a TM backup at all. After looking into it, the 'Latest' shortcut is missing in the backup on the time capsule. I looked on

  • Why can't i copy photos from Iphone 4s directly to pc

    I am trying to move photo's off my iphone 4s to free up space...  When I plug in the cable to pc, it does not recognize the phone as a camera.  I am afraid to do a sync and have photos erased. Help please