-
Notifications
You must be signed in to change notification settings - Fork 65
/
PlotPoint.class.st
107 lines (92 loc) · 2.14 KB
/
PlotPoint.class.st
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
"
PlotPoint is a point that have more data used to draw in a PlotMorph
"
Class {
#name : #PlotPoint,
#superclass : #Point,
#instVars : [
'series',
'scaledPoint',
'extra'
],
#category : #'CogTools-VMProfiler'
}
{ #category : #'instance creation' }
PlotPoint class >> at: aPoint serie: aPlotSerie [
^ self new initializeAt: aPoint series: aPlotSerie
]
{ #category : #'instance creation' }
PlotPoint class >> at: aPoint serie: aPlotSerie extra: anObject [
^ self new
initializeAt: aPoint
serie: aPlotSerie
extra: anObject
]
{ #category : #'instance creation' }
PlotPoint class >> at: aPoint series: aPlotSeries [
^ self new initializeAt: aPoint series: aPlotSeries
]
{ #category : #'instance creation' }
PlotPoint class >> at: aPoint series: aPlotSeries extra: anObject [
^ self new
initializeAt: aPoint
series: aPlotSeries
extra: anObject
]
{ #category : #'instance creation' }
PlotPoint class >> new [
^super new initialize
]
{ #category : #comparing }
PlotPoint >> = anObject [
^ super = anObject
and: [series = anObject series
and: [extra = anObject extra]]
]
{ #category : #accessing }
PlotPoint >> extra [
^extra
]
{ #category : #comparing }
PlotPoint >> hash [
^ super hash
bitXor: (series hash bitXor: extra hash)
]
{ #category : #initialization }
PlotPoint >> initialize [
scaledPoint := self
]
{ #category : #initialization }
PlotPoint >> initializeAt: aPoint series: aPlotSeries [
self setX: aPoint x setY: aPoint y.
series := aPlotSeries
]
{ #category : #initialization }
PlotPoint >> initializeAt: aPoint series: aPlotSeries extra: anObject [
self setX: aPoint x setY: aPoint y.
series := aPlotSeries.
extra := anObject
]
{ #category : #printing }
PlotPoint >> printOn: aStream [
super printOn: aStream.
aStream nextPutAll: ' series:(';
print: series;
nextPutAll: ') scaled:';
print: scaledPoint.
extra isNil
ifFalse: [aStream nextPutAll: ' extra:';
print: extra]
]
{ #category : #accessing }
PlotPoint >> scaledPoint [
^ scaledPoint ifNil:[self]
]
{ #category : #accessing }
PlotPoint >> scaledPoint: anObject [
scaledPoint := anObject
]
{ #category : #accessing }
PlotPoint >> series [
^ series
]