Results 1 to 5 of 5

Thread: TPointArrays

  1. #1
    Join Date
    Feb 2007
    Location
    USA
    Posts
    667
    Mentioned
    0 Post(s)
    Quoted
    0 Post(s)

    Default TPointArrays

    Can someone give me a quick lesson on TPointArrays? I couldn't find any explanations of them, but I need to use one for FindColorSkipCoords()
    I know the basics of regular arrays so you can skip that part.

    Thanks in advance

  2. #2
    Join Date
    Jun 2006
    Location
    The Netherlands
    Posts
    2,984
    Mentioned
    3 Post(s)
    Quoted
    1 Post(s)

    Default

    Lets split them for a second, you know what Arrays are ? if not then a quick lesson. An array is one var that can contain multiple contents. TheVar[0] := 3; TheVar[1] := 5; like that. A TPoint is a type that contains a x and y coord, like TPointVar.x and TPointVar.y. TPointVar.x/y are just integers and act the same as x, y for example. If you mix those two together you get a combination that could look like this : TheMixedVar[1].x or TheMixedVar[445].y just some examples...
    Administrator's Warning:


  3. #3
    Join Date
    Sep 2006
    Posts
    5,219
    Mentioned
    4 Post(s)
    Quoted
    1 Post(s)

    Default

    Also get Labo's scar help file, See my FAQ for link. There's a tut by I think Kane on tpoints, arrays, and tpoint arrays.

  4. #4
    Join Date
    Feb 2007
    Location
    USA
    Posts
    667
    Mentioned
    0 Post(s)
    Quoted
    0 Post(s)

    Default

    Thanks Sumilion

    Yea, I saw a tut by kane on arrays. I thought it said that he was going to get around to TPoints, but it didn't look like he had. Maybe there's a newer one I missed.

    I'll check out Labo's thing.

  5. #5
    Join Date
    Feb 2006
    Location
    L.A, USA
    Posts
    1,632
    Mentioned
    0 Post(s)
    Quoted
    0 Post(s)

    Default

    Basically TPointArrays are an array of TPoint;

    A TPoint, is a type of variable that holds two values, preferably, an, x, y. You can think of it as a coord. So a TPointArray is an array of coords.

    Set length with setarraylength();
    get length with getarraylength();

    It's mainly used with the color function FindColorsSpiralTolerance (at least that's what I use it for..).

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

Similar Threads

  1. [TUT]Picking Colors for TPointArrays
    By FreakyMonkey in forum OSR Advanced Scripting Tutorials
    Replies: 12
    Last Post: 02-12-2009, 08:41 AM
  2. ObjectFinding using TPointArrays
    By Negaal in forum OSR Advanced Scripting Tutorials
    Replies: 11
    Last Post: 10-15-2008, 03:34 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
  •