StandardFillPainter is the base class for all Radiance fill painters that wish to paint an emulated specular shine along the top part of the buttons and other components. Instead of encoding this functionality into that base class, extract it into a wrapper SpecularRectangularFillPainter that can accept any fill painter to then draw the specular shine on top of what that base fill painter does.
So instead of
this.fillPainter = new MatteFillPainter();
it becomes
this.fillPainter = new SpecularRectangularFillPainter(new MattePainter(), 1.0f);
Where the second parameter controls the alpha of the shine.
This is a followup to https://github.com/kirill-grouchnikov/radiance/issues/393 and https://github.com/kirill-grouchnikov/radiance/issues/427
StandardFillPainter
is the base class for all Radiance fill painters that wish to paint an emulated specular shine along the top part of the buttons and other components. Instead of encoding this functionality into that base class, extract it into a wrapperSpecularRectangularFillPainter
that can accept any fill painter to then draw the specular shine on top of what that base fill painter does.So instead of
it becomes
Where the second parameter controls the alpha of the shine.