[cairo] Another Pango AttributesList question
Travis Griggs
travisgriggs at gmail.com
Thu Sep 2 16:47:20 PDT 2010
Toying around with setting attributes for Layout objects, I see some
interesting behavior.
If I do (in psuedocode) something like this:
make layout
set text/markup
create attributes array
create new attribute (foreground color for example)
add new attribute to attributes array
set layout's attributes
display layout
All will be as expected. I can also do something like:
make layout
set text/markup
create attributes array
set layout's attributes
create new attribute (foreground color for example)
fetch attributes array from layout and add new attribute to it
display layout
That works too. But what doesn't seem to work is:
make layout
set text/markup
create attributes array
set layout's attributes
display layout
create new attribute (foreground color for example)
fetch attributes array from layout and add new attribute to it
display layout again
The second display show's no differences. Something happens after
displaying that seems to make any subsequent adjustment to the
attributes array ignored.
I tried a context_changed, but that has the effect of blowing all of
the attributes. I must be missing something about the lifecycle/
relationship between layouts and attribute arrays. Any help, hints,
appreciated.
--
Travis Griggs
tgriggs at cincom.com
"The dissenter is every human being at those moments of his life when
he resigns momentarily from the herd and thinks for himself." -
Archibald MacLeish, poet and librarian
More information about the cairo
mailing list