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
Private xp As Integer, yp As Integer
Private wr As Integer, hr As Integer
Public Sub init(x As Integer, y As Integer, w As Integer, h As Integer)
  xp = x
  yp = y
  wr = w
  hr = h
End Sub

Public Function contains(x As Integer, y As Integer) As Boolean
  Dim cn As Boolean
  cn = xp <= x And x <= xp + wr
  cn = cn And yp <= y And y <= yp + hr
  contains = cn
End Function

Friend Property Get x() As Integer
  x = xp
End Property

Friend Property Get y() As Integer
  y = yp
End Property

Friend Property Get w() As Integer
  w = wr
End Property

Friend Property Get h() As Integer
  h = hr
End Property

Friend Property Let x(x1 As Integer)
  xp = x1
End Property

Friend Property Let y(y1 As Integer)
  yp = y1
End Property

Friend Property Let w(w1 As Integer)
  wr = w1
End Property

Friend Property Let h(h1 As Integer)
  hr = h1
End Property
