Geometric.st
author Claus Gittinger <cg@exept.de>
Fri, 08 Jul 2005 23:13:39 +0200
changeset 8919 707a9ff7f9b2
parent 7582 279c8f991809
child 11744 c15b974b69a1
permissions -rw-r--r--
*** empty log message ***
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
356
claus
parents:
diff changeset
     1
"
claus
parents:
diff changeset
     2
 COPYRIGHT (c) 1995 by Claus Gittinger
claus
parents:
diff changeset
     3
	      All Rights Reserved
claus
parents:
diff changeset
     4
claus
parents:
diff changeset
     5
 This software is furnished under a license and may be used
claus
parents:
diff changeset
     6
 only in accordance with the terms of that license and with the
claus
parents:
diff changeset
     7
 inclusion of the above copyright notice.   This software may not
claus
parents:
diff changeset
     8
 be provided or otherwise made available to, or used by, any
claus
parents:
diff changeset
     9
 other person.  No title to or ownership of the software is
claus
parents:
diff changeset
    10
 hereby transferred.
claus
parents:
diff changeset
    11
"
claus
parents:
diff changeset
    12
5570
e6e14f50d721 category change
Claus Gittinger <cg@exept.de>
parents: 4352
diff changeset
    13
"{ Package: 'stx:libbasic' }"
e6e14f50d721 category change
Claus Gittinger <cg@exept.de>
parents: 4352
diff changeset
    14
610
cadd76cb5fb0 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 530
diff changeset
    15
Object subclass:#Geometric
1283
2c533653efa3 commentary
Claus Gittinger <cg@exept.de>
parents: 637
diff changeset
    16
	instanceVariableNames:''
2381
10af98758a49 added dummy Scale & InverseScale classVars.
Claus Gittinger <cg@exept.de>
parents: 2377
diff changeset
    17
	classVariableNames:'Scale InverseScale'
1283
2c533653efa3 commentary
Claus Gittinger <cg@exept.de>
parents: 637
diff changeset
    18
	poolDictionaries:''
7582
279c8f991809 category
Claus Gittinger <cg@exept.de>
parents: 7083
diff changeset
    19
	category:'Graphics-Geometry-Objects'
356
claus
parents:
diff changeset
    20
!
claus
parents:
diff changeset
    21
claus
parents:
diff changeset
    22
!Geometric class methodsFor:'documentation'!
claus
parents:
diff changeset
    23
claus
parents:
diff changeset
    24
copyright
claus
parents:
diff changeset
    25
"
claus
parents:
diff changeset
    26
 COPYRIGHT (c) 1995 by Claus Gittinger
claus
parents:
diff changeset
    27
	      All Rights Reserved
claus
parents:
diff changeset
    28
claus
parents:
diff changeset
    29
 This software is furnished under a license and may be used
claus
parents:
diff changeset
    30
 only in accordance with the terms of that license and with the
claus
parents:
diff changeset
    31
 inclusion of the above copyright notice.   This software may not
claus
parents:
diff changeset
    32
 be provided or otherwise made available to, or used by, any
claus
parents:
diff changeset
    33
 other person.  No title to or ownership of the software is
claus
parents:
diff changeset
    34
 hereby transferred.
claus
parents:
diff changeset
    35
"
claus
parents:
diff changeset
    36
!
claus
parents:
diff changeset
    37
claus
parents:
diff changeset
    38
documentation
claus
parents:
diff changeset
    39
"
claus
parents:
diff changeset
    40
    Abstract superclass for geometric figures.
claus
parents:
diff changeset
    41
    Concrete classes are (currently) Rectangle, Polygon and the classes
claus
parents:
diff changeset
    42
    found in goodies/shape.
claus
parents:
diff changeset
    43
claus
parents:
diff changeset
    44
    These are not graphical objects, but pure mathematical ones.
claus
parents:
diff changeset
    45
    I.e. instances do not carry graphics attributes such as color, lineWidth etc.
1355
Claus Gittinger <cg@exept.de>
parents: 1354
diff changeset
    46
    However, they ``know'' how to display themself as stroked or possibly
1360
Claus Gittinger <cg@exept.de>
parents: 1358
diff changeset
    47
    filled picture on a graphicsContext (although, the GC's current
Claus Gittinger <cg@exept.de>
parents: 1358
diff changeset
    48
    paint and lineStyles are used).
1355
Claus Gittinger <cg@exept.de>
parents: 1354
diff changeset
    49
Claus Gittinger <cg@exept.de>
parents: 1354
diff changeset
    50
    Use instances of (subclasses) of DisplayObject or 
1360
Claus Gittinger <cg@exept.de>
parents: 1358
diff changeset
    51
    of the GeometricWrapper classes for objects which keep the color 
Claus Gittinger <cg@exept.de>
parents: 1358
diff changeset
    52
    and lineStyle information with them.
356
claus
parents:
diff changeset
    53
1314
18fabbc0e0a6 examples
Claus Gittinger <cg@exept.de>
parents: 1290
diff changeset
    54
    Notice: 
18fabbc0e0a6 examples
Claus Gittinger <cg@exept.de>
parents: 1290
diff changeset
    55
        ST/X does not use Geometric instances for drawing (yet).
1355
Claus Gittinger <cg@exept.de>
parents: 1354
diff changeset
    56
        Except for Rectangle, Geometry and its subclasses exists mainly 
Claus Gittinger <cg@exept.de>
parents: 1354
diff changeset
    57
        for ST-80 compatibility and to provide a home when other (PD) 
1314
18fabbc0e0a6 examples
Claus Gittinger <cg@exept.de>
parents: 1290
diff changeset
    58
        geometry classes are to be filed in.
1290
15ba3221b89b documentation
Claus Gittinger <cg@exept.de>
parents: 1283
diff changeset
    59
15ba3221b89b documentation
Claus Gittinger <cg@exept.de>
parents: 1283
diff changeset
    60
    [author:]
15ba3221b89b documentation
Claus Gittinger <cg@exept.de>
parents: 1283
diff changeset
    61
        Claus Gittinger
1314
18fabbc0e0a6 examples
Claus Gittinger <cg@exept.de>
parents: 1290
diff changeset
    62
18fabbc0e0a6 examples
Claus Gittinger <cg@exept.de>
parents: 1290
diff changeset
    63
    [see also:]
1355
Claus Gittinger <cg@exept.de>
parents: 1354
diff changeset
    64
        Rectangle Polygon EllipticalArc Circle Spline Point
1390
Claus Gittinger <cg@exept.de>
parents: 1389
diff changeset
    65
        LineSegment Curve Arrow ArrowedSpline
1353
cab0fdd4f08e checkin from browser
Claus Gittinger <cg@exept.de>
parents: 1350
diff changeset
    66
        GraphicsContext
1358
9491e703ca81 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 1357
diff changeset
    67
        StrokingWrapper FillingWrapper
356
claus
parents:
diff changeset
    68
"
1350
85eec07b093b doku, comments, examples & more functionality
Claus Gittinger <cg@exept.de>
parents: 1314
diff changeset
    69
!
85eec07b093b doku, comments, examples & more functionality
Claus Gittinger <cg@exept.de>
parents: 1314
diff changeset
    70
85eec07b093b doku, comments, examples & more functionality
Claus Gittinger <cg@exept.de>
parents: 1314
diff changeset
    71
examples
85eec07b093b doku, comments, examples & more functionality
Claus Gittinger <cg@exept.de>
parents: 1314
diff changeset
    72
"
1357
c3681028c7f4 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 1355
diff changeset
    73
  line segment:
c3681028c7f4 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 1355
diff changeset
    74
                                                                        [exBegin]
c3681028c7f4 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 1355
diff changeset
    75
    |v l|
c3681028c7f4 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 1355
diff changeset
    76
c3681028c7f4 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 1355
diff changeset
    77
    v := (View extent:100@100) openAndWait.
c3681028c7f4 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 1355
diff changeset
    78
c3681028c7f4 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 1355
diff changeset
    79
    l := LineSegment from:10@10 to:90@90. 
c3681028c7f4 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 1355
diff changeset
    80
c3681028c7f4 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 1355
diff changeset
    81
    v paint:Color red.
c3681028c7f4 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 1355
diff changeset
    82
    l displayStrokedOn:v.
c3681028c7f4 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 1355
diff changeset
    83
c3681028c7f4 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 1355
diff changeset
    84
    l start:90@10 end:10@90.
c3681028c7f4 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 1355
diff changeset
    85
    v paint:Color blue.
c3681028c7f4 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 1355
diff changeset
    86
    l displayStrokedOn:v.
c3681028c7f4 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 1355
diff changeset
    87
                                                                        [exEnd]
c3681028c7f4 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 1355
diff changeset
    88
c3681028c7f4 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 1355
diff changeset
    89
  rectangle, unfilled:
c3681028c7f4 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 1355
diff changeset
    90
                                                                        [exBegin]
c3681028c7f4 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 1355
diff changeset
    91
    |v r|
c3681028c7f4 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 1355
diff changeset
    92
c3681028c7f4 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 1355
diff changeset
    93
    v := (View extent:100@100) openAndWait.
c3681028c7f4 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 1355
diff changeset
    94
c3681028c7f4 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 1355
diff changeset
    95
    r := Rectangle origin:10@10 corner:90@90. 
c3681028c7f4 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 1355
diff changeset
    96
c3681028c7f4 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 1355
diff changeset
    97
    v paint:Color red.
c3681028c7f4 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 1355
diff changeset
    98
    r displayStrokedOn:v.
c3681028c7f4 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 1355
diff changeset
    99
                                                                        [exEnd]
c3681028c7f4 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 1355
diff changeset
   100
1353
cab0fdd4f08e checkin from browser
Claus Gittinger <cg@exept.de>
parents: 1350
diff changeset
   101
  circle; filled and unfilled:
1350
85eec07b093b doku, comments, examples & more functionality
Claus Gittinger <cg@exept.de>
parents: 1314
diff changeset
   102
                                                                        [exBegin]
85eec07b093b doku, comments, examples & more functionality
Claus Gittinger <cg@exept.de>
parents: 1314
diff changeset
   103
    |v c|
85eec07b093b doku, comments, examples & more functionality
Claus Gittinger <cg@exept.de>
parents: 1314
diff changeset
   104
85eec07b093b doku, comments, examples & more functionality
Claus Gittinger <cg@exept.de>
parents: 1314
diff changeset
   105
    v := (View extent:200@100) openAndWait.
85eec07b093b doku, comments, examples & more functionality
Claus Gittinger <cg@exept.de>
parents: 1314
diff changeset
   106
85eec07b093b doku, comments, examples & more functionality
Claus Gittinger <cg@exept.de>
parents: 1314
diff changeset
   107
    c := Circle boundingBox:(10@10 corner:90@90). 
85eec07b093b doku, comments, examples & more functionality
Claus Gittinger <cg@exept.de>
parents: 1314
diff changeset
   108
85eec07b093b doku, comments, examples & more functionality
Claus Gittinger <cg@exept.de>
parents: 1314
diff changeset
   109
    v paint:Color blue.
85eec07b093b doku, comments, examples & more functionality
Claus Gittinger <cg@exept.de>
parents: 1314
diff changeset
   110
    c displayFilledOn:v.
85eec07b093b doku, comments, examples & more functionality
Claus Gittinger <cg@exept.de>
parents: 1314
diff changeset
   111
85eec07b093b doku, comments, examples & more functionality
Claus Gittinger <cg@exept.de>
parents: 1314
diff changeset
   112
    c center:150@50.
85eec07b093b doku, comments, examples & more functionality
Claus Gittinger <cg@exept.de>
parents: 1314
diff changeset
   113
    v paint:Color red.
85eec07b093b doku, comments, examples & more functionality
Claus Gittinger <cg@exept.de>
parents: 1314
diff changeset
   114
    c displayStrokedOn:v.
85eec07b093b doku, comments, examples & more functionality
Claus Gittinger <cg@exept.de>
parents: 1314
diff changeset
   115
85eec07b093b doku, comments, examples & more functionality
Claus Gittinger <cg@exept.de>
parents: 1314
diff changeset
   116
                                                                        [exEnd]
1353
cab0fdd4f08e checkin from browser
Claus Gittinger <cg@exept.de>
parents: 1350
diff changeset
   117
  circle & rectangle; both filled:
1350
85eec07b093b doku, comments, examples & more functionality
Claus Gittinger <cg@exept.de>
parents: 1314
diff changeset
   118
                                                                        [exBegin]
85eec07b093b doku, comments, examples & more functionality
Claus Gittinger <cg@exept.de>
parents: 1314
diff changeset
   119
    |v c|
85eec07b093b doku, comments, examples & more functionality
Claus Gittinger <cg@exept.de>
parents: 1314
diff changeset
   120
85eec07b093b doku, comments, examples & more functionality
Claus Gittinger <cg@exept.de>
parents: 1314
diff changeset
   121
    v := (View extent:100@100) openAndWait.
85eec07b093b doku, comments, examples & more functionality
Claus Gittinger <cg@exept.de>
parents: 1314
diff changeset
   122
85eec07b093b doku, comments, examples & more functionality
Claus Gittinger <cg@exept.de>
parents: 1314
diff changeset
   123
    c := Circle center:50@50 radius:40. 
85eec07b093b doku, comments, examples & more functionality
Claus Gittinger <cg@exept.de>
parents: 1314
diff changeset
   124
85eec07b093b doku, comments, examples & more functionality
Claus Gittinger <cg@exept.de>
parents: 1314
diff changeset
   125
    v paint:Color red.
85eec07b093b doku, comments, examples & more functionality
Claus Gittinger <cg@exept.de>
parents: 1314
diff changeset
   126
    c asRectangle displayFilledOn:v.
85eec07b093b doku, comments, examples & more functionality
Claus Gittinger <cg@exept.de>
parents: 1314
diff changeset
   127
85eec07b093b doku, comments, examples & more functionality
Claus Gittinger <cg@exept.de>
parents: 1314
diff changeset
   128
    v paint:Color blue.
85eec07b093b doku, comments, examples & more functionality
Claus Gittinger <cg@exept.de>
parents: 1314
diff changeset
   129
    c displayFilledOn:v.
85eec07b093b doku, comments, examples & more functionality
Claus Gittinger <cg@exept.de>
parents: 1314
diff changeset
   130
85eec07b093b doku, comments, examples & more functionality
Claus Gittinger <cg@exept.de>
parents: 1314
diff changeset
   131
                                                                        [exEnd]
1353
cab0fdd4f08e checkin from browser
Claus Gittinger <cg@exept.de>
parents: 1350
diff changeset
   132
  elliptical arcs; filled & unfilled:
1350
85eec07b093b doku, comments, examples & more functionality
Claus Gittinger <cg@exept.de>
parents: 1314
diff changeset
   133
                                                                        [exBegin]
85eec07b093b doku, comments, examples & more functionality
Claus Gittinger <cg@exept.de>
parents: 1314
diff changeset
   134
    |v e|
85eec07b093b doku, comments, examples & more functionality
Claus Gittinger <cg@exept.de>
parents: 1314
diff changeset
   135
85eec07b093b doku, comments, examples & more functionality
Claus Gittinger <cg@exept.de>
parents: 1314
diff changeset
   136
    v := (View extent:200@100) openAndWait.
85eec07b093b doku, comments, examples & more functionality
Claus Gittinger <cg@exept.de>
parents: 1314
diff changeset
   137
85eec07b093b doku, comments, examples & more functionality
Claus Gittinger <cg@exept.de>
parents: 1314
diff changeset
   138
    e := EllipticalArc 
85eec07b093b doku, comments, examples & more functionality
Claus Gittinger <cg@exept.de>
parents: 1314
diff changeset
   139
            boundingBox:(10@10 corner:190@90)
85eec07b093b doku, comments, examples & more functionality
Claus Gittinger <cg@exept.de>
parents: 1314
diff changeset
   140
            startAngle:0
85eec07b093b doku, comments, examples & more functionality
Claus Gittinger <cg@exept.de>
parents: 1314
diff changeset
   141
            endAngle:270. 
85eec07b093b doku, comments, examples & more functionality
Claus Gittinger <cg@exept.de>
parents: 1314
diff changeset
   142
85eec07b093b doku, comments, examples & more functionality
Claus Gittinger <cg@exept.de>
parents: 1314
diff changeset
   143
    v paint:Color blue.
85eec07b093b doku, comments, examples & more functionality
Claus Gittinger <cg@exept.de>
parents: 1314
diff changeset
   144
    e displayFilledOn:v.
85eec07b093b doku, comments, examples & more functionality
Claus Gittinger <cg@exept.de>
parents: 1314
diff changeset
   145
85eec07b093b doku, comments, examples & more functionality
Claus Gittinger <cg@exept.de>
parents: 1314
diff changeset
   146
    v paint:Color red.
85eec07b093b doku, comments, examples & more functionality
Claus Gittinger <cg@exept.de>
parents: 1314
diff changeset
   147
    e displayStrokedOn:v.
85eec07b093b doku, comments, examples & more functionality
Claus Gittinger <cg@exept.de>
parents: 1314
diff changeset
   148
85eec07b093b doku, comments, examples & more functionality
Claus Gittinger <cg@exept.de>
parents: 1314
diff changeset
   149
                                                                        [exEnd]
1353
cab0fdd4f08e checkin from browser
Claus Gittinger <cg@exept.de>
parents: 1350
diff changeset
   150
  polygon; filled & unfilled:
1350
85eec07b093b doku, comments, examples & more functionality
Claus Gittinger <cg@exept.de>
parents: 1314
diff changeset
   151
                                                                        [exBegin]
85eec07b093b doku, comments, examples & more functionality
Claus Gittinger <cg@exept.de>
parents: 1314
diff changeset
   152
    |v p|
85eec07b093b doku, comments, examples & more functionality
Claus Gittinger <cg@exept.de>
parents: 1314
diff changeset
   153
85eec07b093b doku, comments, examples & more functionality
Claus Gittinger <cg@exept.de>
parents: 1314
diff changeset
   154
    v := (View extent:100@100) openAndWait.
85eec07b093b doku, comments, examples & more functionality
Claus Gittinger <cg@exept.de>
parents: 1314
diff changeset
   155
85eec07b093b doku, comments, examples & more functionality
Claus Gittinger <cg@exept.de>
parents: 1314
diff changeset
   156
    p := Polygon vertices:
85eec07b093b doku, comments, examples & more functionality
Claus Gittinger <cg@exept.de>
parents: 1314
diff changeset
   157
                (Array with:(10@10)
85eec07b093b doku, comments, examples & more functionality
Claus Gittinger <cg@exept.de>
parents: 1314
diff changeset
   158
                       with:(90@90)
85eec07b093b doku, comments, examples & more functionality
Claus Gittinger <cg@exept.de>
parents: 1314
diff changeset
   159
                       with:(10@90)).
85eec07b093b doku, comments, examples & more functionality
Claus Gittinger <cg@exept.de>
parents: 1314
diff changeset
   160
85eec07b093b doku, comments, examples & more functionality
Claus Gittinger <cg@exept.de>
parents: 1314
diff changeset
   161
    v paint:Color blue.
85eec07b093b doku, comments, examples & more functionality
Claus Gittinger <cg@exept.de>
parents: 1314
diff changeset
   162
    p displayFilledOn:v.
85eec07b093b doku, comments, examples & more functionality
Claus Gittinger <cg@exept.de>
parents: 1314
diff changeset
   163
85eec07b093b doku, comments, examples & more functionality
Claus Gittinger <cg@exept.de>
parents: 1314
diff changeset
   164
    v paint:Color red.
85eec07b093b doku, comments, examples & more functionality
Claus Gittinger <cg@exept.de>
parents: 1314
diff changeset
   165
    p displayStrokedOn:v.
85eec07b093b doku, comments, examples & more functionality
Claus Gittinger <cg@exept.de>
parents: 1314
diff changeset
   166
                                                                        [exEnd]
1353
cab0fdd4f08e checkin from browser
Claus Gittinger <cg@exept.de>
parents: 1350
diff changeset
   167
cab0fdd4f08e checkin from browser
Claus Gittinger <cg@exept.de>
parents: 1350
diff changeset
   168
  circles; filled & unfilled:
1350
85eec07b093b doku, comments, examples & more functionality
Claus Gittinger <cg@exept.de>
parents: 1314
diff changeset
   169
                                                                        [exBegin]
85eec07b093b doku, comments, examples & more functionality
Claus Gittinger <cg@exept.de>
parents: 1314
diff changeset
   170
    |v c|
85eec07b093b doku, comments, examples & more functionality
Claus Gittinger <cg@exept.de>
parents: 1314
diff changeset
   171
85eec07b093b doku, comments, examples & more functionality
Claus Gittinger <cg@exept.de>
parents: 1314
diff changeset
   172
    v := View new openAndWait.
85eec07b093b doku, comments, examples & more functionality
Claus Gittinger <cg@exept.de>
parents: 1314
diff changeset
   173
85eec07b093b doku, comments, examples & more functionality
Claus Gittinger <cg@exept.de>
parents: 1314
diff changeset
   174
    c := Circle center:50@50 radius:40.
85eec07b093b doku, comments, examples & more functionality
Claus Gittinger <cg@exept.de>
parents: 1314
diff changeset
   175
85eec07b093b doku, comments, examples & more functionality
Claus Gittinger <cg@exept.de>
parents: 1314
diff changeset
   176
    c displayFilledOn:v.
85eec07b093b doku, comments, examples & more functionality
Claus Gittinger <cg@exept.de>
parents: 1314
diff changeset
   177
    50 to:1 by:-1 do:[:r |
85eec07b093b doku, comments, examples & more functionality
Claus Gittinger <cg@exept.de>
parents: 1314
diff changeset
   178
        c radius:r.
85eec07b093b doku, comments, examples & more functionality
Claus Gittinger <cg@exept.de>
parents: 1314
diff changeset
   179
        v paint:(Color grey:(r * 2)).
85eec07b093b doku, comments, examples & more functionality
Claus Gittinger <cg@exept.de>
parents: 1314
diff changeset
   180
        c displayStrokedOn:v.
85eec07b093b doku, comments, examples & more functionality
Claus Gittinger <cg@exept.de>
parents: 1314
diff changeset
   181
    ].
85eec07b093b doku, comments, examples & more functionality
Claus Gittinger <cg@exept.de>
parents: 1314
diff changeset
   182
    1 to:50 do:[:r |
85eec07b093b doku, comments, examples & more functionality
Claus Gittinger <cg@exept.de>
parents: 1314
diff changeset
   183
        c radius:r.
85eec07b093b doku, comments, examples & more functionality
Claus Gittinger <cg@exept.de>
parents: 1314
diff changeset
   184
        v paint:(Color grey:100-(r * 2)).
85eec07b093b doku, comments, examples & more functionality
Claus Gittinger <cg@exept.de>
parents: 1314
diff changeset
   185
        c displayStrokedOn:v.
85eec07b093b doku, comments, examples & more functionality
Claus Gittinger <cg@exept.de>
parents: 1314
diff changeset
   186
    ]
85eec07b093b doku, comments, examples & more functionality
Claus Gittinger <cg@exept.de>
parents: 1314
diff changeset
   187
85eec07b093b doku, comments, examples & more functionality
Claus Gittinger <cg@exept.de>
parents: 1314
diff changeset
   188
                                                                        [exEnd]
1353
cab0fdd4f08e checkin from browser
Claus Gittinger <cg@exept.de>
parents: 1350
diff changeset
   189
  arcs; filled:
1350
85eec07b093b doku, comments, examples & more functionality
Claus Gittinger <cg@exept.de>
parents: 1314
diff changeset
   190
                                                                        [exBegin]
85eec07b093b doku, comments, examples & more functionality
Claus Gittinger <cg@exept.de>
parents: 1314
diff changeset
   191
    |v ell|
85eec07b093b doku, comments, examples & more functionality
Claus Gittinger <cg@exept.de>
parents: 1314
diff changeset
   192
85eec07b093b doku, comments, examples & more functionality
Claus Gittinger <cg@exept.de>
parents: 1314
diff changeset
   193
    v := View new openAndWait.
85eec07b093b doku, comments, examples & more functionality
Claus Gittinger <cg@exept.de>
parents: 1314
diff changeset
   194
85eec07b093b doku, comments, examples & more functionality
Claus Gittinger <cg@exept.de>
parents: 1314
diff changeset
   195
    ell := EllipticalArc
85eec07b093b doku, comments, examples & more functionality
Claus Gittinger <cg@exept.de>
parents: 1314
diff changeset
   196
                boundingBox:(10@10 corner:90@90) 
85eec07b093b doku, comments, examples & more functionality
Claus Gittinger <cg@exept.de>
parents: 1314
diff changeset
   197
                startAngle:0
85eec07b093b doku, comments, examples & more functionality
Claus Gittinger <cg@exept.de>
parents: 1314
diff changeset
   198
                sweepAngle:0.
85eec07b093b doku, comments, examples & more functionality
Claus Gittinger <cg@exept.de>
parents: 1314
diff changeset
   199
1353
cab0fdd4f08e checkin from browser
Claus Gittinger <cg@exept.de>
parents: 1350
diff changeset
   200
    #(45 90 135 180 225 270 315 360) keysAndValuesDo:[:index :angle |
cab0fdd4f08e checkin from browser
Claus Gittinger <cg@exept.de>
parents: 1350
diff changeset
   201
        index odd ifTrue:[
cab0fdd4f08e checkin from browser
Claus Gittinger <cg@exept.de>
parents: 1350
diff changeset
   202
            v paint:Color white
cab0fdd4f08e checkin from browser
Claus Gittinger <cg@exept.de>
parents: 1350
diff changeset
   203
        ] ifFalse:[
cab0fdd4f08e checkin from browser
Claus Gittinger <cg@exept.de>
parents: 1350
diff changeset
   204
            v paint:Color black
cab0fdd4f08e checkin from browser
Claus Gittinger <cg@exept.de>
parents: 1350
diff changeset
   205
        ].
1350
85eec07b093b doku, comments, examples & more functionality
Claus Gittinger <cg@exept.de>
parents: 1314
diff changeset
   206
        ell sweepAngle:angle.
85eec07b093b doku, comments, examples & more functionality
Claus Gittinger <cg@exept.de>
parents: 1314
diff changeset
   207
        ell displayFilledOn:v.
85eec07b093b doku, comments, examples & more functionality
Claus Gittinger <cg@exept.de>
parents: 1314
diff changeset
   208
        Delay waitForSeconds:0.5.
85eec07b093b doku, comments, examples & more functionality
Claus Gittinger <cg@exept.de>
parents: 1314
diff changeset
   209
    ].
85eec07b093b doku, comments, examples & more functionality
Claus Gittinger <cg@exept.de>
parents: 1314
diff changeset
   210
85eec07b093b doku, comments, examples & more functionality
Claus Gittinger <cg@exept.de>
parents: 1314
diff changeset
   211
                                                                        [exEnd]
1353
cab0fdd4f08e checkin from browser
Claus Gittinger <cg@exept.de>
parents: 1350
diff changeset
   212
  arcs; filled:
1350
85eec07b093b doku, comments, examples & more functionality
Claus Gittinger <cg@exept.de>
parents: 1314
diff changeset
   213
                                                                        [exBegin]
85eec07b093b doku, comments, examples & more functionality
Claus Gittinger <cg@exept.de>
parents: 1314
diff changeset
   214
    |v ell|
85eec07b093b doku, comments, examples & more functionality
Claus Gittinger <cg@exept.de>
parents: 1314
diff changeset
   215
85eec07b093b doku, comments, examples & more functionality
Claus Gittinger <cg@exept.de>
parents: 1314
diff changeset
   216
    v := View new openAndWait.
85eec07b093b doku, comments, examples & more functionality
Claus Gittinger <cg@exept.de>
parents: 1314
diff changeset
   217
85eec07b093b doku, comments, examples & more functionality
Claus Gittinger <cg@exept.de>
parents: 1314
diff changeset
   218
    ell := EllipticalArc
85eec07b093b doku, comments, examples & more functionality
Claus Gittinger <cg@exept.de>
parents: 1314
diff changeset
   219
                boundingBox:(10@10 corner:90@90) 
85eec07b093b doku, comments, examples & more functionality
Claus Gittinger <cg@exept.de>
parents: 1314
diff changeset
   220
                startAngle:0
85eec07b093b doku, comments, examples & more functionality
Claus Gittinger <cg@exept.de>
parents: 1314
diff changeset
   221
                sweepAngle:45.
85eec07b093b doku, comments, examples & more functionality
Claus Gittinger <cg@exept.de>
parents: 1314
diff changeset
   222
85eec07b093b doku, comments, examples & more functionality
Claus Gittinger <cg@exept.de>
parents: 1314
diff changeset
   223
    #(45 90 135 180 225 270 315 360) 
85eec07b093b doku, comments, examples & more functionality
Claus Gittinger <cg@exept.de>
parents: 1314
diff changeset
   224
    with:#( 0.125 0.25 0.375 0.5 0.625 0.75 0.875 1)
85eec07b093b doku, comments, examples & more functionality
Claus Gittinger <cg@exept.de>
parents: 1314
diff changeset
   225
    do:[:angle :grey |
85eec07b093b doku, comments, examples & more functionality
Claus Gittinger <cg@exept.de>
parents: 1314
diff changeset
   226
        ell startAngle:angle-45.
85eec07b093b doku, comments, examples & more functionality
Claus Gittinger <cg@exept.de>
parents: 1314
diff changeset
   227
        v paint:(ColorValue red:grey green:0 blue:0).
85eec07b093b doku, comments, examples & more functionality
Claus Gittinger <cg@exept.de>
parents: 1314
diff changeset
   228
        ell displayFilledOn:v.
85eec07b093b doku, comments, examples & more functionality
Claus Gittinger <cg@exept.de>
parents: 1314
diff changeset
   229
    ].
85eec07b093b doku, comments, examples & more functionality
Claus Gittinger <cg@exept.de>
parents: 1314
diff changeset
   230
85eec07b093b doku, comments, examples & more functionality
Claus Gittinger <cg@exept.de>
parents: 1314
diff changeset
   231
                                                                        [exEnd]
1353
cab0fdd4f08e checkin from browser
Claus Gittinger <cg@exept.de>
parents: 1350
diff changeset
   232
  spline; filled & unfilled:
cab0fdd4f08e checkin from browser
Claus Gittinger <cg@exept.de>
parents: 1350
diff changeset
   233
                                                                        [exBegin]
cab0fdd4f08e checkin from browser
Claus Gittinger <cg@exept.de>
parents: 1350
diff changeset
   234
    |v p|
cab0fdd4f08e checkin from browser
Claus Gittinger <cg@exept.de>
parents: 1350
diff changeset
   235
cab0fdd4f08e checkin from browser
Claus Gittinger <cg@exept.de>
parents: 1350
diff changeset
   236
    v := (View extent:100@100) openAndWait.
cab0fdd4f08e checkin from browser
Claus Gittinger <cg@exept.de>
parents: 1350
diff changeset
   237
cab0fdd4f08e checkin from browser
Claus Gittinger <cg@exept.de>
parents: 1350
diff changeset
   238
    p := Spline controlPoints:
1354
Claus Gittinger <cg@exept.de>
parents: 1353
diff changeset
   239
                (Array with:(20@20)
Claus Gittinger <cg@exept.de>
parents: 1353
diff changeset
   240
                       with:(80@80)
Claus Gittinger <cg@exept.de>
parents: 1353
diff changeset
   241
                       with:(20@80)).
1353
cab0fdd4f08e checkin from browser
Claus Gittinger <cg@exept.de>
parents: 1350
diff changeset
   242
cab0fdd4f08e checkin from browser
Claus Gittinger <cg@exept.de>
parents: 1350
diff changeset
   243
    v paint:Color blue.
cab0fdd4f08e checkin from browser
Claus Gittinger <cg@exept.de>
parents: 1350
diff changeset
   244
    p displayFilledOn:v.
cab0fdd4f08e checkin from browser
Claus Gittinger <cg@exept.de>
parents: 1350
diff changeset
   245
cab0fdd4f08e checkin from browser
Claus Gittinger <cg@exept.de>
parents: 1350
diff changeset
   246
    v paint:Color red.
cab0fdd4f08e checkin from browser
Claus Gittinger <cg@exept.de>
parents: 1350
diff changeset
   247
    p displayStrokedOn:v.
cab0fdd4f08e checkin from browser
Claus Gittinger <cg@exept.de>
parents: 1350
diff changeset
   248
                                                                        [exEnd]
cab0fdd4f08e checkin from browser
Claus Gittinger <cg@exept.de>
parents: 1350
diff changeset
   249
cab0fdd4f08e checkin from browser
Claus Gittinger <cg@exept.de>
parents: 1350
diff changeset
   250
  closed spline; filled & unfilled:
cab0fdd4f08e checkin from browser
Claus Gittinger <cg@exept.de>
parents: 1350
diff changeset
   251
                                                                        [exBegin]
cab0fdd4f08e checkin from browser
Claus Gittinger <cg@exept.de>
parents: 1350
diff changeset
   252
    |v p|
cab0fdd4f08e checkin from browser
Claus Gittinger <cg@exept.de>
parents: 1350
diff changeset
   253
cab0fdd4f08e checkin from browser
Claus Gittinger <cg@exept.de>
parents: 1350
diff changeset
   254
    v := (View extent:100@100) openAndWait.
cab0fdd4f08e checkin from browser
Claus Gittinger <cg@exept.de>
parents: 1350
diff changeset
   255
cab0fdd4f08e checkin from browser
Claus Gittinger <cg@exept.de>
parents: 1350
diff changeset
   256
    p := Spline controlPoints:
1354
Claus Gittinger <cg@exept.de>
parents: 1353
diff changeset
   257
                (Array with:(20@20)
Claus Gittinger <cg@exept.de>
parents: 1353
diff changeset
   258
                       with:(80@80)
Claus Gittinger <cg@exept.de>
parents: 1353
diff changeset
   259
                       with:(20@80)
Claus Gittinger <cg@exept.de>
parents: 1353
diff changeset
   260
                       with:(20@20)).
1353
cab0fdd4f08e checkin from browser
Claus Gittinger <cg@exept.de>
parents: 1350
diff changeset
   261
cab0fdd4f08e checkin from browser
Claus Gittinger <cg@exept.de>
parents: 1350
diff changeset
   262
    v paint:Color blue.
cab0fdd4f08e checkin from browser
Claus Gittinger <cg@exept.de>
parents: 1350
diff changeset
   263
    p displayFilledOn:v.
cab0fdd4f08e checkin from browser
Claus Gittinger <cg@exept.de>
parents: 1350
diff changeset
   264
cab0fdd4f08e checkin from browser
Claus Gittinger <cg@exept.de>
parents: 1350
diff changeset
   265
    v paint:Color red.
cab0fdd4f08e checkin from browser
Claus Gittinger <cg@exept.de>
parents: 1350
diff changeset
   266
    p displayStrokedOn:v.
cab0fdd4f08e checkin from browser
Claus Gittinger <cg@exept.de>
parents: 1350
diff changeset
   267
                                                                        [exEnd]
1350
85eec07b093b doku, comments, examples & more functionality
Claus Gittinger <cg@exept.de>
parents: 1314
diff changeset
   268
"
85eec07b093b doku, comments, examples & more functionality
Claus Gittinger <cg@exept.de>
parents: 1314
diff changeset
   269
! !
85eec07b093b doku, comments, examples & more functionality
Claus Gittinger <cg@exept.de>
parents: 1314
diff changeset
   270
2381
10af98758a49 added dummy Scale & InverseScale classVars.
Claus Gittinger <cg@exept.de>
parents: 2377
diff changeset
   271
!Geometric class methodsFor:'initialization'!
10af98758a49 added dummy Scale & InverseScale classVars.
Claus Gittinger <cg@exept.de>
parents: 2377
diff changeset
   272
10af98758a49 added dummy Scale & InverseScale classVars.
Claus Gittinger <cg@exept.de>
parents: 2377
diff changeset
   273
initialize
10af98758a49 added dummy Scale & InverseScale classVars.
Claus Gittinger <cg@exept.de>
parents: 2377
diff changeset
   274
    "setup class constants"
10af98758a49 added dummy Scale & InverseScale classVars.
Claus Gittinger <cg@exept.de>
parents: 2377
diff changeset
   275
10af98758a49 added dummy Scale & InverseScale classVars.
Claus Gittinger <cg@exept.de>
parents: 2377
diff changeset
   276
    "/ these are note used in ST/X;
10af98758a49 added dummy Scale & InverseScale classVars.
Claus Gittinger <cg@exept.de>
parents: 2377
diff changeset
   277
    "/ (acc. to a testers note, ST-80 internally uses
10af98758a49 added dummy Scale & InverseScale classVars.
Claus Gittinger <cg@exept.de>
parents: 2377
diff changeset
   278
    "/  integer valued coordinates, scaling coordinates by
10af98758a49 added dummy Scale & InverseScale classVars.
Claus Gittinger <cg@exept.de>
parents: 2377
diff changeset
   279
    "/  the Scale constant. ST/X does not do this. However,
2382
78182edd332e checkin from browser
Claus Gittinger <cg@exept.de>
parents: 2381
diff changeset
   280
    "/  user supplied subclasses may depend on those values being
2381
10af98758a49 added dummy Scale & InverseScale classVars.
Claus Gittinger <cg@exept.de>
parents: 2377
diff changeset
   281
    "/  present ...)
10af98758a49 added dummy Scale & InverseScale classVars.
Claus Gittinger <cg@exept.de>
parents: 2377
diff changeset
   282
10af98758a49 added dummy Scale & InverseScale classVars.
Claus Gittinger <cg@exept.de>
parents: 2377
diff changeset
   283
    Scale := 4096.
10af98758a49 added dummy Scale & InverseScale classVars.
Claus Gittinger <cg@exept.de>
parents: 2377
diff changeset
   284
    InverseScale := 1.0 / Scale
10af98758a49 added dummy Scale & InverseScale classVars.
Claus Gittinger <cg@exept.de>
parents: 2377
diff changeset
   285
10af98758a49 added dummy Scale & InverseScale classVars.
Claus Gittinger <cg@exept.de>
parents: 2377
diff changeset
   286
    "
10af98758a49 added dummy Scale & InverseScale classVars.
Claus Gittinger <cg@exept.de>
parents: 2377
diff changeset
   287
     Geometric initialize
10af98758a49 added dummy Scale & InverseScale classVars.
Claus Gittinger <cg@exept.de>
parents: 2377
diff changeset
   288
    "
10af98758a49 added dummy Scale & InverseScale classVars.
Claus Gittinger <cg@exept.de>
parents: 2377
diff changeset
   289
2382
78182edd332e checkin from browser
Claus Gittinger <cg@exept.de>
parents: 2381
diff changeset
   290
    "Modified: 12.2.1997 / 14:11:49 / cg"
2381
10af98758a49 added dummy Scale & InverseScale classVars.
Claus Gittinger <cg@exept.de>
parents: 2377
diff changeset
   291
! !
10af98758a49 added dummy Scale & InverseScale classVars.
Claus Gittinger <cg@exept.de>
parents: 2377
diff changeset
   292
10af98758a49 added dummy Scale & InverseScale classVars.
Claus Gittinger <cg@exept.de>
parents: 2377
diff changeset
   293
!Geometric class methodsFor:'helper functions'!
10af98758a49 added dummy Scale & InverseScale classVars.
Claus Gittinger <cg@exept.de>
parents: 2377
diff changeset
   294
10af98758a49 added dummy Scale & InverseScale classVars.
Claus Gittinger <cg@exept.de>
parents: 2377
diff changeset
   295
boundingRectangleForPoints:aSequencableCollectionOfPoints
10af98758a49 added dummy Scale & InverseScale classVars.
Claus Gittinger <cg@exept.de>
parents: 2377
diff changeset
   296
    "given a bunch of point, compute the boundingRectangle
10af98758a49 added dummy Scale & InverseScale classVars.
Claus Gittinger <cg@exept.de>
parents: 2377
diff changeset
   297
     (i.e. the smallest rectangle which encloses all of those points)"
10af98758a49 added dummy Scale & InverseScale classVars.
Claus Gittinger <cg@exept.de>
parents: 2377
diff changeset
   298
10af98758a49 added dummy Scale & InverseScale classVars.
Claus Gittinger <cg@exept.de>
parents: 2377
diff changeset
   299
    |p minX minY maxX maxY n "{ Class: SmallInteger }"
10af98758a49 added dummy Scale & InverseScale classVars.
Claus Gittinger <cg@exept.de>
parents: 2377
diff changeset
   300
     x y |
10af98758a49 added dummy Scale & InverseScale classVars.
Claus Gittinger <cg@exept.de>
parents: 2377
diff changeset
   301
10af98758a49 added dummy Scale & InverseScale classVars.
Claus Gittinger <cg@exept.de>
parents: 2377
diff changeset
   302
    p := aSequencableCollectionOfPoints first.
10af98758a49 added dummy Scale & InverseScale classVars.
Claus Gittinger <cg@exept.de>
parents: 2377
diff changeset
   303
    minX := maxX := p x.
10af98758a49 added dummy Scale & InverseScale classVars.
Claus Gittinger <cg@exept.de>
parents: 2377
diff changeset
   304
    minY := maxY := p y.
10af98758a49 added dummy Scale & InverseScale classVars.
Claus Gittinger <cg@exept.de>
parents: 2377
diff changeset
   305
10af98758a49 added dummy Scale & InverseScale classVars.
Claus Gittinger <cg@exept.de>
parents: 2377
diff changeset
   306
    n := aSequencableCollectionOfPoints size.
10af98758a49 added dummy Scale & InverseScale classVars.
Claus Gittinger <cg@exept.de>
parents: 2377
diff changeset
   307
    1 to:n do:[:idx | 
10af98758a49 added dummy Scale & InverseScale classVars.
Claus Gittinger <cg@exept.de>
parents: 2377
diff changeset
   308
        p := aSequencableCollectionOfPoints at:idx.
10af98758a49 added dummy Scale & InverseScale classVars.
Claus Gittinger <cg@exept.de>
parents: 2377
diff changeset
   309
        x := p x.
10af98758a49 added dummy Scale & InverseScale classVars.
Claus Gittinger <cg@exept.de>
parents: 2377
diff changeset
   310
        y := p y.
10af98758a49 added dummy Scale & InverseScale classVars.
Claus Gittinger <cg@exept.de>
parents: 2377
diff changeset
   311
        x < minX ifTrue:[
10af98758a49 added dummy Scale & InverseScale classVars.
Claus Gittinger <cg@exept.de>
parents: 2377
diff changeset
   312
            minX := x
10af98758a49 added dummy Scale & InverseScale classVars.
Claus Gittinger <cg@exept.de>
parents: 2377
diff changeset
   313
        ] ifFalse:[
10af98758a49 added dummy Scale & InverseScale classVars.
Claus Gittinger <cg@exept.de>
parents: 2377
diff changeset
   314
            x > maxX ifTrue:[
10af98758a49 added dummy Scale & InverseScale classVars.
Claus Gittinger <cg@exept.de>
parents: 2377
diff changeset
   315
                maxX := x
10af98758a49 added dummy Scale & InverseScale classVars.
Claus Gittinger <cg@exept.de>
parents: 2377
diff changeset
   316
            ]
10af98758a49 added dummy Scale & InverseScale classVars.
Claus Gittinger <cg@exept.de>
parents: 2377
diff changeset
   317
        ].
10af98758a49 added dummy Scale & InverseScale classVars.
Claus Gittinger <cg@exept.de>
parents: 2377
diff changeset
   318
        y < minY ifTrue:[
10af98758a49 added dummy Scale & InverseScale classVars.
Claus Gittinger <cg@exept.de>
parents: 2377
diff changeset
   319
            minY := y
10af98758a49 added dummy Scale & InverseScale classVars.
Claus Gittinger <cg@exept.de>
parents: 2377
diff changeset
   320
        ] ifFalse:[
10af98758a49 added dummy Scale & InverseScale classVars.
Claus Gittinger <cg@exept.de>
parents: 2377
diff changeset
   321
            y > maxY ifTrue:[
10af98758a49 added dummy Scale & InverseScale classVars.
Claus Gittinger <cg@exept.de>
parents: 2377
diff changeset
   322
                maxY := y
10af98758a49 added dummy Scale & InverseScale classVars.
Claus Gittinger <cg@exept.de>
parents: 2377
diff changeset
   323
            ]
10af98758a49 added dummy Scale & InverseScale classVars.
Claus Gittinger <cg@exept.de>
parents: 2377
diff changeset
   324
        ].
10af98758a49 added dummy Scale & InverseScale classVars.
Claus Gittinger <cg@exept.de>
parents: 2377
diff changeset
   325
    ].
10af98758a49 added dummy Scale & InverseScale classVars.
Claus Gittinger <cg@exept.de>
parents: 2377
diff changeset
   326
10af98758a49 added dummy Scale & InverseScale classVars.
Claus Gittinger <cg@exept.de>
parents: 2377
diff changeset
   327
    ^ Rectangle left:minX top:minY right:maxX bottom:maxY
10af98758a49 added dummy Scale & InverseScale classVars.
Claus Gittinger <cg@exept.de>
parents: 2377
diff changeset
   328
10af98758a49 added dummy Scale & InverseScale classVars.
Claus Gittinger <cg@exept.de>
parents: 2377
diff changeset
   329
    "Modified: 12.2.1997 / 12:10:12 / cg"
10af98758a49 added dummy Scale & InverseScale classVars.
Claus Gittinger <cg@exept.de>
parents: 2377
diff changeset
   330
! !
10af98758a49 added dummy Scale & InverseScale classVars.
Claus Gittinger <cg@exept.de>
parents: 2377
diff changeset
   331
1350
85eec07b093b doku, comments, examples & more functionality
Claus Gittinger <cg@exept.de>
parents: 1314
diff changeset
   332
!Geometric methodsFor:'converting'!
85eec07b093b doku, comments, examples & more functionality
Claus Gittinger <cg@exept.de>
parents: 1314
diff changeset
   333
85eec07b093b doku, comments, examples & more functionality
Claus Gittinger <cg@exept.de>
parents: 1314
diff changeset
   334
asFiller
1353
cab0fdd4f08e checkin from browser
Claus Gittinger <cg@exept.de>
parents: 1350
diff changeset
   335
    "return a wrapper which displays the receiver in its filled form"
1350
85eec07b093b doku, comments, examples & more functionality
Claus Gittinger <cg@exept.de>
parents: 1314
diff changeset
   336
2381
10af98758a49 added dummy Scale & InverseScale classVars.
Claus Gittinger <cg@exept.de>
parents: 2377
diff changeset
   337
    self canBeFilled ifTrue:[
10af98758a49 added dummy Scale & InverseScale classVars.
Claus Gittinger <cg@exept.de>
parents: 2377
diff changeset
   338
        ^ FillingWrapper on:self
10af98758a49 added dummy Scale & InverseScale classVars.
Claus Gittinger <cg@exept.de>
parents: 2377
diff changeset
   339
    ].
10af98758a49 added dummy Scale & InverseScale classVars.
Claus Gittinger <cg@exept.de>
parents: 2377
diff changeset
   340
    ^ self shouldNotImplement
1350
85eec07b093b doku, comments, examples & more functionality
Claus Gittinger <cg@exept.de>
parents: 1314
diff changeset
   341
6065
f30cdb1edc0c comment
Claus Gittinger <cg@exept.de>
parents: 5570
diff changeset
   342
    "
f30cdb1edc0c comment
Claus Gittinger <cg@exept.de>
parents: 5570
diff changeset
   343
     |v r|
f30cdb1edc0c comment
Claus Gittinger <cg@exept.de>
parents: 5570
diff changeset
   344
f30cdb1edc0c comment
Claus Gittinger <cg@exept.de>
parents: 5570
diff changeset
   345
     v := View new.
f30cdb1edc0c comment
Claus Gittinger <cg@exept.de>
parents: 5570
diff changeset
   346
     v extent:200@200.
f30cdb1edc0c comment
Claus Gittinger <cg@exept.de>
parents: 5570
diff changeset
   347
     v openAndWait.
f30cdb1edc0c comment
Claus Gittinger <cg@exept.de>
parents: 5570
diff changeset
   348
     r := Rectangle origin:10@10 corner:100@100.
f30cdb1edc0c comment
Claus Gittinger <cg@exept.de>
parents: 5570
diff changeset
   349
     r asFiller displayOn:v.
f30cdb1edc0c comment
Claus Gittinger <cg@exept.de>
parents: 5570
diff changeset
   350
    "
f30cdb1edc0c comment
Claus Gittinger <cg@exept.de>
parents: 5570
diff changeset
   351
2381
10af98758a49 added dummy Scale & InverseScale classVars.
Claus Gittinger <cg@exept.de>
parents: 2377
diff changeset
   352
    "Modified: 12.2.1997 / 11:47:22 / cg"
1350
85eec07b093b doku, comments, examples & more functionality
Claus Gittinger <cg@exept.de>
parents: 1314
diff changeset
   353
!
85eec07b093b doku, comments, examples & more functionality
Claus Gittinger <cg@exept.de>
parents: 1314
diff changeset
   354
85eec07b093b doku, comments, examples & more functionality
Claus Gittinger <cg@exept.de>
parents: 1314
diff changeset
   355
asRectangle
85eec07b093b doku, comments, examples & more functionality
Claus Gittinger <cg@exept.de>
parents: 1314
diff changeset
   356
    "return the enclosing rectangle; same as #bounds"
85eec07b093b doku, comments, examples & more functionality
Claus Gittinger <cg@exept.de>
parents: 1314
diff changeset
   357
85eec07b093b doku, comments, examples & more functionality
Claus Gittinger <cg@exept.de>
parents: 1314
diff changeset
   358
    ^ self bounds
85eec07b093b doku, comments, examples & more functionality
Claus Gittinger <cg@exept.de>
parents: 1314
diff changeset
   359
85eec07b093b doku, comments, examples & more functionality
Claus Gittinger <cg@exept.de>
parents: 1314
diff changeset
   360
    "Created: 8.5.1996 / 14:36:35 / cg"
85eec07b093b doku, comments, examples & more functionality
Claus Gittinger <cg@exept.de>
parents: 1314
diff changeset
   361
!
85eec07b093b doku, comments, examples & more functionality
Claus Gittinger <cg@exept.de>
parents: 1314
diff changeset
   362
85eec07b093b doku, comments, examples & more functionality
Claus Gittinger <cg@exept.de>
parents: 1314
diff changeset
   363
asStroker
1353
cab0fdd4f08e checkin from browser
Claus Gittinger <cg@exept.de>
parents: 1350
diff changeset
   364
    "return a wrapper which displays the receiver as stroked outline"
1350
85eec07b093b doku, comments, examples & more functionality
Claus Gittinger <cg@exept.de>
parents: 1314
diff changeset
   365
85eec07b093b doku, comments, examples & more functionality
Claus Gittinger <cg@exept.de>
parents: 1314
diff changeset
   366
    ^ StrokingWrapper on:self
85eec07b093b doku, comments, examples & more functionality
Claus Gittinger <cg@exept.de>
parents: 1314
diff changeset
   367
85eec07b093b doku, comments, examples & more functionality
Claus Gittinger <cg@exept.de>
parents: 1314
diff changeset
   368
    "Created: 8.5.1996 / 14:38:09 / cg"
1353
cab0fdd4f08e checkin from browser
Claus Gittinger <cg@exept.de>
parents: 1350
diff changeset
   369
    "Modified: 8.5.1996 / 18:23:00 / cg"
2377
83a8f10a1234 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 2376
diff changeset
   370
!
83a8f10a1234 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 2376
diff changeset
   371
4352
65a2c4a05292 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 2382
diff changeset
   372
asVisualComponent
65a2c4a05292 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 2382
diff changeset
   373
    "return a wrapper on the receiver, which responds to VisualComponent messages."
65a2c4a05292 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 2382
diff changeset
   374
2377
83a8f10a1234 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 2376
diff changeset
   375
    ^ self asStroker
83a8f10a1234 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 2376
diff changeset
   376
83a8f10a1234 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 2376
diff changeset
   377
    "Created: 10.2.1997 / 12:04:27 / cg"
356
claus
parents:
diff changeset
   378
! !
claus
parents:
diff changeset
   379
claus
parents:
diff changeset
   380
!Geometric methodsFor:'displaying'!
claus
parents:
diff changeset
   381
7083
16019f54bdb8 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 6925
diff changeset
   382
ascentOn:aGC
16019f54bdb8 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 6925
diff changeset
   383
    "displayOn: does not draw above baseline"
16019f54bdb8 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 6925
diff changeset
   384
16019f54bdb8 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 6925
diff changeset
   385
    ^ 0
16019f54bdb8 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 6925
diff changeset
   386
!
16019f54bdb8 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 6925
diff changeset
   387
610
cadd76cb5fb0 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 530
diff changeset
   388
displayFilledOn:aGC
cadd76cb5fb0 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 530
diff changeset
   389
    "display myself filled on a graphicsContext; the current graphics
cadd76cb5fb0 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 530
diff changeset
   390
     attributes are used. Since we do not know how to do it, nothing is
cadd76cb5fb0 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 530
diff changeset
   391
     drawn here."
cadd76cb5fb0 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 530
diff changeset
   392
1350
85eec07b093b doku, comments, examples & more functionality
Claus Gittinger <cg@exept.de>
parents: 1314
diff changeset
   393
    ^ self subclassResponsibility
610
cadd76cb5fb0 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 530
diff changeset
   394
6065
f30cdb1edc0c comment
Claus Gittinger <cg@exept.de>
parents: 5570
diff changeset
   395
    "
f30cdb1edc0c comment
Claus Gittinger <cg@exept.de>
parents: 5570
diff changeset
   396
     |v r|
f30cdb1edc0c comment
Claus Gittinger <cg@exept.de>
parents: 5570
diff changeset
   397
f30cdb1edc0c comment
Claus Gittinger <cg@exept.de>
parents: 5570
diff changeset
   398
     v := View new.
f30cdb1edc0c comment
Claus Gittinger <cg@exept.de>
parents: 5570
diff changeset
   399
     v extent:200@200.
f30cdb1edc0c comment
Claus Gittinger <cg@exept.de>
parents: 5570
diff changeset
   400
     v openAndWait.
f30cdb1edc0c comment
Claus Gittinger <cg@exept.de>
parents: 5570
diff changeset
   401
     r := Rectangle origin:10@10 corner:100@100.
f30cdb1edc0c comment
Claus Gittinger <cg@exept.de>
parents: 5570
diff changeset
   402
     r displayFilledOn:v.
f30cdb1edc0c comment
Claus Gittinger <cg@exept.de>
parents: 5570
diff changeset
   403
    "
f30cdb1edc0c comment
Claus Gittinger <cg@exept.de>
parents: 5570
diff changeset
   404
1350
85eec07b093b doku, comments, examples & more functionality
Claus Gittinger <cg@exept.de>
parents: 1314
diff changeset
   405
    "Modified: 8.5.1996 / 09:07:02 / cg"
610
cadd76cb5fb0 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 530
diff changeset
   406
!
cadd76cb5fb0 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 530
diff changeset
   407
6925
2b3cb570b7b8 displayOn confusion
Claus Gittinger <cg@exept.de>
parents: 6065
diff changeset
   408
displayOn:aGCOrStream
356
claus
parents:
diff changeset
   409
    "display myself on a graphicsContext; the current graphics
claus
parents:
diff changeset
   410
     attributes are used. The default here is to display the outline."
claus
parents:
diff changeset
   411
6925
2b3cb570b7b8 displayOn confusion
Claus Gittinger <cg@exept.de>
parents: 6065
diff changeset
   412
    "/ what a kludge - Dolphin and Squeak mean: printOn:;
2b3cb570b7b8 displayOn confusion
Claus Gittinger <cg@exept.de>
parents: 6065
diff changeset
   413
    "/ ST/X (and some old ST80's) mean: draw-yourself on.
2b3cb570b7b8 displayOn confusion
Claus Gittinger <cg@exept.de>
parents: 6065
diff changeset
   414
    (aGCOrStream isStream or:[aGCOrStream == Transcript]) ifTrue:[
2b3cb570b7b8 displayOn confusion
Claus Gittinger <cg@exept.de>
parents: 6065
diff changeset
   415
        ^ super displayOn:aGCOrStream
2b3cb570b7b8 displayOn confusion
Claus Gittinger <cg@exept.de>
parents: 6065
diff changeset
   416
    ].
2b3cb570b7b8 displayOn confusion
Claus Gittinger <cg@exept.de>
parents: 6065
diff changeset
   417
    ^ self displayStrokedOn:aGCOrStream
6065
f30cdb1edc0c comment
Claus Gittinger <cg@exept.de>
parents: 5570
diff changeset
   418
f30cdb1edc0c comment
Claus Gittinger <cg@exept.de>
parents: 5570
diff changeset
   419
    "
f30cdb1edc0c comment
Claus Gittinger <cg@exept.de>
parents: 5570
diff changeset
   420
     |v r|
f30cdb1edc0c comment
Claus Gittinger <cg@exept.de>
parents: 5570
diff changeset
   421
f30cdb1edc0c comment
Claus Gittinger <cg@exept.de>
parents: 5570
diff changeset
   422
     v := View new.
f30cdb1edc0c comment
Claus Gittinger <cg@exept.de>
parents: 5570
diff changeset
   423
     v extent:200@200.
f30cdb1edc0c comment
Claus Gittinger <cg@exept.de>
parents: 5570
diff changeset
   424
     v openAndWait.
f30cdb1edc0c comment
Claus Gittinger <cg@exept.de>
parents: 5570
diff changeset
   425
     r := Rectangle origin:10@10 corner:100@100.
f30cdb1edc0c comment
Claus Gittinger <cg@exept.de>
parents: 5570
diff changeset
   426
     r displayOn:v.
f30cdb1edc0c comment
Claus Gittinger <cg@exept.de>
parents: 5570
diff changeset
   427
    "
356
claus
parents:
diff changeset
   428
!
claus
parents:
diff changeset
   429
claus
parents:
diff changeset
   430
displayStrokedOn:aGC
claus
parents:
diff changeset
   431
    "display my outline on a graphicsContext; the current graphics
1357
c3681028c7f4 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 1355
diff changeset
   432
     attributes are used. Since we do not know how to do it, nothing is
356
claus
parents:
diff changeset
   433
     drawn here."
claus
parents:
diff changeset
   434
1350
85eec07b093b doku, comments, examples & more functionality
Claus Gittinger <cg@exept.de>
parents: 1314
diff changeset
   435
    ^ self subclassResponsibility
85eec07b093b doku, comments, examples & more functionality
Claus Gittinger <cg@exept.de>
parents: 1314
diff changeset
   436
1357
c3681028c7f4 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 1355
diff changeset
   437
    "Modified: 8.5.1996 / 21:20:19 / cg"
1350
85eec07b093b doku, comments, examples & more functionality
Claus Gittinger <cg@exept.de>
parents: 1314
diff changeset
   438
! !
85eec07b093b doku, comments, examples & more functionality
Claus Gittinger <cg@exept.de>
parents: 1314
diff changeset
   439
85eec07b093b doku, comments, examples & more functionality
Claus Gittinger <cg@exept.de>
parents: 1314
diff changeset
   440
!Geometric methodsFor:'queries'!
356
claus
parents:
diff changeset
   441
1350
85eec07b093b doku, comments, examples & more functionality
Claus Gittinger <cg@exept.de>
parents: 1314
diff changeset
   442
bounds
2381
10af98758a49 added dummy Scale & InverseScale classVars.
Claus Gittinger <cg@exept.de>
parents: 2377
diff changeset
   443
    "return the smallest enclosing rectangle.
10af98758a49 added dummy Scale & InverseScale classVars.
Claus Gittinger <cg@exept.de>
parents: 2377
diff changeset
   444
     This resends computeBounds, to allow caching of bounds in
10af98758a49 added dummy Scale & InverseScale classVars.
Claus Gittinger <cg@exept.de>
parents: 2377
diff changeset
   445
     case this computation is expensive."
1350
85eec07b093b doku, comments, examples & more functionality
Claus Gittinger <cg@exept.de>
parents: 1314
diff changeset
   446
2381
10af98758a49 added dummy Scale & InverseScale classVars.
Claus Gittinger <cg@exept.de>
parents: 2377
diff changeset
   447
    ^ self computeBounds
1350
85eec07b093b doku, comments, examples & more functionality
Claus Gittinger <cg@exept.de>
parents: 1314
diff changeset
   448
85eec07b093b doku, comments, examples & more functionality
Claus Gittinger <cg@exept.de>
parents: 1314
diff changeset
   449
    "Created: 8.5.1996 / 13:56:08 / cg"
2381
10af98758a49 added dummy Scale & InverseScale classVars.
Claus Gittinger <cg@exept.de>
parents: 2377
diff changeset
   450
    "Modified: 12.2.1997 / 11:41:38 / cg"
1446
fabdc1d2598c added #canBeFilled for protocol completeness
Claus Gittinger <cg@exept.de>
parents: 1390
diff changeset
   451
!
fabdc1d2598c added #canBeFilled for protocol completeness
Claus Gittinger <cg@exept.de>
parents: 1390
diff changeset
   452
fabdc1d2598c added #canBeFilled for protocol completeness
Claus Gittinger <cg@exept.de>
parents: 1390
diff changeset
   453
canBeFilled
fabdc1d2598c added #canBeFilled for protocol completeness
Claus Gittinger <cg@exept.de>
parents: 1390
diff changeset
   454
    "return true, if the receiver can be drawn as a filled geometric.
fabdc1d2598c added #canBeFilled for protocol completeness
Claus Gittinger <cg@exept.de>
parents: 1390
diff changeset
   455
     Return false here, since we dont know."
fabdc1d2598c added #canBeFilled for protocol completeness
Claus Gittinger <cg@exept.de>
parents: 1390
diff changeset
   456
fabdc1d2598c added #canBeFilled for protocol completeness
Claus Gittinger <cg@exept.de>
parents: 1390
diff changeset
   457
    ^ false
fabdc1d2598c added #canBeFilled for protocol completeness
Claus Gittinger <cg@exept.de>
parents: 1390
diff changeset
   458
fabdc1d2598c added #canBeFilled for protocol completeness
Claus Gittinger <cg@exept.de>
parents: 1390
diff changeset
   459
    "Created: 1.6.1996 / 11:28:58 / cg"
2376
d4326d046be4 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 1446
diff changeset
   460
!
d4326d046be4 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 1446
diff changeset
   461
2381
10af98758a49 added dummy Scale & InverseScale classVars.
Claus Gittinger <cg@exept.de>
parents: 2377
diff changeset
   462
computeBounds
10af98758a49 added dummy Scale & InverseScale classVars.
Claus Gittinger <cg@exept.de>
parents: 2377
diff changeset
   463
    "return the smallest enclosing rectangle."
10af98758a49 added dummy Scale & InverseScale classVars.
Claus Gittinger <cg@exept.de>
parents: 2377
diff changeset
   464
10af98758a49 added dummy Scale & InverseScale classVars.
Claus Gittinger <cg@exept.de>
parents: 2377
diff changeset
   465
    ^ self subclassResponsibility
10af98758a49 added dummy Scale & InverseScale classVars.
Claus Gittinger <cg@exept.de>
parents: 2377
diff changeset
   466
10af98758a49 added dummy Scale & InverseScale classVars.
Claus Gittinger <cg@exept.de>
parents: 2377
diff changeset
   467
    "Created: 12.2.1997 / 11:41:58 / cg"
10af98758a49 added dummy Scale & InverseScale classVars.
Claus Gittinger <cg@exept.de>
parents: 2377
diff changeset
   468
!
10af98758a49 added dummy Scale & InverseScale classVars.
Claus Gittinger <cg@exept.de>
parents: 2377
diff changeset
   469
4352
65a2c4a05292 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 2382
diff changeset
   470
outlineIntersects:aRectangle
2376
d4326d046be4 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 1446
diff changeset
   471
    "return true, if the receivers image intersects
d4326d046be4 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 1446
diff changeset
   472
     aRectangle, when drawn as an outline.
d4326d046be4 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 1446
diff changeset
   473
     Here, all we can do is to ask the boundary rectangle;
d4326d046be4 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 1446
diff changeset
   474
     subclasses should reimplement better checks."
4352
65a2c4a05292 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 2382
diff changeset
   475
2376
d4326d046be4 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 1446
diff changeset
   476
    ^ self bounds intersects:aRectangle
d4326d046be4 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 1446
diff changeset
   477
d4326d046be4 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 1446
diff changeset
   478
    "Modified: 10.2.1997 / 13:40:36 / cg"
d4326d046be4 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 1446
diff changeset
   479
!
d4326d046be4 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 1446
diff changeset
   480
4352
65a2c4a05292 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 2382
diff changeset
   481
regionIntersects:aRectangle
2376
d4326d046be4 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 1446
diff changeset
   482
    "return true, if the receivers image intersects
d4326d046be4 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 1446
diff changeset
   483
     aRectangle, when drawn as a filled version.
d4326d046be4 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 1446
diff changeset
   484
     Here, all we can do is to ask the boundary rectangle;
d4326d046be4 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 1446
diff changeset
   485
     subclasses should reimplement better checks."
4352
65a2c4a05292 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 2382
diff changeset
   486
2376
d4326d046be4 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 1446
diff changeset
   487
    ^ self bounds intersects:aRectangle
d4326d046be4 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 1446
diff changeset
   488
d4326d046be4 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 1446
diff changeset
   489
    "Modified: 10.2.1997 / 13:40:00 / cg"
356
claus
parents:
diff changeset
   490
! !
claus
parents:
diff changeset
   491
4352
65a2c4a05292 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 2382
diff changeset
   492
!Geometric methodsFor:'testing'!
65a2c4a05292 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 2382
diff changeset
   493
65a2c4a05292 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 2382
diff changeset
   494
isBezier2Segment
65a2c4a05292 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 2382
diff changeset
   495
    "return true, if the receiver is a quadratic bezier segment"
65a2c4a05292 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 2382
diff changeset
   496
65a2c4a05292 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 2382
diff changeset
   497
    ^ false
65a2c4a05292 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 2382
diff changeset
   498
!
65a2c4a05292 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 2382
diff changeset
   499
65a2c4a05292 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 2382
diff changeset
   500
isLineSegment
65a2c4a05292 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 2382
diff changeset
   501
    "return true, if the receiver is a line segment"
65a2c4a05292 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 2382
diff changeset
   502
65a2c4a05292 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 2382
diff changeset
   503
    ^ false
65a2c4a05292 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 2382
diff changeset
   504
! !
65a2c4a05292 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 2382
diff changeset
   505
5570
e6e14f50d721 category change
Claus Gittinger <cg@exept.de>
parents: 4352
diff changeset
   506
!Geometric methodsFor:'transformations'!
2377
83a8f10a1234 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 2376
diff changeset
   507
4352
65a2c4a05292 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 2382
diff changeset
   508
scaledBy:scaleAmount 
2377
83a8f10a1234 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 2376
diff changeset
   509
    "return a copy of the receiver, which is scaled by the argument,
83a8f10a1234 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 2376
diff changeset
   510
     a point or number"
4352
65a2c4a05292 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 2382
diff changeset
   511
2377
83a8f10a1234 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 2376
diff changeset
   512
    ^ self subclassResponsibility
83a8f10a1234 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 2376
diff changeset
   513
83a8f10a1234 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 2376
diff changeset
   514
    "Created: 10.2.1997 / 12:05:45 / cg"
83a8f10a1234 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 2376
diff changeset
   515
!
83a8f10a1234 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 2376
diff changeset
   516
4352
65a2c4a05292 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 2382
diff changeset
   517
translatedBy:scaleAmount 
2377
83a8f10a1234 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 2376
diff changeset
   518
    "return a copy of the receiver, which is translated by the argument,
83a8f10a1234 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 2376
diff changeset
   519
     a point or number"
4352
65a2c4a05292 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 2382
diff changeset
   520
2377
83a8f10a1234 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 2376
diff changeset
   521
    ^ self subclassResponsibility
83a8f10a1234 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 2376
diff changeset
   522
83a8f10a1234 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 2376
diff changeset
   523
    "Created: 10.2.1997 / 12:05:56 / cg"
83a8f10a1234 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 2376
diff changeset
   524
! !
83a8f10a1234 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 2376
diff changeset
   525
637
f71df465819c version at the end
Claus Gittinger <cg@exept.de>
parents: 610
diff changeset
   526
!Geometric class methodsFor:'documentation'!
f71df465819c version at the end
Claus Gittinger <cg@exept.de>
parents: 610
diff changeset
   527
f71df465819c version at the end
Claus Gittinger <cg@exept.de>
parents: 610
diff changeset
   528
version
7582
279c8f991809 category
Claus Gittinger <cg@exept.de>
parents: 7083
diff changeset
   529
    ^ '$Header: /cvs/stx/stx/libbasic/Geometric.st,v 1.30 2003-08-29 17:32:16 cg Exp $'
637
f71df465819c version at the end
Claus Gittinger <cg@exept.de>
parents: 610
diff changeset
   530
! !
6925
2b3cb570b7b8 displayOn confusion
Claus Gittinger <cg@exept.de>
parents: 6065
diff changeset
   531
2381
10af98758a49 added dummy Scale & InverseScale classVars.
Claus Gittinger <cg@exept.de>
parents: 2377
diff changeset
   532
Geometric initialize!