pixbuf-engine: image borders when stretch = FALSE



Hi,

The pixbuf-engine (CVS head) behaviour for image borders when stretch
is FALSE doesn't match what I expect.  For example, suppose I am using
the definition:

image {
  ...
  file = "foo.png"
  border = { 1, 1, 1, 1 }
  stretch = FALSE
}

and foo.png is a 4x4 image which looks like this:

 ####
 #x.#
 #.x#
 ####

When this image is drawn on a (say) 10x10 area, I expect to see:

 ##########
 #x.x.x.x.#
 #.x.x.x.x#
 #x.x.x.x.#
 #.x.x.x.x#
 #x.x.x.x.#
 #.x.x.x.x#
 #x.x.x.x.#
 #.x.x.x.x#
 ##########

but instead I get something like the following (the "offset" varies
depending on the position of the window):

 ##########
 x.##x.##x.
 .x##.x##.x
 ##########
 ##########
 x.##x.##x.
 .x##.x##.x
 ##########
 ##########
 x.##x.##x.

Is this behaviour wrong?  Am I using pixbuf-engine incorrectly?  Or
am I just expecting the wrong thing to happen?

After a very brief look at the source, it seems that theme_pixbuf_render()
ignores theme_pb->border_* when theme_pb->stretch is FALSE.  I'm happy
to mention something on bugzilla and/or have a go at modifying this
function, but I thought I'd ask for advice here first in case I
misunderstand the situation.

Cheers,
Gary.
-- 
   Gary Wong           gtw gnu org           http://www.cs.arizona.edu/~gary/



[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]