Results 1 to 5 of 5

Thread: Complicated--applying Scale-Transform to a series of points

  1. #1

    Thread Starter
    l33t! MrPolite's Avatar
    Join Date
    Sep 2001
    Posts
    4,428

    Complicated--applying Scale-Transform to a series of points

    lets say I have an array of points and I want to apply a ScaleTransform to them. I dont know if .NET provides a way to do this or not, but I hope it does. This pic shows what I want to do.

    Basically there is a series of points and you are RESIZING them like a picture. I know it's possible to do translateTransform to an array of Points, but I don't know about the scale transform...I hope someone knows how to do this.... any ideas?

    (by Point, I mean System.Drawing.Point.... I'm not actually drawing anything with the points. I just want their coordinates to change)
    Last edited by MrPolite; Apr 10th, 2003 at 08:09 PM.
    rate my posts if they help ya!
    Extract thumbnail without reading the whole image file: (C# - VB)
    Apply texture to bitmaps: (C# - VB)
    Extended console library: (VB)
    Save JPEG with a certain quality (image compression): (C# - VB )
    VB.NET to C# conversion tips!!

  2. #2
    yay gay PT Exorcist's Avatar
    Join Date
    Apr 2002
    Location
    . . . my reason of shame
    Posts
    2,729
    i think the best way is to define a center for the array of points and that way u'll just have to change the size FROM the center to bigger numbers...err..maybe i mjsut saying poopie
    \m/\m/

  3. #3

    Thread Starter
    l33t! MrPolite's Avatar
    Join Date
    Sep 2001
    Posts
    4,428
    hehehe and how do you want to FIND a center for that? I just have a series of RANDOM points
    rate my posts if they help ya!
    Extract thumbnail without reading the whole image file: (C# - VB)
    Apply texture to bitmaps: (C# - VB)
    Extended console library: (VB)
    Save JPEG with a certain quality (image compression): (C# - VB )
    VB.NET to C# conversion tips!!

  4. #4
    yay gay PT Exorcist's Avatar
    Join Date
    Apr 2002
    Location
    . . . my reason of shame
    Posts
    2,729
    hmm just make a virtual rectangle and then make the calculations..the width/2 , height / 2 and then u'll get the center point, from there on there should be somewhat easy to do the rest..or am i missing something?
    Attached Images Attached Images  
    \m/\m/

  5. #5
    yay gay PT Exorcist's Avatar
    Join Date
    Apr 2002
    Location
    . . . my reason of shame
    Posts
    2,729
    to make the rectangle just put ALL System.Drawing.Points into a collection..then make a variable called minHeight, minWidth, maxHeight, maxWidth

    and use:

    if (pointCollection(1).Width < minWidth) then
    pointCollection(1).Width
    end if

    i think i didnt explain very well but i hope u got the point
    \m/\m/

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