This question is answered.


Permlink Replies: 15 - Pages: 2 [ Previous | 1 2 ] - Last Post: 5 Nov 19, 15:36 Last Post By: AndreWolff
AndreWolff

Posts: 1,289
Registered: 14-Dec-2007
Re: How to use the XBorderFilter in a skin to make borders of constant width?
Posted: 5 Nov 19, 15:34   in response to: JeffTucker in response to: JeffTucker
 
  Click to reply to this thread Reply
jGromit wrote:
First, forget about "transparency." These are JPG's. JPG's don't have transparency. The "transparency" in the XBF settings is a different animal, where you actually have to provide the background color. They make sense only with things like a drop-shadow. For your padding, just give it the same color as the page background.
Thanks for the explanation.
Second, use the "set" syntax, rather than trying to use xbf.frameCol = frameColors.
Yes indeed, that works also. Strange that JAVA allows two different expressions for the same action.
Finally, when you use XBF to create a radius, the resulting JPG is still square, like all JPG's - it doesn't have some sort of magical "transparency" at the corners. So, you have to tell XBF what color to use to fill in the corner.
Correct, by adding xbf.setBgCol(backgroundColor); I get rounded outher corners as you see also with CSS. See here the result.
I use now this code:
if (slidePadding>0) {
  XBorderFilter xbf = new XBorderFilter();
  xbf.setFrWidth(Integer.toString(slidePadding));
  xbf.setFrCol( backgroundColor);
  xbf.setClip(slideRadius);
  engine.addFilter(xbf,JAFilter.CLOSEUPS_POSTSCALE_STAGE);
}
 
XBorderFilter xbf = new XBorderFilter();
xbf.setFrWidth(Integer.toString(borderWidth));
xbf.setFrCol( imageBorderColor);
xbf.setBgCol(backgroundColor);
xbf.setClip(slideRadius);
engine.addFilter(xbf,JAFilter.CLOSEUPS_POSTSCALE_STAGE);

Thanks for your help>
Legend
Forum admins
Helpful Answer
Correct Answer

Point your RSS reader here for a feed of the latest messages in all forums