Independence Between Color Layer And Color Border In Krpano 1.18!!

  • I'd like to call attention to a new function implemented by klaus in KRpano 1.18, namely, borders for container layers, this function is really useful for us all but there's a bit of a problem with it in HTML5 because I can't manage colors independently between the layer and the border. I noticed that in flash they are totally independent, but in HTML5 the layer extends all the way to the end of the borders and it tints them in whatever color it is in, for example, my layer is red with a .5 alpha, it's border is black with .5 alpha, the result is that the border is a transparent mix between black and red. Again, in flash this doesn't occur, I can clearly see the red contained inside the layer and the border being totally blackish. I attach a picture of the issue hoping you can fix it:


    here's the code of the layer


    Thank you all who make this wonderful software the best there is.

    Alberto.

  • Hi!

    I wanted to test your case and found another interesting behaviour. If the layer like yours has rounded edges, then in Flash its inner part has rounded edges to the right and 90-degree edges to the left. In Chrome WebGL it behaves as intended. (See attached images).

    Here's the link to test:

    http://vt.most-inform.com/18/

  • Hi,

    but there's a bit of a problem with it in HTML5 because I can't manage colors independently between the layer and the border

    Hmm... changing that behavior in Flash to match HTML5 would be possible, but not the other way.

    In HTML5 the border will be simply drawn/set by CSS and there the border will be drawn on top of the background color so that both colors get mixed. Changing that behavior isn't possible.

    In Flash the background and the border are independent elements and both are drawn fully manually. There it would be possible to simulate the HTML5 behavior by manually mixing the background and the border colors.


    I wanted to test your case and found another interesting behaviour. If the layer like yours has rounded edges, then in Flash its inner part has rounded edges to the right and 90-degree edges to the left

    Thanks for the example - yes, the border calculations were a bit complicated . I will try to fix that case.

    Best regards,
    Klaus

  • Klaus, thanks!

    Of course I doubt if the "edge" was supposed to be used like the above examples. But anyway imrpoving functioanlity is good work!

    Alberto, Instead of waiting for 18.1 fixes (if you're short of time), I would use three container layers - two black ones and one red to fill the screen in your case.

    Regards,

    Alexey

  • Hi,

    both cases will be fixed in the next release (1.18.1).

    The first case with the 'wrong' border color in Flash, could be fixed manually by adding a 'bgroundedge' setting - even 0 as value would be okay:

    Code
    bgroundedge="0"

    When the bgroundedge setting was set, then already the a code path was chosen where the borders were drawn like in HTML5.

    Best regards,
    Klaus

  • Sorry to hear it can't be fixed :(

    Yes, I think I'll end up using three layers instead of one, you are right about it not being the most obvious use for borders, but it would have been so sweet hehe. Good day to you all!

Participate now!

Don’t have an account yet? Register yourself now and be a part of our community!