Geometric.st
author Claus Gittinger <cg@exept.de>
Sat, 27 Apr 1996 19:51:06 +0200
changeset 1314 18fabbc0e0a6
parent 1290 15ba3221b89b
child 1350 85eec07b093b
permissions -rw-r--r--
examples

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

    [author:]
        Claus Gittinger

    [see also:]
        Rectangle Polygon Point
"
! !

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

!Geometric class methodsFor:'documentation'!

version
    ^ '$Header: /cvs/stx/stx/libbasic/Geometric.st,v 1.10 1996-04-27 17:50:53 cg Exp $'
! !