2009/6/19 Wouter Snoei <mailinglists@xxxxxxxxxxxxxx>
Hi,
I'm trying to update my lib to reflect the deprication of
relativeOrigin, but stumbled across a problem: as soon as I set
relativeOrigin to false on a UserView, it doesn't draw outside its
borders anymore. This is problematic since I draw my own focus
rings around all my gui widgets. Even when I do a refreshInRect
with the correct bounds it still doesn't draw. Is this a bug or a
feature? And in any case; how to work around it?
(
w = Window().front;
w.addFlowLayout;
a = UserView( w, 100@100 ).relativeOrigin_(false)
.focusColor_( Color.clear )
.drawFunc_({ |vw|
var bounds = vw.bounds;
Pen.addRect( bounds.insetBy(-1,-1) );
Pen.line( bounds.leftTop, bounds.rightBottom );
Pen.line( bounds.rightTop, bounds.leftBottom );
Pen.stroke
});
b = UserView( w, 100@100 ).relativeOrigin_(true)
.focusColor_( Color.clear )
.drawFunc_({ |vw|
var bounds = vw.bounds.moveTo(0,0);
Pen.addRect( bounds.insetBy(-1,-1) ); // doesn't show!!
Pen.line( bounds.leftTop, bounds.rightBottom );
Pen.line( bounds.rightTop, bounds.leftBottom );
Pen.stroke
});
)
cheers,
Wouter
_______________________________________________
sc-users mailing list
info (subscription, etc.): http://www.beast.bham.ac.uk/research/
sc_mailing_lists.shtml
archive: https://listarc.bham.ac.uk/marchives/sc-users/
search: https://listarc.bham.ac.uk/lists/sc-users/search/
just a foot note
the swing gui behaves in this way, or I'm wrong?
Lucas