Results 1 to 2 of 2

Thread: Fit to Screen

  1. #1

    Thread Starter
    New Member
    Join Date
    Jan 2002
    Posts
    13

    Fit to Screen

    Hi guys,
    I have a series of cooridnates which are to be printed out to the picture control in solid line. (vector image)

    I wan to implment a feature like fit to screen so that a small image will be fit nicely to the size of my picture control. May i know how to do it?

  2. #2
    Addicted Member Janus's Avatar
    Join Date
    Aug 2001
    Location
    California
    Posts
    221
    try scaling each coordinate:
    XScale = (NewWidth) / (OriginalWidth)
    YScale = (NewHeight) / (OriginalHeight)

    NewX = X * XScale
    NewY = Y * YScale

    I wrote that off the top of my head, so you may need to swap the new and original sizes.
    "1 4m 4 1337 #4xz0r!'
    Janus

Posting Permissions

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



Click Here to Expand Forum to Full Width