[squeak-dev] The Inbox: Morphic-DS.916.mcz

karl ramberg karlramberg at gmail.com
Tue May 12 08:56:26 UTC 2015


Maybe we need
SimpleBorder>>width
^width ifNil:[ ^0]

Karl

On Wed, Apr 22, 2015 at 11:34 AM, <commits at source.squeak.org> wrote:

> A new version of Morphic was added to project The Inbox:
> http://source.squeak.org/inbox/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!
>
>
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.squeakfoundation.org/pipermail/squeak-dev/attachments/20150512/ff279c4f/attachment.htm


More information about the Squeak-dev mailing list