Geometric.st
author Claus Gittinger <cg@exept.de>
Mon, 23 Oct 1995 17:55:03 +0100
changeset 443 fae13c0f1512
parent 399 c15cfaf3ed4d
child 530 07d0bce293c9
permissions -rw-r--r--
.

"
 COPYRIGHT (c) 1995 by Claus Gittinger
	      All Rights Reserved

 This software is furnished under a license and may be used
 only in accordance with the terms of that license and with the
 inclusion of the above copyright notice.   This software may not
 be provided or otherwise made available to, or used by, any
 other person.  No title to or ownership of the software is
 hereby transferred.
"

Object subclass:#Geometric 
       instanceVariableNames:''
       classVariableNames:''
       poolDictionaries:''
       category:'Graphics-Geometry'
!

Geometric comment:'
COPYRIGHT (c) 1995 by Claus Gittinger
	      All Rights Reserved

$Header: /cvs/stx/stx/libbasic/Geometric.st,v 1.4 1995-08-16 18:26:31 claus Exp $
'!

!Geometric class methodsFor:'documentation'!

copyright
"
 COPYRIGHT (c) 1995 by Claus Gittinger
	      All Rights Reserved

 This software is furnished under a license and may be used
 only in accordance with the terms of that license and with the
 inclusion of the above copyright notice.   This software may not
 be provided or otherwise made available to, or used by, any
 other person.  No title to or ownership of the software is
 hereby transferred.
"
!

version
"
$Header: /cvs/stx/stx/libbasic/Geometric.st,v 1.4 1995-08-16 18:26:31 claus Exp $
"
!

documentation
"
    Abstract superclass for geometric figures.
    Concrete classes are (currently) Rectangle, Polygon and the classes
    found in goodies/shape.

    These are not graphical objects, but pure mathematical ones.
    I.e. instances do not carry graphics attributes such as color, lineWidth etc.
    Use instances of (subclasses) of DisplayObject or (the soon to be 
    implemented GraphicsAttributesWrapper.

    Notice: ST/X does not use Geometric instances for drawing (yet).
    This class exists mainly to provide a superclass when ST-80 geometry classes are to be filed in.
"
! !

!Geometric methodsFor:'displaying'!

displayOn:aGC
    "display myself on a graphicsContext; the current graphics
     attributes are used. The default here is to display the outline."

    ^ self displayStrokedOn:aGC
!

displayStrokedOn:aGC
    "display my outline on a graphicsContext; the current graphics
     attributes are usedSince we do not know how to do it, nothing is
     drawn here."

"/ could be:
"/  ^ self subclassResponsibility

    ^ self
!

displayFilledOn:aGC
    "display myself filled on a graphicsContext; the current graphics
     attributes are used. Since we do not know how to do it, nothing is
     drawn here."

"/ could be:
"/  ^ self subclassResponsibility

    ^ self
! !