No announcement yet.

GfxToolsPro and moving objects

  • Filter
  • Time
  • Show
Clear All
new posts

  • GfxToolsPro and moving objects

    This is probably mostly for Eric Pearson but any input would be appreciated. I have a diagramming program for police officers to diagram traffic crashes.

    Are the following possible with GfxToolsPro:

    1) The user can left click and drop, a car, for example on the drawing area. Is there a way to rotate that car with the mouse to a desired angle? This is possible in many programs. I was using Word 2003 and dropped a picture on the page and there is a little handle to rotate the picture.

    2) The user draws a line by dragging the mouse and holding down the left button at the starting point and lets up at the finish point. Now, the user wishes to click at some point on the line with the mouse to curve the line to a desired position. Possible?

    If any of these are possible, I would appreciate any hints to point me in the right direction. Thanks, in advance, to all that reply.

  • #2
    hmm, Barry,

    I have never used GfxToolsPro, but since no one is replying I'll comment,

    what you want to do can be done many ways, you can write it in straight PB w/o using Word 2003, (I've got examples in the older archives for graphics rotation etc,

    or better yet, you could probably use Word 2003 with PB's COM compilers (which I don't have yet), but I recall there are examples on Jose Roca's forum site,

    also you could use Patrice's GDI+helper or GDIImage to do anything! with graphics,

    or even Chris's EZGUI, which I believe handles rotation


    • #3
      I have used GfxTools Pro and its pretty much a GDI "wrapper" that makes using Windows GDI much much easier. Its great for that kind of thing. However it seems limited to Windows GDI. It doesn't handle alpha blending or rotation, etc.

      However for what it seems you want to do you would probably want to use GDI+ at least. Your best bet would be GDImage or GDI+ helper from Zap Solutions (Patrice). Don't limit yourself with old school GDI for something like this.
      Last edited by RyanCross; 20 Feb 2009, 12:13 PM.
      Thank you,
      Ryan M. Cross


      • #4
        > since no one is replying

        Hmmm, there must be something wrong with the way I am routinely using the PB forum software because I have missed seeing a couple of Perfect Sync-related questions in the last couple of months. Sorry for the delay!

        As Ryan says, Graphics Tools is primarily a wrapper for the MS GDI API. Unfortunately the GDI interface doesn't provide much in the way of rotation functions, so I don't think Graphics Tools will be able to help you draw a rotated car. You could pre-create some rotated overlays (for example cars pointing N, S, E, W, NW, SW, NE, SE) and allow the user to select one, but other than that...?

        The curved line is even trickier. That's not a matter of API limitations as much as the code you'd need to write. Do you want the line to curve uniformly no matter where (in the middle of the line) the user click/drags? Or do you want the user to be able to create a different curve, depending on where they click on the line? Do they need to be able to create an S-shaped line, or more complex figures?

        -- Eric Pearson, Perfect Sync, Inc.
        "Not my circus, not my monkeys."


        • #5
          First of all, thanks for the replies. Secondly, Eric, I do have pre-drawn cars at different angles and the user can drop in a car with the mouse and click the car around. It does appear that the car is moving and not changing cars from my overlay window. I just wondered if there was some way to drop a car in and then drag it around to the proper angle.

          As for the grabbing a line, a user was inquiring if after dragging in a straight line, you could click somewhere along that line and drag it into a curve. The purpose is to draw a curved road. His PD is close to Branson and if you have never been there, finding a straight road is quite the chore.