Geometric.st
author Claus Gittinger <cg@exept.de>
Sat, 16 Dec 1995 14:04:33 +0100
changeset 778 afbb3ebde874
parent 637 f71df465819c
child 1283 2c533653efa3
permissions -rw-r--r--
commentary
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
610
cadd76cb5fb0 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 530
diff changeset
    13
Object subclass:#Geometric
cadd76cb5fb0 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 530
diff changeset
    14
	 instanceVariableNames:''
cadd76cb5fb0 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 530
diff changeset
    15
	 classVariableNames:''
cadd76cb5fb0 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 530
diff changeset
    16
	 poolDictionaries:''
cadd76cb5fb0 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 530
diff changeset
    17
	 category:'Graphics-Geometry'
356
claus
parents:
diff changeset
    18
!
claus
parents:
diff changeset
    19
claus
parents:
diff changeset
    20
!Geometric class methodsFor:'documentation'!
claus
parents:
diff changeset
    21
claus
parents:
diff changeset
    22
copyright
claus
parents:
diff changeset
    23
"
claus
parents:
diff changeset
    24
 COPYRIGHT (c) 1995 by Claus Gittinger
claus
parents:
diff changeset
    25
	      All Rights Reserved
claus
parents:
diff changeset
    26
claus
parents:
diff changeset
    27
 This software is furnished under a license and may be used
claus
parents:
diff changeset
    28
 only in accordance with the terms of that license and with the
claus
parents:
diff changeset
    29
 inclusion of the above copyright notice.   This software may not
claus
parents:
diff changeset
    30
 be provided or otherwise made available to, or used by, any
claus
parents:
diff changeset
    31
 other person.  No title to or ownership of the software is
claus
parents:
diff changeset
    32
 hereby transferred.
claus
parents:
diff changeset
    33
"
claus
parents:
diff changeset
    34
!
claus
parents:
diff changeset
    35
claus
parents:
diff changeset
    36
documentation
claus
parents:
diff changeset
    37
"
claus
parents:
diff changeset
    38
    Abstract superclass for geometric figures.
claus
parents:
diff changeset
    39
    Concrete classes are (currently) Rectangle, Polygon and the classes
claus
parents:
diff changeset
    40
    found in goodies/shape.
claus
parents:
diff changeset
    41
claus
parents:
diff changeset
    42
    These are not graphical objects, but pure mathematical ones.
claus
parents:
diff changeset
    43
    I.e. instances do not carry graphics attributes such as color, lineWidth etc.
claus
parents:
diff changeset
    44
    Use instances of (subclasses) of DisplayObject or (the soon to be 
claus
parents:
diff changeset
    45
    implemented GraphicsAttributesWrapper.
claus
parents:
diff changeset
    46
claus
parents:
diff changeset
    47
    Notice: ST/X does not use Geometric instances for drawing (yet).
399
claus
parents: 384
diff changeset
    48
    This class exists mainly to provide a superclass when ST-80 geometry classes are to be filed in.
356
claus
parents:
diff changeset
    49
"
claus
parents:
diff changeset
    50
! !
claus
parents:
diff changeset
    51
claus
parents:
diff changeset
    52
!Geometric methodsFor:'displaying'!
claus
parents:
diff changeset
    53
610
cadd76cb5fb0 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 530
diff changeset
    54
displayFilledOn:aGC
cadd76cb5fb0 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 530
diff changeset
    55
    "display myself filled on a graphicsContext; the current graphics
cadd76cb5fb0 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 530
diff changeset
    56
     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
    57
     drawn here."
cadd76cb5fb0 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 530
diff changeset
    58
cadd76cb5fb0 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 530
diff changeset
    59
"/ could be:
cadd76cb5fb0 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 530
diff changeset
    60
"/  ^ self subclassResponsibility
cadd76cb5fb0 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 530
diff changeset
    61
cadd76cb5fb0 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 530
diff changeset
    62
    ^ self
cadd76cb5fb0 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 530
diff changeset
    63
!
cadd76cb5fb0 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 530
diff changeset
    64
356
claus
parents:
diff changeset
    65
displayOn:aGC
claus
parents:
diff changeset
    66
    "display myself on a graphicsContext; the current graphics
claus
parents:
diff changeset
    67
     attributes are used. The default here is to display the outline."
claus
parents:
diff changeset
    68
claus
parents:
diff changeset
    69
    ^ self displayStrokedOn:aGC
claus
parents:
diff changeset
    70
!
claus
parents:
diff changeset
    71
claus
parents:
diff changeset
    72
displayStrokedOn:aGC
claus
parents:
diff changeset
    73
    "display my outline on a graphicsContext; the current graphics
claus
parents:
diff changeset
    74
     attributes are usedSince we do not know how to do it, nothing is
claus
parents:
diff changeset
    75
     drawn here."
claus
parents:
diff changeset
    76
claus
parents:
diff changeset
    77
"/ could be:
claus
parents:
diff changeset
    78
"/  ^ self subclassResponsibility
claus
parents:
diff changeset
    79
claus
parents:
diff changeset
    80
    ^ self
claus
parents:
diff changeset
    81
! !
claus
parents:
diff changeset
    82
637
f71df465819c version at the end
Claus Gittinger <cg@exept.de>
parents: 610
diff changeset
    83
!Geometric class methodsFor:'documentation'!
f71df465819c version at the end
Claus Gittinger <cg@exept.de>
parents: 610
diff changeset
    84
f71df465819c version at the end
Claus Gittinger <cg@exept.de>
parents: 610
diff changeset
    85
version
f71df465819c version at the end
Claus Gittinger <cg@exept.de>
parents: 610
diff changeset
    86
    ^ '$Header: /cvs/stx/stx/libbasic/Geometric.st,v 1.7 1995-11-23 17:42:25 cg Exp $'
f71df465819c version at the end
Claus Gittinger <cg@exept.de>
parents: 610
diff changeset
    87
! !