Results 1 to 4 of 4

Thread: Zoom and drag

  1. #1
    bakriawad2000 is offline Member
    Join Date
    Aug 2013
    Posts
    6
    Rep Power
    0

    Default Zoom and drag

    Hey,

    i want to make a map with objects in it, and what i want to know is the following:

    1) how to zoom into the map whilst making some objects get bigger and some don't.
    2) how to be able to make the map draggable so when zoomed in you can still look around the map.
    3) how can i drag an object move with the mouse (dragged) to another place.

    you do not need to include everything like libraries, but please state all the variables.
    also, more than 1 way would be nice.. even if it isn't in code.

    would appreciate your help.

  2. #2
    bakriawad2000 is offline Member
    Join Date
    Aug 2013
    Posts
    6
    Rep Power
    0

    Default Re: Zoom and drag

    it's either everyone is on some sort of a vacation or they didnt understand what i need :(

    i just need to know how u do them... u do not need to give me full codes, i just need to know the functions i can use t do so..
    using a BufferedImage and resizing it is not what i want to do... couldn't find a zoom or other term under that library "BI.???" (or is under a name im not aquainted with?)

    also, during the zoom only the map and maybe selected object should be enlarged and not the whole panel while.. so how do i go on about this?

    also, i am not sure how to grow around with the dragging.. dragging an item is something i would be able to manage, but moving the view rectangle around is something i do not know how to go about.. maybe answering my previous question will help me, but just give me a tip/direction/advice on it incase.

  3. #3
    pj6444 is offline Senior Member
    Join Date
    Jan 2013
    Posts
    165
    Rep Power
    2

    Default Re: Zoom and drag

    This is a lot to be asking people to do for you. I suggest you do some research on your own about MouseListeners and BufferedImages. The problem with your idea is that you would need to make separate images for each object that you wanted to zoom. Try some stuff out and then ask for help.

  4. #4
    pj6444 is offline Senior Member
    Join Date
    Jan 2013
    Posts
    165
    Rep Power
    2

    Default Re: Zoom and drag

    Also, do you know how to use the paintComponent method? This would be the most effective way to make this 2D game.

Similar Threads

  1. Replies: 13
    Last Post: 08-30-2010, 07:55 PM
  2. How to Zoom in and Zoom out TYPE_USHORT_565_RGB image
    By Santhoshkumarp in forum AWT / Swing
    Replies: 0
    Last Post: 08-07-2010, 02:39 PM
  3. Zoom in and out
    By mickey in forum Java 2D
    Replies: 1
    Last Post: 06-15-2010, 11:39 PM
  4. Zoom on graphic
    By onephenom in forum Java 2D
    Replies: 1
    Last Post: 03-24-2010, 08:52 PM
  5. Java Zoom in and Zoom out?
    By ps20090 in forum Java Applets
    Replies: 2
    Last Post: 09-18-2009, 12:04 PM

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •