Draw a continuous dashed line

I suspect the answer is simpler than I expect, but it has been eluding me none the less, so I've been wondering how to draw a continuous dashed line, as per the title. I'm cleaning up a photo I made a while back and would to create a flowing line and set it to be dashed as you can do in Adobe Illustrator, where you could draw a line and edit the line type to be dashed, or dotted, or a bunch of snowflakes or what have you.
I can hear you asking, "why not just use Illustrator?". Well, I do not have it. I used Illustrator and Photoshop CS6 in an art class senior year of high school, but it has been a little while so I'm trying to re-learn the ropes a little bit.

I was able to use Filter - Other - Minimum with a particular set of parameters, followed by a Median filter to smooth the results, to get something not unlike what you showed, but given that I derived the parameters empirically from your very limited image, at exactly the size given, I wouldn't be surprised if the characteristics of this sequence of operations are way off from what you want.
In any case, if you'd like to see this "proof of concept" action to understand what I did, here it is:
http://Noel.ProDigitalSoftware.com/ForumPosts/BlackFindingAction.zip
Keep in mind this will be VERY sensitive to the thresholds and sizes chosen for the various steps, and is crafted to work at an image with just the resolution you showed above.
-Noel

Similar Messages

  • How to change draw dashed line with arrowhead (not straight)?

    Hi friends,
    The following code sinept draws an arrowed line from a given point to the other point. I want to know how it can changed to be dashed line as well? I would appreciate it if anybody help me for doing such changes.
    Thanks in advance,
    Reza_mp
    import javax.swing.*;
    import java.awt.*;
    import java.util.ArrayList;
    public class ArrowExample extends JFrame
        enum ArrowHead {
            HEIGHT(10), WIDTH(10);
            int n;
            ArrowHead(int n) {this.n = n;}
            public int value() {return n;}
        java.util.List<Arrow> arrows;
        BasicStroke stroke;
        private class Arrow {
            Point start;
            Point end;
            Polygon arrowHead;
            public Arrow(Point start, Point end) {
                this.start = start;
                this.end = end;
                double direction = Math.atan2(end.y - start.y, end.x - start.x);
                System.out.println(direction * 180/Math.PI);
                arrowHead = new Polygon();
                arrowHead.addPoint(0, 0);
                Point p1 = rotate(ArrowHead.WIDTH.value()/2, ArrowHead.HEIGHT.value(), direction);
                arrowHead.addPoint(p1.x, p1.y);
                Point p2 = rotate(-ArrowHead.WIDTH.value()/2, ArrowHead.HEIGHT.value(), direction);
                arrowHead.addPoint(p2.x, p2.y);
                arrowHead.addPoint(0, 0);
                arrowHead.translate(end.x, end.y);
            public Point rotate(int x, int y, double dir) {
                Point p = new Point();
                double r = Math.sqrt(x*x + y*y);
                double theta = Math.atan2(y, x);
                p.setLocation(Math.round(r*Math.cos(theta + dir + Math.PI/2)),
                              Math.round(r*Math.sin(theta + dir + Math.PI/2)));
                return p;
            public void draw(Graphics2D g) {
                g.drawLine(start.x, start.y, end.x, end.y);
                g.drawPolygon(arrowHead);
                g.fillPolygon(arrowHead);
        public ArrowExample() {
            super("Arrows");
            setDefaultCloseOperation(EXIT_ON_CLOSE);
            JPanel p = new JPanel() {
                protected void paintComponent(Graphics g) {
                    super.paintComponent(g);
                    Graphics2D g2d = (Graphics2D)g;
                    Stroke oldStroke = g2d.getStroke();
                    Color oldColor = g2d.getColor();
                    g2d.setStroke(stroke);
                    g2d.setColor(Color.black);
                    for (Arrow a : arrows)
                        a.draw(g2d);
                    g2d.setStroke(oldStroke);
                    g2d.setColor(oldColor);
            p.setBackground(Color.white);
            add(p, BorderLayout.CENTER);
            stroke = new BasicStroke(3);
            arrows = new ArrayList<Arrow>();
            arrows.add(new Arrow(new Point(10,10), new Point(100,100)));
            arrows.add(new Arrow(new Point(300,10), new Point(300,100)));
            arrows.add(new Arrow(new Point(450,450), new Point(400,100)));
            pack();
            setSize(500, 500);
        public static void main(String[] args) {
            setDefaultLookAndFeelDecorated(true);
            SwingUtilities.invokeLater(new Runnable() {
                public void run() {
                    new ArrowExample().setVisible(true);
    }

    Change the draw method as follows:
            public void draw(Graphics2D g) {
                Stroke s = g.getStroke();
                g.setStroke( new BasicStroke( 3.0f, BasicStroke.CAP_BUTT,
                   BasicStroke.JOIN_MITER, 1.0f, new float[] { 10.0f, 10.0f }, 0.0f ) );
                g.drawLine(start.x, start.y, end.x, end.y);
                g.setStroke( s );
                g.drawPolygon(arrowHead);
                g.fillPolygon(arrowHead);
            }

  • Drawing dashed line or dotted line in a flex line chart

    Friends,
    I want to draw a line chart which should be either dotted or dashed.
    since there is no component like dashed line chart, can anyone help me in creating one.
    i think if i extend the line series component, then i can draw that.
    but am stuck there. pls help people.
    Regards,
    Anoop

    Try looking [url http://www.macdevcenter.com/pub/a/mac/2002/03/22/vertical_text.html]here.
    : jay

  • Can not draw a solid line after drawing a dashed line

    I have been using a Graphics2D object in order to paint onto a buffered image and then transition that to a panel for viewing. The way the program works requires me to create the dashed line first through BasicStroke. After doing this I have tried to reset the setStroke with multiple new pens including BasicStroke(), BasicStroke(1.0f), and BasicStroke(1.0f, BasicStroke.CAP_BUTT, BasicStroke.JOIN_BEVEL, 0.0f, new float[] {1,0}, 0.0f).
    Any ideas as to why I am still incapiable of drawing a solid line?

    Any ideas as to why I am still incapiable of drawing
    a solid line?Without seeing any code, I could guess, but my guess and a quarter won�t even buy you a newspaper around here now a days.
    Seriously though, you need to create a short, self contained, compilable example. Look here for an explanation on how to create this:
    http://www.physci.org/codes/sscce/

  • Writing text vertically and drawing dashed line

    Hello,
    I m trying to write text vertically ( basically to write data on the y-axis of a graph)..Is there a way in which i can set the line direction properties to VERTICAL..?
    Also, i m trying to draw a dashed line.Can anyone tell me how to do this?
    Thnx in advance....

    Try looking [url http://www.macdevcenter.com/pub/a/mac/2002/03/22/vertical_text.html]here.
    : jay

  • I want to know how to draw arrows & dashed lines in a picture control

    I have to draw arrows & dashed lines in a picture control. Just like we can do that in word or paint etc. I need to do the same using the mouse and drag the line/arrow till I realease the mouse. I am able to this for a normal line ( it works perfectly) but when I have to draw an arrow or a line I am stumped.

    Unfortunately, you have to code your own VIs to do these. It's not going to be too complicated if you manage the animation (while dragging the mouse) with a normal line and draw the dashed line/arrow at the end (when releasing the mouse button).
    In both cases, you'll know start/end line coordinates, thus having the line equation. For arrows, you need to calculate the angle in order to draw it properly.
    A simpler solution may be an activeX control with these features (Paint like) already integrated or to develop one in Visual Basic (at least it will be simpler to manage mouse events and drawing tasks).
    Let's hope somebody already did it and wants to share.

  • Dashed Line in Drawing Mode?

    Is there a way to create a dashed line in the AppleWorks drawing mode?

    Roger Wilmut1 wrote:
    Double-click the line drawing tool. Now, at the bottom of the toolbar, select the line box (just above the big 'T'. Now select the black-and-white pattern palette (the second one down). Choose a suitable pattern - I suggest starting with the third down in the first column.
    Thanks. That did it. I didn't know about the "line formatting" button (or the other two formatting buttons, for that matter). I knew about the pattern palette, but thought it only applied to area fills. I also discovered that I could apply a dashed attribute to an existing line by clicking on the "line formatting" button, selecting a line, and then using the pattern palette.
    Maybe it's always been this way, but I find that I now always have one of the three lower-left "formatting buttons" selected. Is there a way to arrange for all three to be deselected, or shouldn't I worry about it?

  • Is there a way to draw a dash line that follows the curve in Photoshop?

    Hello,
    Is there a way to draw a dash line that follows the curve in Photoshop (See image)?
    I know how to make a dotted line, but not a dash line, in photoshop.
    Thanks.

    Use a vector shape and a dashed stroke in Photoshop CC.

  • PS CC 2014 - Brush tool will not draw a continuous line

    Brush tool will not draw a continuous line, I am on a macbook pro.
    Click and drag - I only get a spot.
    Very frustrating.

    Thanks for your answer PK. I really expected this to work as an ok workaround.... Now I've found that I cannot even cmd+tab back into CC.
    Let's say I tab out into Safari. I get the Safari window on top of CC. I tab back to CC and nothing happens.
    So I have to click back into the CC window to bring it back.
    Does anyone know if that is a bug that Adobe are looking into?

  • Drawing dashed lines

    Here's one I've never been able to figure out. How do you draw a dashed line in Apple Works Draw? I've always used 6.2.4 before upgrading to 6.2.9 tonight. My old ClarisDraw program has dashed lines under the Arrow Style palette but it is missing in Apple Works.

    Welcome to Apple Discussions Mark
    The closest you can get in AppleWorks is using one of the patterns for a line. It actually comes out quite well using a diagonal pattern.

  • How can I draw dashed lines on a Picture Control?

    I have loaded a *jpg map onto a Picture Control.
    I then load a file of X-Y coordinates that make-up different legs which are connected.
    I need to make these lines dashed. Before I spend time on adding new points in between
    points and then alternate between "Draw line" &
    "Draw point", I wonder if there is an easier
    way of maybe changing the attribute of the
    line with "Draw Multiple Lines" ???

    I have been trying to draw dashed lines too. I have tried drawing a dash and then putting it in a loop. the loop executes after the user has lifted the mouse and then it gets the end point of the line. the problem is that the line appears only after the mouse has been pressed, dragged and released. I was wondering if you have managed to solve your problem. If yes then could you help me with it.

  • Other Components Drawing Dashed Lines doesn't compile with Flex 4

    The lib was created in 2006 so it doesn't compile with Flex 4.
    The lib can be downloaded here http://www.quietlyscheming.com/blog/charts/dashed-lines/
    When compiling I get this error:
    Description     Resource     Path     Location     Type
    1136: Incorrect number of arguments.  Expected 3.     GraphicsUtils.as     /arrows/src/qs/utils     line 66     Flex Problem
    The line which doesn't compile:
    stroke.apply(target);
    How do I fix this error?

    I managed to compile the lib by rewriting the line:
    stroke.apply(target, new Rectangle(), new Point());
    But I don't understand what I have done.
    All Rectangle and Point dimensions are 0, but I'm sure it shouldn't be this way.

  • Can Flash create dashed line with blunt not rounded dashes ?

    Hi,
    using Flash8
    I can select line tool and dashed line in properties and draw a dashed line and get a line of sausages. How do I get a line of dashes without rounded ends to each dash ?
    Line option has end caps option with None (gives straight or blunt tip to line, round gives rounded tip .
    Draw a line with None and its got blunt ends, select it and choose dashed line option and it gets round ends to the dashes, the end cap option is greyed out !
    Are dashed lines with blunt dashes now possible again with CS4, a forum poster also found that CS3 no longer gave blunt dashes ?
    Why do I ask:-
    I am trying to bring a map into Flash8 from Illustrator (Illus version 10 as it allows blunt tip lines to remain blunt it was said on the forum)... which has blunt ends to roads and has blunt type dashed lines. The roads remain blunt..GOOD !..but the dashed lines become what looks like a solid line. BAD !
    I do a right click - break apart,  then double click one of those now solid lines that should be dashed, and I am able to select a portion of the line, it is no longer a continual line as drawn in Illustrator. Properties shows it as solid line. Flash8 obviously having a problem with supporting Illustrator 10 dashed line then !
    Select dashed in properties box and I get a portion of the line as sausage dashes, but working my way along the line doing each bit sees a far from correct dashed line result as sausages dont start stop evenly as each line is a separate entity and ignores the previous line.
    Looks like I shall have to try and draw the line as one long line again in flash but unless I can give it blunt dashes when done, there is no point even trying that method, hence my question.
    Would the latest Illustrator and Flash versions (CS4) allow blunt type dashed lines to appear in Flash ?
    This is crucial for bringing maps into Flash.
    Envirographics

    I noticed one problem with my solution.
    If you look, very carefully, at the end of the stream, it's flat. Not rounded like it should be. After a bit of trial and error, I tried a different brush:
    Note that, in addition to the rounded rectangle (done with the new corner controls in the latest version of Illustrator CC that just came out) and the three circles, there is also a rectangle, with no stroke and no fill, to provide a space at the end of the three dots. Here is the result:

  • How to create a dashed line for cell border

    Hi,
    Is anyone know How to apply the style for cell border to get the dotted line in WinRT 
    In WPF i will get the dotted line for cell border using this way.
    <DrawingBrush Viewport="0,0,20,20" ViewportUnits="Absolute" TileMode="Tile">
    <DrawingBrush.Drawing>
    <DrawingGroup>
    <GeometryDrawing Brush="Black">
    <GeometryDrawing.Geometry>
    <GeometryGroup>
    <RectangleGeometry Rect="0,0,50,50" />
    <RectangleGeometry Rect="50,50,50,50" />
    </GeometryGroup>
    </GeometryDrawing.Geometry>
    </GeometryDrawing>
    </DrawingGroup>
    </DrawingBrush.Drawing>
    </DrawingBrush>
    Thanks in Advance,

    check this thread: 
    http://stackoverflow.com/questions/14673643/windows-store-apps-how-to-draw-a-dashed-line
    Fouad Roumieh

  • Dashed line "Dash" & "Gap" options

    Hey all, looking for a CS3 tip here.
    I use a lot of dashed strokes, and I've found that when I enter values in the Dash and Gap boxes, I later can't delete the values entirely. I can delete whatever I entered, but Illustrator won't leave the box blank - it now fills the box with 0 point.
    For example, I create a path, turn on Dashed Line, then enter 2 point Dash, 1 point Gap, and accidentally Tab to the third box. Once the focus has been put on that third box, it won't remain blank, the best I can have is 0 point. So now continuing the example, my stroke is 2 point dash, 1 point gap, 0 point dash (slightly visible on screen, invisible in print), 1 point gap, and repeat. The net effect is that it looks like a 2 point dash followed by a 2 point gap.
    Any way to reset the box to contain NO information? It's bugging me because once I've created one of these "bad" dashed strokes, I either have to fudge my values to make it look right, or quit illustrator and start over because the bad values are persistent any time I turn on the dashed line checkbox until Illustrator is quit.

    I'm deleting everything in the box, and just to be sure, I've tried clicking in the box and hitting command-a to select all, then hitting delete. But whether I do it that way or drop the cursor in at the end tap delete repeatedly, it still auto-fills "0 pt" when I leave the box.
    As to the second point, I always try emptying the boxes from right back to the left. I get the effect you describe if I empty the first box - they all reset to blank and the "dashed line" checkbox changes to unchecked. But the moment I try to put a dashed line on a path again, it refills with the previous setting, including the 0 pt entries on the right most boxes that I would hope to stay blank.
    I take it your installation doesn't replicate the behavior I'm experiencing? I will be upgrading to Leopard just as soon as I have a slump - I can just wait to see if a clean installation of Illustrator takes care of it.
    Thanks.

Maybe you are looking for