This question is answered.

Permlink Replies: 15 - Pages: 2 [ Previous | 1 2 ] - Last Post: 05-Nov-2019 15:36 Last Post By: AndreWolff Threads: [ Previous | Next ]

Posts: 1,760
Registered: 14-Dec-2007
Re: How to use the XBorderFilter in a skin to make borders of constant width?
Posted: 05-Nov-2019 15:34   in response to: jGromit in response to: jGromit
  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.setFrCol( backgroundColor);
XBorderFilter xbf = new XBorderFilter();
xbf.setFrCol( imageBorderColor);

Thanks for your help>
Forum admins
Helpful Answer
Correct Answer

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