PitBull Unit Frames 4.0

444 - Border textures stretched instead of tiled

What steps will reproduce the problem?
1. Apply any of the border styles available to a layout.
2. View the result along the top, bottom, right, and left edges closely.

What is the expected output? What do you see instead?
Since actual border textures are being used, I expect the edges to be tiled, the same way they would be if a backdrop were used. Stretching the textures instead of tiling is incosistent with how border textures are used everywhere else in the UI.

What version of the product are you using?

Do you have an error log of what happened?
No error is generated.

Please provide any additional information below.

User When Change
Stanzilla Aug 20, 2012 at 01:00 UTC Changed assigned to from ckknight to Shefki
Shefki Jul 18, 2009 at 20:01 UTC Changed status from New to Accepted
Nandini Jun 16, 2009 at 03:10 UTC Create

You must login to post a comment. Don't have an account? Register to get one!

  • Avatar of Shefki Shefki Mar 27, 2010 at 09:33 UTC - 0 likes

    Actually that's not true, you can tile within a single texture. SetTexCoord, if you use a coordinate > 1 then the texture is tiled and you pass the 2nd parameter as true when you do SetTexture. It's just not well documented. I'll get around to look into this eventually.

  • Avatar of Nandini Nandini Sep 16, 2009 at 14:35 UTC - 0 likes

    After further investigation, I've remembered why borders were implemented as a group of 8 textures rather than using the frame backdrop. Drawing the borders as a group of textures allows the borders to be "mirrored" according to the layout's preference. This can't be achieved using a backdrop border without supplying multiple variations of the border texture file, one for each possible mirroring.

    Also, with the modular nature of PB, drawing the border as a group of textures allows better control of the border's draw layer, to ensure that certain elements appear in front of or behind the border when they overlap.

    The only way to achieve tiling using a group of textures would be to create an additional variable number of texture objects for each of the sides and "manually" tile them. The number of texture objects required would vary based on the frame's height and width and the border's width. This is not a good approach in terms of resource usage, as there would be a performance penalty associated with layouts having larger frame sizes. (Imagine someone supplied a border texture with a width of 1. To go around a frame 180x60 pixels in size, 478 textures would be required instead of 8.)

    I thought it might be possible to use 4 extra whole frames and simulate a border side using a tiled backdrop background, but it is not possible to restrict the TexCoords of a texture being used in a backdrop background.

    Since there is no acceptably performant solution to this issue, users will simply have to restrict themselves to using SharedMedia border textures with sides that look good when stretched, as opposed to their original tiled intent.

    Please feel free to close this ticket.



Last updated
Nov 04, 2013
Jun 16, 2009
Accepted - Problem reproduced / Need acknowledged.
Defect - A shortcoming, fault, or imperfection
Medium - Normal priority.

Reported by

Possible assignees