Am Montag, 12. März 2012, 17:17:29 schrieb Thorsten Zachmann: > On Monday, March 12, 2012 16:20:03 Friedrich W. H. Kossebau wrote: > > Hi, > > > > hopefully soon a new version of the prison library is released, which will > > enable me to easily control the foreground and background colors of the > > barcode image, without doing my own QImage manipulation hacks which I > > avoided so far, so it's just black on white for now. > > > > But after an initial quick code browsing I could not see yet how > > foreground > > and background colors are handled in the shapes. > > > > Could anybody please give me some pointers how to expose the foreground > > and > > background color properties of a shape, so they can be controlled by the > > color tools e.g. in the bottom panel? > > The following functions are there to set the background and border > > void KoShape::setBackground(KoShapeBackground *fill) > > KoShape::setBorder(KoShapeBorderModel *border) > > however they might do things a bit different to what you would like to do. > If you just want to specify 2 colors and don't want support for gradients > e.g. and not to be able to set it like for the other shapes then you can > also add 2 options to the option widget of the barcode. > > Hope that helps,
Yes, looks good, thanks. Bah, I only looked out for *[Cc]olor* and the resource stuff, guess that is why I failed on my quick search. Adding separate color control buttons might not be a good UI I guess, so will see to use the KoShapeBackground and KoShapeBorderModel. Cheers Friedrich _______________________________________________ calligra-devel mailing list calligra-devel@kde.org https://mail.kde.org/mailman/listinfo/calligra-devel