VERSION 1.0 CLASS
BEGIN
  MultiUse = -1  'True
  Persistable = 0  'NotPersistable
  DataBindingBehavior = 0  'vbNone
  DataSourceBehavior  = 0  'vbNone
  MTSTransactionMode  = 0  'NotAnMTSObject
END
Attribute VB_Name = "ClsZeichneObj"
Attribute VB_GlobalNameSpace = False
Attribute VB_Creatable = True
Attribute VB_PredeclaredId = False
Attribute VB_Exposed = False
'Eigenschaften der Klasse
Public Left!, Top!, Width!, Height!

Public Sub Zeichne(Left, Top, Width, Height, Farbe1, Farbe2, Container As Object)
  'Einfaches Setzen der Eigenschaften (Nur in Prozedur möglich)
  'Left = 100: Top = 500: Width = 1000: Height = 1000
  
  xL = Left
  xR = Left + Width
  For Y = (Top + Height) To (Top + Height / 2) Step -1
    xL = xL + 1
    xR = xR - 1
    Container.Line (xL, Y)-(xR, Y), Farbe2
  Next
  xL = Left
  xR = Left + Width
  For Y = Top To (Top + Height / 2) 'Step -1
    xL = xL + 1
    xR = xR - 1
    Container.Line (xL, Y)-(xR, Y), Farbe2
  Next
  'Zeichnen eines überlagerten Rechtecks
  'Zwei Schreibweisen für Line möglich
  'Container.Line (Left, Top)-Step(Width, Height), QBColor(9), B
  Container.Line (Left, Top)-(Left + Width, Top + Height), Farbe1, B
End Sub

Public Function Beruehrt(X!, Y!) As Boolean
Left = 100: Top = 2000: Width = 1500: Height = 1000
  If X! < Left Or Y! < Top Then Exit Function
  If X! > (Left + Width) Or Y! > (Top + Height) Then Exit Function
  Beruehrt = True
End Function
