[UI] FillStyles in borders

Gary Chambers gazzaguru2 at btinternet.com
Fri Jun 27 14:09:28 UTC 2008


Perhaps a "clean" model coul;d be something for Pharo...

Maybe borders could be modelled via a decorator pattern to do away with some of these special cases.
(think fillWith: fillStyle clippingTo: generalClipShape)The border (itself a morph) being a decoration of the morph... or maybe not called morph in a generalised framework, though interpreted that way for Morphic support...

Then again, to go the full-hog, the "ordinates" idea should cover all bases (with adaptation to Morphic).

Just a thought.

Gary.

> -----Original Message-----
> From: ui-bounces at lists.squeakfoundation.org
> [mailto:ui-bounces at lists.squeakfoundation.org]On Behalf Of Igor Stasenko
> Sent: 27 June 2008 3:04 PM
> To: alain.plantec at univ-brest.fr; Squeak's User Interface
> Subject: Re: [UI] FillStyles in borders
> 
> 
> 2008/6/27 Alain Plantec <alain.plantec at univ-brest.fr>:
> > On Friday 27 June 2008 12:28:00 Gary Chambers wrote:
> >> The lastest (version Pinesoft-Widgets-gvc.324) of Widgets on 
> SqueakSource
> >> now has support for FillStyleBorder. Should also support use 
> of composite
> >> fill styles.
> > I like that. thanks.
> > Do you think it can be possible to get rid of old border styles 
> (inset, outset ...)
> > and replace them with FillStyleBorder together with a 
> GradientFillStyle ?
> > (by having 4 different fillstyles, each one for one side maybe ?).
> > alain
> 
> If it not slows things down a lot, then why not.
> In discussions with Gary we both agreed that it would be good if
> drawing primitives could be based on uniform model:
> any drawing operation can be represented by a function(shape, 
> arguments .. )
> 
> This update getting us closer to such representation.
> The number of supported functions currently are quite few:
> - draw with solid color
> - draw with gradient
> - draw with infinite form
> - draw with finite form (also known as blitting)
> 
> but its difficult to make a clean implementation on top of graphic
> primitives, which we currently have.
> Most of primitives are optimized for single kind of shape - line ,
> rectangle, ellipse. But none of them can use any shape as input.
> 
> >>
> >> Just for example:
> >>
> >> Morph new
> >>       extent: 200 at 150;
> >>       borderStyle: (FillStyleBorder new
> >>               width: 20;
> >>               fillStyle: ((GradientFillStyle
> >>                                       colors: {Color red. Color green})
> >>                                       origin: 0 at 0;
> >>                                       direction: 200 at 150));
> >>       openInHand
> >>
> >> Regards, Gary.
> >>
> > _______________________________________________
> > UI mailing list
> > UI at lists.squeakfoundation.org
> > http://lists.squeakfoundation.org/mailman/listinfo/ui
> >
> 
> 
> 
> -- 
> Best regards,
> Igor Stasenko AKA sig.
> _______________________________________________
> UI mailing list
> UI at lists.squeakfoundation.org
> http://lists.squeakfoundation.org/mailman/listinfo/ui
> 



More information about the UI mailing list