Straight line again

     if (mousecounter == 0)
          slope = (newx-oldx)/(newy-oldy);
          slope2 = (newy-oldy)/(newx-oldx);
          ++mousecounter;
oldx = oldx+ slope;
oldy = oldy + slope2;I need desperate help.......... I need to be able to take the old coordinates (oldx. oldy) and move them in straight line to (newx, newy). The problem is, its a mouse click, and it will need to be able to move forward, backward, side to side, etc in a straight line...... Suggestions?

Taken from: http://catb.org/esr/faqs/smart-questions.html
If You Can't Get An Answer
"If you can't get an answer, please don't take it personally that we don't feel we can help you. Sometimes the members of the asked group may simply not know the answer. No response is not the same as being ignored, though admittedly it's hard to spot the difference from outside.
In general, simply re-posting your question is a bad idea. This will be seen as pointlessly annoying. Have patience: the person with your answer may be in a different time-zone and asleep. Or it may be that your question wasn't well-formed to begin with."

Similar Messages

  • Resetting rectangle tool to straight lines

    The rectangle tool suddenly started to default to producing curved lines. Seems to default to about a 9% roundness for some reason. would like to know how to reset to it's defaults i.e. I want straight lines again.

    That's peculiar. Mine defaults to 0% for every new shape, no matter what the previous shape's setting.
    Have you tried quitting the application and/or shutting down and restarting your computer? If that doesn't work, then you might consider deleting your cache and/or preferences. On a Mac, these can be found at user/Library/Preferences/Adobe Fireworks CS6.
    http://helpx.adobe.com/fireworks/kb/restore-preferences-fireworks-cs5.html

  • My Macbook Pro (OSX 10.6.7 2.26 GHz Intel Core 2 Duo) has started misbehaving on me. When I'm working, the cursor will start spontaneously moving to the left in a straight line, and randomly right clicking on things.  If I close the computer and open it b

    my Macbook Pro (OSX 10.6.7 2.26 GHz Intel Core 2 Duo) has started misbehaving on me. When I'm working, the cursor will start spontaneously moving to the in a straight line, and randomly right clicking on things.
    If I close the computer and open it back up, it sometimes stops for a little while, then will spontaneously start again. Any help would be truly appreciated. Thanks!

    See this knowledge base article. Also, you might want to update to 10.6.8 (don't know that that will fix your problem, but it's the latest version of Snow Leopard).
    Clinton

  • Drawing a straight line over a video

    Is it possible to draw a straight line over a video in CS6 and also to watch the video frame by frame to take exact timings?

    Hi Jeff,
    Back again! i have managed to put the line over the video and can have it on there as long or as short time as i wish, but it appears to be moving with the video and i need it to stay at a certain point and the video to carry on playing. Basically im trying to mark a point on a race track where the horse in the lead gets to, then i need the line to stay there for when the last horse comes to the line, with the lead horse moving on past. Currently the line doesnt stay on a specific point it on the video and go out of shot when the video moves, it appears to be moving with the video. I know the overlay is a static image but is there a way of making it look like it stays in a specific place on the video?
    Hope this makes sense!
    Thanks Kat

  • Adding straight line/outlines

    the answer is probably stairing straight at me, but for the life of me, I cannot seem to figure this simple task out.
    I am designng a rack card and wish to create a stright line border on the edges of the card. How do I add these straight lines / borders, thank you.

    Once you have finished your card, go to Select>all
    Open a blank layer at the top of the layers palette
    Go to Edit>Stroke(outline) selection. Place the stroke inside. Choose the color. For width, try 3-5 px.
    Since this places the stroke on a separate layer, you can delete it if it is not ok, and do it again to suit.

  • Converting straight line to neat curve (arc ) in Visio 2013

    hi friends
    i am new to visio .
    i was watching a visio training video from youtube & i saw that the guy drew two straight lines & then when hover the mouse on these lines, at the middle of each line, a handle (connection point) ( if i don't mistake) was appeared & then the
    guy simply click on the handle (point) & pull it out & so created a neat curve (arc).
    but in visio 2013, when i draw two lines, i don't see any of those point on my lines so that i pull them out ( drag them) to create a neat curve.
    has this ability removed in Visio 2013?
    to clarify, i paste the screenshots from that video training:
    look at the point which i have selected them with a red line around it. where are these in visio 2013 ?
    i even selected all checkmarks in view menu , visual Aids, but again they don't appear on simple lines
    visio converting straight line to curve

    I use a inexpensive plug in to join open paths from dxf dwg files it is call Concatenate by Rick Johnson if the paths are not  connected this will do it for you.
    Then you can go to Object>Path>Simplify
    That will probably give you the result you need.

  • Straight line tool?

    I recently used the clone tool to edit out the background of an image and leave the stone cross highlighted against the sky. The cross has very straight edges and even with a steady hand and lots of zoom, I couldn't get the edge of the cross really straight. I bought a Bamboo Pen & Touch but that didn't really help. Either I need a straight line tool or perhaps 'detect edges' but I can't find a line tool and detect edges doesn't seem to apply to the clone tool.
    Any ideas anyone?

    No straight line tool in Aperture. You'll need a photo editor for that like GIMP or PS. And as you've seen the clone tool doesn't have a 'detect edges' checkbox.
    Aperture isn't really meant for the type of photo editing work you seem to be doing. You can make do but again a photo editor would really be the way to go.

  • CS6 - Brush bug - randomly draws straight lines when sketching

    Hey everyone,
    I noticed this bug that occurs when I use the brush tool. Whenever I'm sketching in a small region, it randomly draws a straight line, as if I never lifted my pen. It's like when you hold the shift key to make a straight line, except I'm not holding the shift key. However, this only happens if I'm drawing semi-closely and/or if I'm drawing semi-fast (not that fast though. The lines will connect even though I lifted my pen. Does anyone know how to fix this problem? I updated my video card and tablet to its latest drivers but it hasn't fixed the issue.
    Specs:
    Windows 7 64 bit
    Wacom intuos5 tablet
    Nvidia GT 520 Graphics card
    Photoshop CS6
    Any help would be appreciated.

    Allso have this from time to time.
    The brush loses response and does little short straight lines here and there, it's a software glitch. I usually save my document when that happens, this usually snaps it out of it but a few times I had to wait then save again. I used to be able to just swap apps or click on layers or something but that doesn't work anymore.
    XP 32bit
    CS5 32bit
    I had the same promlem with CS4 trial, with my old Manhattan tablet and with my new Intuo's. I think it's a bug that comes in from time to time with panel, window focus changes. Or Id get up to fetch a cup of coffee and when I come back it's like that.

  • Why does my Wacom tablet only make straight lines with the pencil & brush tool even WITHOUT shift?

    I have Photoshop CS3 on Mac OSX 10.5.8 on a white MacBook and I'm using a Wacom CTE-630, and I always had the correct drivers.
    Yesterday I discovered that the brush and pencil tools were incapable of doing anything but a dot or a straight line while I used my Wacom tablet. Using those tools with the touchpad works perfectly! Curves and squiggles abound! But for some reason I can't do it with my tablet.
    And I yes I tried downloading the latest drivers from the Wacom website... to no avail.
    After looking through forums I discovered that it was a problem experienced by users of tablets of other brands, I couldn't find any mention of Wacom tablets having this issue. And then I saw a thread somewhere that mentioned holding shift created straight lines! So I immediately thought that perhaps photoshop was functioning in reverse or maybe my shift button was broken...
    So I pressed shift, and something different happened, if I made a dot on the page a line would automatically appear, connecting that dot to the previous dot I had made. Which is in contrast to the issue I had been having which goes something like this:
    If I try to make any curved lines, a dot will appear where I first made contact on the page and then when I release the pen from the tablet a straight line will go from there to the dot at the start of the line. In other words, a dot appears when I start a line and no matter what I do with the line after that, a straight line goes from where I ended the line to where I started it!! ARGHHHH!!
    And it turns out It's not a Wacom problem, or it doesn't seem to be, because it works fine with the brush tool in Illustrator CS3.
    So I came to the conclusion it was Photoshop that was at fault. I found nothing on these forums related to my issue.
    I hope someone can help. Because I was really itching to start digitally painting again. =(
    Thanks in advance!!

    Yes I did solve the problem!
    Thanks to everyone that suggested things, but none of them worked. In the end it was Wacom, yes... WACOM that solved the problem. Even though it was an Adobe Photoshop issue as far as I could tell. So thank you Wacom, you helped me when I needed it most.
    So now to the vital solution:
    "Thank you for your recent enquiry regarding pen tool in Adobe Photoshop CS3.
    Please try the step below for reset CS3
    For MAC, please hold pressing command + alt+ shift, then open Photoshop.
    Get the CS3 update. Start CS3 while holding.
    If the problem remains, uninstall and reinstall Adobe Photoshop CS3 again."
    Worked the first time for me. So spread the word! This issue shall trouble people no more, a solution has been found!

  • My pen tool won't draw straight lines

    When I click the pen tool the cursor shows the pen tool with the "x".  When I click to create the first point nothing happens.  If I click and drag it will create a point, but I don't want curves.  I want a straight line.
    Anyone else have this problem?
    I'm on OSX Yosemite 10.10.3

    The problem was Google Chrome browser!  As soon as I quit Chrome my pen tool started working again.  I didn't even need to restart Fireworks.  I wonder if it is a conflict with one of my plugins/add ons.  Most likely.
    UPDATE - I did narrow it down to one specific Google Chrome extension.  It was "Google Play Music"

  • Patch tool is constained on straight lines

    both my patch tool and lasso constrain to straight lines even though i am drawing freehand shapes. anyone know how to reverse this?

    The problem was Google Chrome browser!  As soon as I quit Chrome my pen tool started working again.  I didn't even need to restart Fireworks.  I wonder if it is a conflict with one of my plugins/add ons.  Most likely.
    UPDATE - I did narrow it down to one specific Google Chrome extension.  It was "Google Play Music"

  • IMac 27 : Screen covered with vertical straight lines

    It started a week ago while playing Civilization V on my iMac : the screen suddenly displayed vertical blue (alterned with dark blue) vertical straight lines, the sound was still working, i could hear the music from the game. Then the screen turned black and i could'nt hear anything anymore, i had to restart the computer with the apple button.  The same happened again with civilization, once with green lines. And today, while restarting after this bug, the screen displayed multicolor lines instead of the grey wallpaper with the apple.
    What is that due to ? Is it a physical problem of the screen ? Any solution ?

    If it only happened while your were playing the game I would have suggested it was an video card overheat problem.  But if you are now having problems even when not playing the game then perhaps the video card is just failing, maybe accelerated or caused by the overheating.
    Try doing an smc and pram reset and see if that affect anything.
    If you are having a booting problem then try booting in safe mode to see if there is still a booting problem. Also boot from your installer dvd and repair/verify your drives (not repair permissions).

  • Photoshop CS5 brush randomly becomes straight lines

    Hi everyone,
    I'm having a problem with my student edition version of photoshop CS5. For some unknown reason the brush tool randomly stops drawing lines that I command it to do (using my tablet pen) and will correct itself when I open another program (any program). Instead of drawing a curve, it will just draw a straight line and half the time not even for very far. I cant figure out for the life of me what is causing this problem. My laptop isnt on stickykeys or anything like that and I am running windows 7 64 bit with 8 gig of ram..
    THANKYOU SO MUCH in advance if you can help a student in need of doing her homework!
    Kerryanne

    Allso have this from time to time.
    The brush loses response and does little short straight lines here and there, it's a software glitch. I usually save my document when that happens, this usually snaps it out of it but a few times I had to wait then save again. I used to be able to just swap apps or click on layers or something but that doesn't work anymore.
    XP 32bit
    CS5 32bit
    I had the same promlem with CS4 trial, with my old Manhattan tablet and with my new Intuo's. I think it's a bug that comes in from time to time with panel, window focus changes. Or Id get up to fetch a cup of coffee and when I come back it's like that.

  • Problem with creating a straight line with polygamo lasso

    I am having a problem with polygamo lasso. when i create a triangle or a rechtangle in straight line it is turn out the line become not straight. I don't what did i wrong, was always working fine till today. YOu can see the pic the top line lookslike a step.

    Ihope I did right, was not sure how to save as channel.

  • How to draw only straight line instead of angled one??

    Dear friends,
    I saw a very good code posted by guru here(I think is camickr),
    But I tried to change it and I hope to draw only straight line instead of angled one, can you help how to do it??
    Thanks so much.
    import java.util.*;
    import java.awt.*;
    import java.awt.event.*;
    import javax.swing.*;
    import javax.swing.event.*;
    public class DrawingArea extends JPanel
         Vector angledLines;
         Point startPoint = null;
         Point endPoint = null;
         Graphics g;
         public DrawingArea()
              angledLines = new Vector();
              setPreferredSize(new Dimension(500,500));
              MyMouseListener ml = new MyMouseListener();
              addMouseListener(ml);
              addMouseMotionListener(ml);
              setBackground(Color.white);
         public void paintComponent(Graphics g)
              // automatically called when repaint
              super.paintComponent(g);
              g.setColor(Color.black);
              AngledLine line;
              if (startPoint != null && endPoint != null)
                   // draw the current dragged line
                   g.drawLine(startPoint.x, startPoint.y, endPoint.x,endPoint.y);
              for (Enumeration e = angledLines.elements(); e.hasMoreElements();)
                   // draw all the angled lines
                   line = (AngledLine)e.nextElement();
                   g.drawPolyline(line.xPoints, line.yPoints, line.n);
         class MyMouseListener extends MouseInputAdapter
              public void mousePressed(MouseEvent e)
                   if (SwingUtilities.isLeftMouseButton(e))
                        startPoint = e.getPoint();
              public void mouseReleased(MouseEvent e)
                   if (SwingUtilities.isLeftMouseButton(e))
                        if (startPoint != null)
                             AngledLine line = new AngledLine(startPoint, e.getPoint(), true);
                             angledLines.add(line);
                             startPoint = null;
                             repaint();
              public void mouseDragged(MouseEvent e)
                   if (SwingUtilities.isLeftMouseButton(e))
                        if (startPoint != null)
                             endPoint = e.getPoint();
                             repaint();
              public void mouseClicked( MouseEvent e )
                   if (g == null)
                        g = getGraphics();
                   g.drawRect(10,10,20,20);
         class AngledLine
              // inner class for angled lines
              public int[] xPoints, yPoints;
              public int n = 3;
              public AngledLine(Point startPoint, Point endPoint, boolean left)
                   xPoints = new int[n];
                   yPoints = new int[n];
                   xPoints[0] = startPoint.x;
                   xPoints[2] = endPoint.x;
                   yPoints[0] = startPoint.y;
                   yPoints[2] = endPoint.y;
                   if (left)
                        xPoints[1] = startPoint.x;
                        yPoints[1] = endPoint.y;
                   else
                        xPoints[1] = endPoint.x;
                        yPoints[1] = startPoint.y;
         public static void main(String[] args)
              JFrame frame = new JFrame("Test angled lines");
              frame.setDefaultCloseOperation( JFrame.EXIT_ON_CLOSE );
              DrawingArea d = new DrawingArea();
              frame.getContentPane().add( d );
              frame.pack();
              frame.setVisible(true);
    }

    Change the AngledLine class to store two points instead of 3 points (I would rename the class to be StraightLine). The code is much simpler because you just store the starting and ending points and you don't need to calculate the middle point.

Maybe you are looking for

  • Organizing Photos in Folders or Albums

    Hello I have hundreds of high res photos from a film project, and I'd like to organize them for easy viewing. As I understand the way iPhoto works, it is basically taking/referring to actual images from their original source. (like an external drive)

  • Username and Password encryption

    Hi everyone, I have application where in i m connecting to DB at present i m hardcoding username n password to the DB. But recently i read abt JCE for encrpyting secure data i tired to implement it n it works fine but again the data tht has to b encr

  • Challenging problem--who can take this

    Hi All, I am facing problem while accesing data from nested table in stored procedure. please go through the QUERY what i pasted below. SELECT /*+CHOOSE*/ B.PRODUCT_TYPE CONSOLIDATION_TYPE, D.SUPER_PRODUCT_CODE CONSOLIDATION_PRODUCT_CODE, D.SUPER_PRO

  • Order related billing for Partial Qty item in sales order

    Hi SD Gurus, In case of delivery-related billing we can create a bill for partial qty or item by creating delivery(against order) for partial qty/item. Is it possible to create order-related bill for the partial qty or item ? Any suggestion on the su

  • How can I delete backups in iCloud from iPhone that no longer exists?

    how can I delete backups in iCloud from iPhone that no longer exists?