VERSION 1.0 CLASS
BEGIN
  MultiUse = -1  'True
  Persistable = 0  'NotPersistable
  DataBindingBehavior = 0  'vbNone
  DataSourceBehavior  = 0  'vbNone
  MTSTransactionMode  = 0  'NotAnMTSObject
END
Attribute VB_Name = "Rectangle"
Attribute VB_GlobalNameSpace = False
Attribute VB_Creatable = True
Attribute VB_PredeclaredId = False
Attribute VB_Exposed = False
Option Explicit
'Klasa Rectangle
'Sprawdza czy punkt (x,y)
'Leży wewnątrz prostokąta
Private x1 As Integer
Private y1 As Integer
Private x2 As Integer
Private y2 As Integer
Private w As Integer
Private h As Integer
'--------
Public Function contains(X As Single, Y As Single) As Boolean
  If x1 <= X And X <= x2 And y1 <= Y And Y <= y2 Then
    contains = True
  Else
    contains = False
  End If
End Function
'--------
Public Sub init(x1_ As Integer, y1_ As Integer)
  x1 = x1_
  x2 = x1 + w
  y1 = y1_
  y2 = y1 + h
End Sub
'--------
Public Sub setSize(w_ As Integer, h_ As Integer)
  w = w_
  h = h_
End Sub
