The Trunk: Morphic-DS.916.mcz

Previous Topic Next Topic
 
classic Classic list List threaded Threaded
1 message Options
Reply | Threaded
Open this post in threaded view
|

The Trunk: Morphic-DS.916.mcz

commits-2
Nicolas Cellier uploaded a new version of Morphic to project The Trunk:
http://source.squeak.org/trunk/Morphic-DS.916.mcz

==================== Summary ====================

Name: Morphic-DS.916
Author: DS
Time: 22 April 2015, 11:33:53.08 am
UUID: e58e8bbb-7a37-954a-87a0-5e71904b55c2
Ancestors: Morphic-cmm.915

Add basic support for borderStyles with non-uniform widths.

=============== Diff against Morphic-cmm.915 ===============

Item was added:
+ ----- Method: BorderStyle>>inset (in category 'accessing') -----
+ inset
+ "Possible inset when honoring this border style. The default implementation uses #width to return a uniform inset."
+ ^ self width!

Item was changed:
  ----- Method: Canvas>>fillRectangle:fillStyle:borderStyle: (in category 'drawing-rectangles') -----
  fillRectangle: aRectangle fillStyle: aFillStyle borderStyle: aBorderStyle
  "Fill the given rectangle."
  aFillStyle isTransparent ifFalse:[
+ self fillRectangle: (aRectangle insetBy: aBorderStyle inset) fillStyle: aFillStyle].
- self fillRectangle: (aRectangle insetBy: aBorderStyle width) fillStyle: aFillStyle].
  aBorderStyle ifNil:[^self].
  aBorderStyle width <= 0 ifTrue:[^self].
+ aBorderStyle frameRectangle: aRectangle on: self.!
- aBorderStyle frameRectangle: aRectangle on: self
- !

Item was changed:
  ----- Method: Morph>>innerBounds (in category 'geometry') -----
  innerBounds
  "Return the inner rectangle enclosed by the bounds of this morph excluding the space taken by its borders. For an unbordered morph, this is just its bounds."
 
+ ^ self bounds insetBy: self borderStyle inset!
- ^ self bounds insetBy: self borderWidth!