Geometric.st
author Claus Gittinger <cg@exept.de>
Thu, 23 Nov 1995 02:27:21 +0100
changeset 610 cadd76cb5fb0
parent 530 07d0bce293c9
child 637 f71df465819c
permissions -rw-r--r--
checkin from browser

"
 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 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.
"
!

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.
"
!

version
    ^ '$Header: /cvs/stx/stx/libbasic/Geometric.st,v 1.6 1995-11-23 01:27:21 cg Exp $'
! !

!Geometric methodsFor:'displaying'!

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
!

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
! !