[squeak-dev] The Trunk: Morphic-bf.536.mcz

Nicolas Cellier nicolas.cellier.aka.nice at gmail.com
Sun May 8 20:28:19 UTC 2011


Thanks, I think that your workaround is more general and faster (no
intermediate Form created).
I hadn't play with BitBlt since the st80 ages, so it was funny, but I
have to catch up, display screen were B&W then ;)

Nicolas

2011/5/8  <commits at source.squeak.org>:
> Bert Freudenberg uploaded a new version of Morphic to project The Trunk:
> http://source.squeak.org/trunk/Morphic-bf.536.mcz
>
> ==================== Summary ====================
>
> Name: Morphic-bf.536
> Author: bf
> Time: 8 May 2011, 4:48:36.469 pm
> UUID: dacedb94-52f1-4f68-baee-7fb67b0630fb
> Ancestors: Morphic-nice.535
>
> Better fixAlpha fix for displaying 16 bit forms on a 32 bit target
>
> =============== Diff against Morphic-nice.535 ===============
>
> Item was changed:
>  ----- Method: Canvas>>translucentImage:at:sourceRect: (in category 'drawing-images') -----
>  translucentImage: aForm at: aPoint sourceRect: sourceRect
>        "Draw a translucent image using the best available way of representing translucency.
>        Note: This will be fixed in the future."
> +       self shadowColor ifNotNil:[
> -       self shadowColor ifNotNil: [
>                ^self stencil: aForm at: aPoint sourceRect: sourceRect color: self shadowColor].
> +       (self depth < 32 or:[aForm isTranslucent not])
> +               ifTrue:[^self paintImage: aForm at: aPoint sourceRect: sourceRect].
> -       (self depth < 32 or: [aForm depth < 16])
> -               ifTrue: [^self paintImage: aForm at: aPoint sourceRect: sourceRect].
> -       aForm depth = 16
> -               ifTrue:
> -                       ["workaround because BitBlt fail to fill the alpha channel"
> -                       ^self paintImage: (aForm asFormOfDepth: 32) at: aPoint sourceRect: sourceRect].
>        self image: aForm
>                at: aPoint
>                sourceRect: sourceRect
>                rule: Form blend!
>
> Item was changed:
>  ----- Method: FormCanvas>>image:at:sourceRect:rule: (in category 'private') -----
>  image: aForm at: aPoint sourceRect: sourceRect rule: rule
>        "Draw the portion of the given Form defined by sourceRect at the given point using the given BitBlt combination rule."
>        port colorMap: (aForm colormapIfNeededFor: form); fillColor: nil.
> +       port image: aForm at: aPoint + origin sourceRect: sourceRect rule: rule.
> +       (form depth = 32 and: [aForm depth = 16])
> +               ifTrue: [port image: nil at: aPoint + origin sourceRect: sourceRect rule: 40 "fixAlpha:with:"].
> + !
> -       port image: aForm at: aPoint + origin sourceRect: sourceRect rule: rule.!
>
>
>



More information about the Squeak-dev mailing list