Class TRectangleList

DescriptionHierarchyFieldsMethodsProperties

Unit

Declaration

type TRectangleList = class(specialize TGenericStructList<TRectangle>)

Description

no description available, TGenericStructList description follows

Generic list of types that are compared by CompareByte.

This is equivalent to TFPGList, except it doesn't override IndexOf, so your type doesn't need to have a "=" operator built-in inside FPC. When calling IndexOf or Remove, it will simply compare values using CompareByte, this is what TFPSList.IndexOf uses. This way it works to create lists of records, vectors (constant size arrays), old-style TP objects, and also is suitable to create a list of methods (since for methods, the "=" is broken, for Delphi compatibility, see http://bugs.freepascal.org/view.php?id=9228).

We also add some trivial helper methods like Add and L.

Hierarchy

Overview

Methods

Public function FindRectangle(const X, Y: Integer): integer;

Description

Methods

Public function FindRectangle(const X, Y: Integer): integer;

FindRectangle returns index of the rectangle that contains point (X, Y).

It returns the index of the last rectangle, that is: it searches from the end of the list. This way the rectangles added later by Add method are treated as being on top of previous rectangles, which is more intuitive.

Returns -1 if not found.


Generated by PasDoc 0.12.1 on 2013-02-04 20:26:51