VERSION 1.0 CLASS
BEGIN
  MultiUse = -1  'True
  Persistable = 0  'NotPersistable
  DataBindingBehavior = 0  'vbNone
  DataSourceBehavior  = 0  'vbNone
  MTSTransactionMode  = 0  'NotAnMTSObject
END
Attribute VB_Name = "PlotStrategy"
Attribute VB_GlobalNameSpace = False
Attribute VB_Creatable = True
Attribute VB_PredeclaredId = False
Attribute VB_Exposed = False
Option Explicit
'Interfejs PlotStrategy
Private xmin As Single, xmax As Single
Private ymin As Single, ymax As Single
Const max = 1E+38

Public Sub plot(x() As Single, y() As Single)
'Implementacja w klasach pochodnych
End Sub
'-----
Public Sub findBounds(x() As Single, y() As Single)
  Dim i As Integer
  xmin = max
  xmax = -max
  ymin = max
  ymax = -max

  For i = 1 To UBound(x())
    If x(i) > xmax Then xmax = x(i)
    If x(i) < xmin Then xmin = x(i)
    If y(i) > ymax Then ymax = y(i)
    If y(i) < ymin Then ymin = y(i)
  Next i
End Sub
'-----
Public Function getXmax() As Single
  getXmax = xmax
End Function

Public Function getYmax() As Single
  getYmax = ymax
End Function

Public Function getXmin() As Single
  getXmin = xmin
End Function

Public Function getYmin() As Single
  getYmin = ymin
End Function
