Squeak Class Documentation category index | class index  
 
CornerRounder
  category: Graphics-Display Objects
  superclass: Object
  subclasses:

This class is a quick hack to support rounded corners in morphic.

Rather than produce rounded rectangles, it tweaks the display of corners.
Rather than work for any radius, it only supports a radius of 6.
Rather than work for any border width, it only supports widths 0, 1 and 2.
The corners, while apparently transparent, still behave opaquely to mouse clicks.

Worse than this, the approach relies on the ability to extract underlying bits from the canvas prior to display. This ran afoul of top-down display, it seems, in SystemWindow spawnReframeHandle: (qv). It will also make a postscript printer very unhappy.

But, hey, it's cute.

instance methods
  all
  masterMask:masterOverlay:
saveBitsUnderCornersOf:on:
tweakCornersOf:on:borderWidth:corners:

class methods
  all
  initialize
rectWithinCornersOf:
roundCornersOf:on:displayBlock:borderWidth:corners:

instance methods
  all top  
 

masterMask:masterOverlay:


 

saveBitsUnderCornersOf:on:


 

tweakCornersOf:on:borderWidth:corners:

This variant has a cornerList argument, to allow some corners to be rounded and others not


class methods
  all top  
 

initialize

CornerRounder initialize


 

rectWithinCornersOf:

Return a single sub-rectangle that lies entirely inside corners
that are made by me.
Used to identify large regions of window that do not need to be redrawn.


 

roundCornersOf:on:displayBlock:borderWidth:corners: