'From Squeak3.1alpha of 5 February 2001 [latest update: #4070] on 25 May 2001 at 1:46:48 am'! "Change Set: DropShadowFixes Date: 25 May 2001 Author: Dan Ingalls Prevent double drawing of drop-shadows of ellipses both to save time and to handle translucency correctly. Suppress separate drawing of border for shadows of polygons and curves. "! !EllipseMorph methodsFor: 'as yet unclassified' stamp: 'di 5/25/2001 01:37'! drawOn: aCanvas aCanvas isShadowDrawing ifTrue: [^ aCanvas fillOval: bounds fillStyle: self fillStyle borderWidth: 0 borderColor: nil]. aCanvas fillOval: bounds fillStyle: self fillStyle borderWidth: borderWidth borderColor: borderColor. ! ! !FormCanvas methodsFor: 'drawing-ovals' stamp: 'di 5/25/2001 01:40'! fillOval: r color: fillColor borderWidth: borderWidth borderColor: borderColor | rect | "draw the border of the oval" rect _ (r translateBy: origin) truncated. (borderWidth = 0 or: [borderColor isTransparent]) ifFalse:[ self setFillColor: borderColor. (r area > 10000 or: [fillColor isTranslucent]) ifTrue: [port frameOval: rect borderWidth: borderWidth] ifFalse: [port fillOval: rect]]. "faster this way" "fill the inside" fillColor isTransparent ifFalse: [self setFillColor: fillColor. port fillOval: (rect insetBy: borderWidth)]. ! ! !PolygonMorph methodsFor: 'drawing' stamp: 'di 5/25/2001 01:33'! drawOn: aCanvas "Display the receiver, a spline curve, approximated by straight line segments." | array | vertices size < 1 ifTrue: [self error: 'a polygon must have at least one point']. closed ifTrue: [aCanvas drawPolygon: self getVertices fillStyle: self fillStyle. aCanvas isShadowDrawing ifTrue: [^ self]]. array _ self drawArrowsOn: aCanvas. self drawBorderOn: aCanvas usingEnds: array. ! !