×

Discussion Board

Results 1 to 4 of 4

Hybrid View

  1. #1
    Registered User
    Join Date
    Aug 2006
    Posts
    12

    Coordinate transformation

    Hi All,

    I have asked this question before but didnt get any reply but i am sure there is a solution.

    If i have a 800x800 grid with northing and easting on the server....how can i transform them to be used on the nokia mobile set 6670.

    That is if i select a point using a cursor of 1 pixel size on the mobile phone, how can i tell the program that selected point matches northing and easting of the grid on the server.....


    I know a transformation is needed but cant figure it out that how can such tranformation take place...the mobile screen is way to small...

  2. #2
    Registered User
    Join Date
    Feb 2006
    Posts
    8

    Re: Coordinate transformation

    It depends on how you are displaying the image. The simplest option is to display it without scaling but only display as much as will fit on screen and keep track of where the origin of the screen image is in relation to the origin of the image (e.g. x and y offsets), converting screen co-ordinates to image co-ordinates is then a case of adding the offsets. If you scale the image when displaying it gets more complicated (need to know ratio of scaling to multiply screen co-ords by).

    ee7drs

  3. #3
    Registered User
    Join Date
    Aug 2006
    Posts
    12

    Re: Coordinate transformation

    Do you have any code example of using offsets

  4. #4
    Registered User
    Join Date
    Feb 2006
    Posts
    8

    Re: Coordinate transformation

    The following snippet will draw a section of original_image into screen_image, where the offsets are the co-ordinates in the original image where the top left corner pixel of screen_image is assumed to be. By changing the offsets e.g. using a keyboard handling routine that looks for cursor key presses and refreshing screen_image as below you will get the effect of a moveable window onto your original image

    (w,h) = screen_image.size
    screen_image.blit(original_image,(offset_x,offset_y),(0,0,w,h))

Similar Threads

  1. 9210 graphics geometric transformation
    By Nokia_Archive in forum Symbian
    Replies: 3
    Last Post: 2005-04-06, 11:10
  2. Replies: 1
    Last Post: 2003-04-22, 13:56
  3. Graph transformation
    By Nokia_Archive in forum Mobile Java General
    Replies: 0
    Last Post: 2002-05-27, 15:49

Posting Permissions

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