Geometric.st
author claus
Thu, 10 Aug 1995 14:32:31 +0200
changeset 379 5b5a130ccd09
parent 356 6c5ce0e1e7a8
child 384 cc3d110ea879
permissions -rw-r--r--
revision added

"
 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.2 1995-08-10 12:28:22 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.2 1995-08-10 12:28:22 claus Exp $
$Revision: 1.2 $
"
!

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 have a superclass around, 
    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
! !